slow reacting scripts?

Discuss the creation and scripting of new fan-made games and mods for the Fallout series of games.
Post Reply
User avatar
ColJack
Vault Scion
Vault Scion
Posts: 175
Joined: Sat Apr 19, 2003 8:01 pm
Contact:

slow reacting scripts?

Post by ColJack »

i've started to figure this scripting thing out, and have made a script for repairing a generator and gettin the lights back on, as well as the map script for the test map..

everything works, it just works slowly sometimes..

what i mean is, i enter the map from another map ( just to make sure it's set up... ) and it is indeed dark..
then o go and repair the generator ( with the help of the hint book to boost my stats for testing.. ) it say's i've repaired it, but the lights sometimes come on right away, other times they can take up to 20 seconds to come on..

( by "lights come on" i mean changing the light level.. )

i know there is a time jump command in there somewhere ( like when reading books, fades to black, then fades back in, advancing the game timer.. ).. would that help.

i think it's something to do with the map_update proceedure.. it only runs every 30 seconds or so..


is there a way to set up a loop in a script that checks a variable once every second??
Temaperacl
Vault Veteran
Vault Veteran
Posts: 292
Joined: Fri Apr 19, 2002 11:51 am

Post by Temaperacl »

i know there is a time jump command in there somewhere ( like when reading books, fades to black, then fades back in, advancing the game timer.. ).. would that help.

i think it's something to do with the map_update proceedure.. it only runs every 30 seconds or so..
I'd suggest forcing a call to the map_update_p_proc. If you can call it from the script that you fix the generator in, that would probably be best, but I can't think of a command to do that off the top of my head, so if you can't do that, your idea of setting up something to check a variable repeatedly would probably work.
is there a way to set up a loop in a script that checks a variable once every second??
add_timer_event(self_obj, game_ticks(1), identifier) in map_enter_p_proc to start it off and have in the timed_event_p_proc

Code: Select all

if (fixed_param == identifier) then begin 
 if(Variable == 2) then
  call map_update_p_proc;
 else
  add_timer_event(self_obj, game_ticks(1), identifier);
end
where identifier is some identifier for the timer call, Variable is the variable you are checking (I assume it is only 2 if the generator is fixed)
That should do it for you (Although I haven't actually tested this yet)..
Jargo
Respected
Respected
Posts: 85
Joined: Fri Dec 27, 2002 6:17 pm
Location: FMC (Poland)
Contact:

Post by Jargo »

yes call woul be the best way for you i think :D
User avatar
requiem_for_a_starfury
Hero of the Wastes
Hero of the Wastes
Posts: 1820
Joined: Tue Oct 29, 2002 11:13 am

Post by requiem_for_a_starfury »

Me a humble FOT map maker still trying to learn to read FO2 scripts but have a look at the scripts for the Military Base and see how it's handled there, as that's basically the same senario. You repair the generator and the lights come on.
If you can bear to hear the truth you've spoken
Twisted by knaves to make a trap for fools,
User avatar
ColJack
Vault Scion
Vault Scion
Posts: 175
Joined: Sat Apr 19, 2003 8:01 pm
Contact:

Post by ColJack »

they had a similar problem with the force fields in fallout 1..
you used the radio, but the fields took 20 or 30 seconds to go off..

i "fixed" it by putting a fade out, advance game timer 1 hour, fade in bit in the script for the generator.. works great now..
Our Host!
Post Reply