
TCGreflexhammer
Joined: Jul 5, 2016
"""Quality Content"""
|
Posted: Jul 5, 2016 02:44 AM
Msg. 1 of 2
I'm trying to make a firefight map (as you could probably tell by the title). Currently I'm using this to spawn the waves. (global short rng 0) (global ai currentEncounter null)
(script continuous Set1Round1Spawning
(set rng (random_range 0 2))
(if (= rng 1) (set currentEncounter Set1_Round1_EnGrunt1)) (if (= rng 0) (set currentEncounter Set1_Round1_EnJackal2))
(ai_place currentEncounter)
(sleep_until (= (ai_living_count currentEncounter) 0) 30) )
But I'm wanting to use something like this (global short rng 0) (global ai currentEncounter null)
(script dormant Set1Round1Spawning
(set rng (random_range 0 2))
(if (= rng 1) (set currentEncounter Set1_Round1_EnGrunt1)) (if (= rng 0) (set currentEncounter Set1_Round1_EnJackal2))
(ai_place currentEncounter) )
(script continuous WaveCheck (if (<= (ai_living_count currentEncounter) 0) (wake Set1Round1Spawning)) )
I just got into learning scripting today so any help would be appreciated Edited by TCGreflexhammer on Jul 5, 2016 at 02:44 AM
|

TCGreflexhammer
Joined: Jul 5, 2016
"""Quality Content"""
|
Posted: Jul 5, 2016 05:51 AM
Msg. 2 of 2
Thanks for the reply. I've got a questions about the scripting in general. if you have a global variable in one script and change it (lets say a short that was 1 changes to 7) are you then able to use the updated variable in another script or will it end up being its initial value?
|