How to work with time in a script

Post » Wed Oct 12, 2011 10:12 pm

I've been adding some new characters in the game and I was thinking about allowing them to respawn in interiors. But I don't want to use the stock 3 days value. In Oblivion I used a mod called SPAWN that allowed me to set up random intervals for respawning rather than just using the default. I figure it should be fairly easy to do in Fallout using the SetEncounterZone command, but I can't figure out how to tell the game the value I'm creating is a time one. I want to start with a base value, like the 72 hour default, then multiply that using the GetRandomPercent condition. But how do I get the game to recognize that the resulting value is a time value?
User avatar
Racheal Robertson
 
Posts: 3370
Joined: Thu Aug 16, 2007 6:03 pm

Post » Wed Oct 12, 2011 8:48 pm

Values in scripts don't have units - how they should be interpreted depends entirely on how they are used.

I haven't been able to find any reference to a "SetEncounterZone" command. Is that a script function you're talking about?

Cipscis
User avatar
gemma king
 
Posts: 3523
Joined: Fri Feb 09, 2007 12:11 pm

Post » Thu Oct 13, 2011 10:15 am

Values in scripts don't have units - how they should be interpreted depends entirely on how they are used.

I haven't been able to find any reference to a "SetEncounterZone" command. Is that a script function you're talking about?

Cipscis


Sorry, I worded it wrong. It's actually SetZoneRespawns:

http://geck.gamesas.com/index.php/SetZoneRespawns

So it should be possible to set up a random value for that to occur if I can figure out how to get the game to recognize a time value. I've come across the Globals that deal with time, like GameDaysPassed etc. but those don't strike me as anything I can use in this context. I'd like to have something like iHoursToRespawnCell * GetRandomPercent, but I'm not sure how to make it work.
User avatar
Penny Wills
 
Posts: 3474
Joined: Wed Sep 27, 2006 6:16 pm

Post » Wed Oct 12, 2011 10:28 pm

From the documentation, it looks like this function specifies whether a cell respawns or not, and the actual time to respawn is the same for all respawning cells and governed by that gamesetting.

Cipscis
User avatar
Robert
 
Posts: 3394
Joined: Sun Sep 02, 2007 5:58 am


Return to Fallout 3