Just Started with Creation Kit...

Post » Fri Apr 11, 2014 4:34 am

CS and Geck didn't give me this much trouble...

I can't do something as simple as remotely activating a container through a button. I haven't found any tutorials. Even this fails to return true.

Spoiler

Scriptname _t_Test_Sort_Activator extends ObjectReference   Actor Property PlayerRef  AutoObjectReference Property _t_ref_armor_chest  Auto Event OnActivate(ObjectReference akActionRef)        If akActionRef == PlayerRef        Debug.MessageBox("Yippee! " + _t_ref_armor_chest)        _t_ref_armor_chest.Activate(PlayerRef)    else        Debug.MessageBox("Failed! " + _t_ref_armor_chest)        _t_ref_armor_chest.Activate(PlayerRef)    EndIf EndEvent


MessageBox says, "Failed! None"

There was tutorial for this sort of thing for the Oblivion CS. I wrote a very complex item sorter and now... imatotalnoob ®

User avatar
lauren cleaves
 
Posts: 3307
Joined: Tue Aug 15, 2006 8:35 am

Post » Fri Apr 11, 2014 4:40 am

Have you filled your PlayerRef property with the player?
User avatar
Khamaji Taylor
 
Posts: 3437
Joined: Sun Jul 29, 2007 6:15 am

Post » Thu Apr 10, 2014 8:38 pm

I suppose not. I don't know what that even means.

User avatar
Nienna garcia
 
Posts: 3407
Joined: Wed Apr 25, 2007 3:23 am

Post » Fri Apr 11, 2014 6:42 am

I found one problem. I named the variable the same as the editor id... that's how we used to do things. =/

Now to get that PlayerRef to work without using Game.GetPlayer()...

User avatar
Alisia Lisha
 
Posts: 3480
Joined: Tue Dec 05, 2006 8:52 pm

Post » Fri Apr 11, 2014 11:17 am


Its easy. Click on the script in the object refs window, and click the button to add properties. Select the playerref property and click auto fill.

Because you named it by the editor id it finds it straight away.
User avatar
Matt Bigelow
 
Posts: 3350
Joined: Sun Sep 30, 2007 6:36 pm

Post » Thu Apr 10, 2014 8:57 pm

Hmm. Changing the ObjectReference variable to a different name worked. I can now access the chest through the button. The only thing I can't do is use PlayerRef now. Only Game.GetPlayer() works for me. I am changed the default values through the Properties edit dialogue that didn't work.

User avatar
+++CAZZY
 
Posts: 3403
Joined: Wed Sep 13, 2006 1:04 pm


Return to V - Skyrim