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 »will this script work?

Author Topic: will this script work? (12 messages, Page 1 of 1)
Moderators: Dennis

Hydrogen
Joined: Dec 6, 2009

Wort Wort Wort...


Posted: Feb 27, 2010 06:02 PM    Msg. 1 of 12       
(script startup trig_spawn
(begin
(sleep_until (volume_test_objects trig1 (players)) 15)
(sound_impulse_start sound\left4dead\music\safe\themonsterswithout none 1)
)
)


chrisk123999
Joined: Aug 10, 2008

=CE= Chris [Captain] [=]


Posted: Feb 27, 2010 06:11 PM    Msg. 2 of 12       
Quote: --- Original message by: Hydrogen

(script startup trig_spawn
(sleep_until (volume_test_objects trig1 (players)) 15)
(sound_impulse_start "sound\left4dead\music\safe\themonsterswithout" none 1)
)


FTFY
Edited by chrisk123999 on Feb 27, 2010 at 06:11 PM


Hydrogen
Joined: Dec 6, 2009

Wort Wort Wort...


Posted: Feb 27, 2010 06:23 PM    Msg. 3 of 12       
k ty but um.... Im new to scripting when I paste it in notepad or ez halo scripter it doesnt have the tab things. any help?


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Feb 27, 2010 09:28 PM    Msg. 4 of 12       
The tabs are for formatting purposes so those who have to fix your script don't bleed their eyes out. It technically isn't required for the script to compile, but it looks a lot better. To add tab things, hit the tab key.


Hydrogen
Joined: Dec 6, 2009

Wort Wort Wort...


Posted: Feb 28, 2010 12:17 AM    Msg. 5 of 12       
k so i tested it works. :D now. how in the heck do I make it work more then one time. because I walk into it and it works walk out then back in and it doesnt.


Co1t3r
Joined: Dec 13, 2008


Posted: Feb 28, 2010 12:54 AM    Msg. 6 of 12       
Make the script continuous; change the part that says "startup" to "continuous".


Hydrogen
Joined: Dec 6, 2009

Wort Wort Wort...


Posted: Feb 28, 2010 01:28 AM    Msg. 7 of 12       
Quote: --- Original message by: chrisk123999

Quote: --- Original message by: Hydrogen

(script startup trig_spawn
(sleep_until (volume_test_objects trig1 (players)) 15)
(sound_impulse_start "sound\left4dead\music\safe\themonsterswithout" none 1)
)


FTFY
Edited by chrisk123999 on Feb 27, 2010 at 06:11 PM


thank you. also using chrisk's way how would I make it to spawn my encounter of AI encounter name is "zombies"

Quote: --- Original message by: colter13
Make the script continuous; change the part that says "startup" to "continuous".

this one you said is for a multiplayer secret. but I want one like yoyoarst where u step in it and it keeps going what happens when I did yours it would repeat the first 1 second of it until I got out of the trigger volume
Edited by Hydrogen on Feb 28, 2010 at 01:29 AM


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Feb 28, 2010 11:46 AM    Msg. 8 of 12       
Use a boolean to detect whether or not the player has entered the trigger volume, and the song is playing. Pseudocode:

Continuous script
If player is in the trigger volume
Check if boolean is false. If false, set to true, and set the song to begin playing (use a sound_looping).
Sleep until the player is no longer inside the trigger volume.
Set boolean false, kill the sound.


Hydrogen
Joined: Dec 6, 2009

Wort Wort Wort...


Posted: Feb 28, 2010 01:06 PM    Msg. 9 of 12       
@ Gamma

can I have that in a dumb blonde language.... Because remeber I just started out scripting yesterday


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Feb 28, 2010 01:20 PM    Msg. 10 of 12       
Pseudocode IS dumb blonde language, isn't it? Just replace the lines with code...

Here's it in english:

Create a continuous script that checks whether or not the player is in the trigger volume. If the player is in the trigger volume, and a certain boolean (variable that contains a true or false value) is false, then set the boolean to true, and begin to play the sound. Otherwise, don't do anything. Then have the script wait until the player is no longer inside the trigger volume. Change the value stored inside the variable to false, and stop playing the sound.


Hydrogen
Joined: Dec 6, 2009

Wort Wort Wort...


Posted: Feb 28, 2010 01:23 PM    Msg. 11 of 12       
ok... ima go read boolean in the scripting bible so I know how to set one up. I use a sound looping right?


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Feb 28, 2010 01:49 PM    Msg. 12 of 12       
Yes.

 

 
Previous Older Thread    Next newer Thread







Time: Fri January 20, 2023 10:41 PM 140 ms.
A Halo Maps Website