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 »Backtracking and Trigger Volumes

Author Topic: Backtracking and Trigger Volumes (3 messages, Page 1 of 1)
Moderators: Dennis

KingNick220
Joined: Jul 14, 2008

xXx 420 n0sc0pes MLG xXx


Posted: Jun 2, 2017 06:37 PM    Msg. 1 of 3       
Say I want a player to backtrack through a bsp, and on his way back he faces new encounters that wake from trigger volumes. How do I get the trigger volumes to only activate when the player is backtracking?


DeadHamster
Joined: Jun 8, 2014


Posted: Jun 3, 2017 05:43 PM    Msg. 2 of 3       
Use Globals!



(global boolean BACKTRACK false)

(script startup BACKTRACK_TOGGLER
(sleep_until (volume_test_objects FINAL_TRIGGER_VOLUME (players))
(set BACKTRACK true)
)


(script continuous triggertester

(if BACKTRACK
(begin
(if (volume_test_objects TRIGGER_VOLUME_1 (players))
(begin
(PLACE SCRIPTS HERE)
))
))

)



Replace the trigger volume names with your own volumes. What this does is create a global with the value of a boolean, and sets it to false. Then when the player goes through the last trigger volume, it sets backtrack to true. Now any trigger volumes that are passed through while BACKTRACK is true will go through the commands you put under (PLACE SCRIPTS HERE). If BACKTRACK is not true (the player didn't reach the final volume), no commands will play.


MatthewDratt
Joined: Sep 11, 2010

Our President Brags About Sexual Assault


Posted: Jun 3, 2017 11:09 PM    Msg. 3 of 3       
That is a pretty complicated way to deal with that. Your continuous script will endlessly spawn AI when the player is in the trigger, instead of just once.

Just use dormant scripts.

(script dormant player_can_backtrack_now
(sleep_until (volume_test_objects Backtrack_Trigger (players)) ;waits for the player to hit the backtracked trigger to place ai
(ai_place 01_Cov_1_Backtrack)
)

(script startup script_copyrighted_mattdratt_2017
(sleep_until (volume_test_objects Enable_Backtrack (players)) ;waits until the player hits the Enable_Backtrack trigger, which should be ahead of Backtrack_Trigger
(wake player_can_backtrack_now)
)

Edited by MatthewDratt on Jun 3, 2017 at 11:11 PM

 

 
Previous Older Thread    Next newer Thread





Time: Sat September 23, 2017 2:10 PM 375 ms.
A Halo Maps Website