Jump to content

Need help with a Script on the GECK


Plarux

Recommended Posts

Just wondering what I put at the end of a dispenser script to make it where the player has to wait an amount of time before he can activate it again. For instants like the "My First Laboratory" from Fallout 3. The player could make chems, but had to wait a day or two before he/she could do it again.

 

Here is the script I have so far (Ammo Dispenser):

 

scn [name of script]

short Button

begin OnActivate

if IsActionRef player
ShowMessage [name of Msg]
endif

end

BEGIN MenuMode 1001

set Button to GetButtonPressed

if ( Button == 1 )
player.AddItem Ammo556mm 24
elseif ( Button == 2 )
player.AddItem Ammo5mm 48
endif

END

 

Now I know from the GSChemistrySetScript, that under the "player.AddItem Ammo556mm 24" & "player.AddItem Ammo5mm 48" I need to add something like "SetDestroyed 1" but it would instead be the command that allows the player to use it again in a day or two.

 

IF ANYONE CAN HELP/EXPLAIN WHAT I WOULD PUT IT WOULD BE GREATLY APPRECIATED!

Link to comment
Share on other sites

E CAN HELP/EXPLAIN WHAT I WOULD PUT IT WOULD BE GREATLY APPRECIATED!

Not a scripting guy, but I can think of a few ways that may work.

 

One way could be a staged timer. Put a condition on it, that the timer has passed (or is 0 depending on whether you count up or down) 86400 seconds (one day) or whatever.

 

Another way could be using the GameDaysPassed global. Store the value at the end of the dispensing in a var, then put a condition (right after your onActivate block) with a simple formula that is greater than the var + your day or days.

 

I'd be curious to know how the SetDestoryed 1 is actually teh way they accomplish a timer effect. If it's returned to it's previous state when the cell is reset, I was under the impression that happens, like, every 72 hours or something.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...