thats what i thought it would do, and it did
i've had a similar problem before with a gravity script
Code: Select all
(script continuous gravity_button
(begin
(physics_set_gravity 1)
(if(player_action_test_melee)
(physics_set_gravity 0)
(player_action_test_reset))
)
)
this script was supposed to be 0 gravity while holding "B" but all it did was set gravity to 0 and kept it at 0, what happened was my "if" statement did not contain a "then" statement within the same brackets. To fix that i changed the brackets
Code: Select all
(script continuous gravity_button
(begin
(physics_set_gravity 1)
(if(player_action_test_melee)
(physics_set_gravity 0))
(player_action_test_reset)
)
)
a sleep statement is more than likely different in that it has no if/then attitude, rather it is a command..
Code: Select all
(script continuous ai_respawner_maybe
(begin
(sleep_until (<=(ai_living_count pop)5)150) -- this has 3 opening brackets, and three closing brackets
(ai_place pop)-- separate command
)
)
i think what is happening is that the script stays dormant "Until" the ai living count is under 5, then the script activates and is read after the "sleep" void command
i'm not sure this is the case, but it is the best thing i can come up with
i think i'm going to try to use an if statement instead of a sleep untill...
sound good?