A Community discussion forum for Halo Custom Edition, Halo 2 Vista, Portal and Halo Machinima

Home  Search Register  Login Member ListRecent Posts
  
 
»Forums Index »Halo Custom Edition (Bungie/Gearbox) »Halo CE Technical / Map Design »Getting statement to read properly

Author Topic: Getting statement to read properly (3 messages, Page 1 of 1)
Moderators: Dennis

Storm
Joined: Dec 19, 2011

Send memes to www.loganpaul.com/cliffhanger


Posted: May 18, 2016 01:15 AM    Msg. 1 of 3       
(if (= (ai_living_count enc_1a) 0) true
(ai_place enc_1)
(ai_go_to_vehicle enc_1/cannon tur1 "")
)


I'm trying to get this statement to work properly in order to spawn another encounter shortly after one dies using an if-then-else statement. Any help guys?


altis94
Joined: Oct 5, 2012

Join my Discord https://discord.gg/GDVEaRD


Posted: May 18, 2016 09:53 AM    Msg. 2 of 3       
I'm pretty sure you don't need to write "true".


kirby_422
Joined: Jan 22, 2006

Apparently public enemy number 1?


Posted: May 18, 2016 02:20 PM    Msg. 3 of 3       
That script has 3 results inside the if; if can accept between 1-2 results,
(if <true> <then> [<else>])

For you, if the ai count is equal to zero, you're returning true. Otherwise, you're placing AI. Then you have one invalid statement afterwards that'll never read, about going to a vehicle.

If you remove that word, true, it will make it so AI will spawn when the count is zero, and if the first encounter is alive, it will send the second encounter to the turret.

I'm under the impression, that the script you're looking for is
(if (= (ai_living_count enc_1a) 0)
(begin
(ai_place enc_1)
(ai_go_to_vehicle enc_1/cannon tur1 "")
)
)

This categorizes both as what to do when its true, since the begin itself is what it sees for that, and everything else is just inside it.

 

 
Previous Older Thread    Next newer Thread







Time: Thu January 19, 2023 3:57 AM 110 ms.
A Halo Maps Website