Creating actor via quest

Post » Wed Jun 20, 2012 5:53 am

Hi.

In my custom quest I'm trying to create a thief, and add an item to the thief. Here's what I did.
-Create a marker heading where I wanted the thief to appear.
-Create an alias called "ThiefSpawnPoint", pointing to the marker.
-Create a new alias "AliasThief", select "Create Reference to Object", use my Actor, assign "Very Hard" as level, create at "ThiefSpawnpoint".
-Create a new alias "StolenObject", select "Create Reference to Object", use my Item, assign "None" as level, create in "AliasThief".

Sadly no thief showed up, I am guessing that the stolen object wasn't created either, but I can't tell without seeing the thief.

What I want to do:
-I want the above to work, obviously.
-I also want to do all this at a certain quest stage. -Is it possible? (I started thinking about scripting it using functions such as "PlaceAtMe", but that's usually very troublesome to get it to work correctly in my experience.

Help appreciated.
Thanks.
User avatar
Ashley Hill
 
Posts: 3516
Joined: Tue Jul 04, 2006 5:27 am

Post » Wed Jun 20, 2012 8:22 am

*bump*
User avatar
jessica robson
 
Posts: 3436
Joined: Mon Oct 09, 2006 11:54 am

Post » Wed Jun 20, 2012 4:10 pm

Did you look through the tutorial quest on the wiki. It teaches you to do almost exactly what you're trying to do:

http://www.creationkit.com/Bethesda_Tutorial_Creating_an_Actor

(Look about 1/2 way down the page for "Making an Enemy")

Then to enable the thief:

http://www.creationkit.com/Bethesda_Tutorial_Quest_Loose_Ends

(Look about 1/2 way down for "Out of Order")
User avatar
Amber Ably
 
Posts: 3372
Joined: Wed Aug 29, 2007 4:39 pm

Post » Wed Jun 20, 2012 9:49 am

That looks just like what I was looking for.
I decided to go with the Disable/Enable way.

-I placed my actor.
-I double-clicked the actor and checked "initially disabled".
-I assigned an Alias to my actor.

-I edited the script that is supposed to enable my alias.
-I first added an Alias property called "HT_AliasThief" ("Alias Property HT_AliasThief Auto")
-I then added the following line to my code: "HT_AliasThief.GetReference().Enable()"

Now the script refuses to compile. It says there's something wrong with the line I added and I can't figure out what?


EDIT:
The script extends "TopicInfo Hidden" - could this be the cause of the problem?
User avatar
CHangohh BOyy
 
Posts: 3462
Joined: Mon Aug 20, 2007 12:12 pm

Post » Wed Jun 20, 2012 2:48 pm

Too bad nothing ever works in CK..
User avatar
Vahpie
 
Posts: 3447
Joined: Sat Aug 26, 2006 5:07 pm

Post » Wed Jun 20, 2012 2:13 pm

Most likely you want a ReferenceAlias property, not an Alias Property. http://www.creationkit.com/GetReference_-_ReferenceAlias is a function of the ReferenceAlias script, which is what Quest Aliases are instances of.

ReferenceAlias Property HT_AliasThief Auto
User avatar
Angela
 
Posts: 3492
Joined: Mon Mar 05, 2007 8:33 am

Post » Wed Jun 20, 2012 3:04 pm

Most likely you want a ReferenceAlias property, not an Alias Property. http://www.creationkit.com/GetReference_-_ReferenceAlias is a function of the ReferenceAlias script, which is what Quest Aliases are instances of.

ReferenceAlias Property HT_AliasThief Auto

Once you do this you can enable it a dozen different ways as well. Through your quest script, using a quest stage, dialog, scene whatever. It's really handy!
User avatar
Hannah Whitlock
 
Posts: 3485
Joined: Sat Oct 07, 2006 12:21 am

Post » Wed Jun 20, 2012 6:14 pm

You could also just make an ActorBase for your thief and use a Game.GetPlayer().placeactoratme(etc. etc.) function. This will allow you to make as many as you want whenever you want and you don't have to worry about aliases.
User avatar
Alisia Lisha
 
Posts: 3480
Joined: Tue Dec 05, 2006 8:52 pm

Post » Wed Jun 20, 2012 9:00 am

You could also just make an ActorBase for your thief and use a Game.GetPlayer().placeactoratme(etc. etc.) function. This will allow you to make as many as you want whenever you want and you don't have to worry about aliases.

I guess placeatme and placeactoratme are the functions of the day.
User avatar
ILy- Forver
 
Posts: 3459
Joined: Sun Feb 04, 2007 3:18 am

Post » Wed Jun 20, 2012 3:08 pm

That should be a thing, function of the day. We could hold competitions to see who could do the craziest things using that function as much as possible.
User avatar
quinnnn
 
Posts: 3503
Joined: Sat Mar 03, 2007 1:11 pm

Post » Wed Jun 20, 2012 5:13 pm

Too bad nothing ever works in CK..



New problem:

Apparently the built-in [censored] script can't handle all functions. It started messing up when I edited the script manually too much (too much = adding 4 lines of code).
So I decided to throw away the stupid built-in script and substitute my own. Which is pretty much an exact copy of the old crap, but with another name and properly indented code.
I should've known I was not allowed to do something freely in CK, though! Now the script doesn't run at all.

Here is my script:

Scriptname HT_QuestProgress02 extends TopicInfo  ReferenceAlias Property HT_AliasThief AutoFunction Fragment_0(ObjectReference akSpeakerRef)  Actor akSpeaker = akSpeakerRef as Actor  GetOwningQuest().SetObjectiveCompleted(10)  GetOwningQuest().SetObjectiveDisplayed(20)  GetOwningQuest().SetStage(20)  HT_AliasThief.GetReference().Enable()EndFunction
User avatar
Sasha Brown
 
Posts: 3426
Joined: Sat Jan 20, 2007 4:46 pm


Return to V - Skyrim