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 »Trigger Volume Help Part II

Author Topic: Trigger Volume Help Part II (7 messages, Page 1 of 1)
Moderators: Dennis

Mysterion
Joined: Aug 9, 2008

Nice shot, but too bad your @$$ just got SACKED!!!


Posted: Apr 25, 2010 11:14 AM    Msg. 1 of 7       
When using an alert script for players entering a certain trigger volume, inserting (players) works perfectly, however I get an error that says that using "player0" or "player1" is not a valid object name. How do I set this up to alert only when the enemy player enters a trigger volume located around your base?


shadowce9
Joined: Mar 13, 2010

Learning Halo CE Scripting.


Posted: Apr 25, 2010 12:08 PM    Msg. 2 of 7       
Quote: --- Original message by: Mysterion
When using an alert script for players entering a certain trigger volume, inserting (players) works perfectly, however I get an error that says that using "player0" or "player1" is not a valid object name. How do I set this up to alert only when the enemy player enters a trigger volume located around your base?


Use:

(script static unit player0
(unit (list_get (players) 0))
)


to refer to the first player and

 (script static unit player1
(unit (list_get (players) 1))
)


to refer to the 2nd player. Well, that's what I remember off the top of my head anyway.

EDIT: Also, put these scripts before all your other scripts. So the next time you want to refer to the 1st player, you just put (player0), etc.
Edited by shadowce9 on Apr 25, 2010 at 12:11 PM


Mysterion
Joined: Aug 9, 2008

Nice shot, but too bad your @$$ just got SACKED!!!


Posted: Apr 25, 2010 02:32 PM    Msg. 3 of 7       
When compiling scripts in the map, it still says that player0 is not a valid object

Here is the script:
(script continuous balert1
(sleep_until (volume_test_objects balert_tvol1 (player0)) 15)
(sound_looping_start "sound\alarm\coldsnapwarning" none 1)
(sleep_until (not (volume_test_objects balert_tvol1 player0)) 15)
(sound_looping_stop "sound\alarm\coldsnapwarning")
)


Glitcherguy
Joined: Jan 28, 2008

I should really put a clever quote here...


Posted: Apr 25, 2010 03:11 PM    Msg. 4 of 7       

Edited by Glitcherguy on Apr 25, 2010 at 03:14 PM


Mysterion
Joined: Aug 9, 2008

Nice shot, but too bad your @$$ just got SACKED!!!


Posted: Apr 25, 2010 03:23 PM    Msg. 5 of 7       
Ok, it seems to work now after I put () around the player0 and player1, however, it can't tell the difference between player0 and player1. For the script where an alert is supposed to sound when player0 enters player1's base perimeter, if you change sides, and are now player1, you still set off the alert.


Me KS
Joined: Feb 2, 2008

Desire is Reality. Xfire: jetmaster23


Posted: Apr 25, 2010 06:42 PM    Msg. 6 of 7       
Quote: --- Original message by: Mysterion
Ok, it seems to work now after I put () around the player0 and player1, however, it can't tell the difference between player0 and player1. For the script where an alert is supposed to sound when player0 enters player1's base perimeter, if you change sides, and are now player1, you still set off the alert.


If you are the only player in the game, you are always (player0) no matter what side you're on. If somebody were to join the server with you (assuming this is MP), they would be (player1).

Edit: actually, scratch that. If somebody were to join a server with you, you would become (player1) and they would be the new (player0). The number system is really weird with the (players) variable, just letting you know.
Edited by Me KS on Apr 25, 2010 at 06:44 PM


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Apr 25, 2010 08:12 PM    Msg. 7 of 7       
And unless you wish to set up a complicated spawning system, there is no way I know of to determine who is on your team and who isn't.

 

 
Previous Older Thread    Next newer Thread







Time: Thu January 19, 2023 2:10 AM 109 ms.
A Halo Maps Website