Activators won't play their anims when a script is attached

Post » Tue Jun 08, 2010 1:30 pm

I have been trying to make a generator, which must be crank started. I added the WoodenSwitch activator to act as a lever that needs to be cranked three times before a lamp lights up and an ElectricalSwitch02 activator can be flicked to turn on the power.

All of this is controlled by a quest, and it works the way I want it - apart from the fact that none of the activators (WoodenSwitch and ElectricalSwitch02) play their animations when they are activated, they just stay stationary. Should there be a playgroup command in the script, and in that case: how would I go about to set it up?
User avatar
brandon frier
 
Posts: 3422
Joined: Wed Oct 17, 2007 8:47 pm

Post » Tue Jun 08, 2010 12:41 pm

I'm not sure if it will work like a door, but you can try using the "SetOpenState 1" command to activate the open animation and "SetOpenState 0" for the close.
User avatar
ezra
 
Posts: 3510
Joined: Sun Aug 12, 2007 6:40 pm

Post » Tue Jun 08, 2010 12:50 am

The wooden switch (which is not used in the game) is activated with the open and close animations. So, setting the open state, as pkleiss said, will work on it. Open is 'down' and Close is 'up'.
The electrical switch is the same.

You might also just try the 'activate' command. That should make the object 'open' and 'close' automatically without calling the 'setOpenState' function.

Begin OnActivate  ;your script   ActivateEnd

User avatar
Christina Trayler
 
Posts: 3434
Joined: Tue Nov 07, 2006 3:27 am

Post » Tue Jun 08, 2010 8:35 am

The wooden switch (which is not used in the game) is activated with the open and close animations. So, setting the open state, as pkleiss said, will work on it. Open is 'down' and Close is 'up'.
The electrical switch is the same.

You might also just try the 'activate' command. That should make the object 'open' and 'close' automatically without calling the 'setOpenState' function.

Begin OnActivate ;your script   ActivateEnd


Works perfectly now, thanks to both of you!
User avatar
JUan Martinez
 
Posts: 3552
Joined: Tue Oct 16, 2007 7:12 am


Return to Fallout 3