Timed Spawns?

Post » Sat Jan 29, 2011 12:55 pm

At the moment I am creating a kind of "Zombie apocolypes" Mod. I was wondering is it possible to give creatures a script which makes them spawn at a certain time and then disappear at a certain time, probably using the Disable / Enable functions? I want to add the feeling of having to wait until the day time before running around to get supplies, havng to quickly rush from place to place before the zombies return at night. I'd like the zombies to appear at 6 pm and then disapear at 6 am.

If someone could write me up a script i can put on the zombies that would be MUCH appreciated. I am hopeless at timed scripts....

Cheers,

Shadowform.
User avatar
Josh Lozier
 
Posts: 3490
Joined: Tue Nov 27, 2007 5:20 pm

Post » Sat Jan 29, 2011 11:20 am

ScriptName TimedZombies6to6SCRfloat timecheckshort DoOnceBegin GameMode  set timecheck to GetCurrentTime  if (timecheck >= 5.85) && (timecheck < 5.90)    set DoOnce to 0  endif  if (timecheck >= 6.0) && (timecheck < 6.25)    if (DoOnce == 0)      enable      resurrect      set DoOnce to 1    endif  endif  if (timecheck >= 17.85) && (timecheck < 17.90)    set DoOnce to 0  endif  if (timecheck >= 18.0) && (timecheck < 18.25)    if (DoOnce == 0)      kill      disable      set DoOnce to 1    endif  endifEnd


It's crude, but it should work.
For effiency, the better way is to use a persistant XMarker as the 'enable parent' of all of your zombies, then just enable/disable that one XMarker to affect all of your zombies at once from just one script. Would just have to change the enable, resurrect, kill, and disable lines above to put the XMarkers referrence name (whatever you name it as) in front of them.. (ie.. ZombieControllerXMarkerREF.enable). Then save the script as a quest script and plop it into a new quest that's set to 'start game enabled' and set the processing delay to 0.02.
User avatar
James Wilson
 
Posts: 3457
Joined: Mon Nov 12, 2007 12:51 pm


Return to Fallout 3