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 »Help with script

Author Topic: Help with script (13 messages, Page 1 of 1)
Moderators: Dennis

UBE Chief
Joined: Sep 28, 2009

Raising the bar, one kill at a time.


Posted: Oct 17, 2009 05:02 PM    Msg. 1 of 13       
I need some help with making a script that makes anyone who falls into the trigger volume will die, just like in H3MT-Narrows, or like C20 (which is what I'm trying to mod into a MP map)
Edited by UBE Chief on Oct 18, 2009 at 05:36 PM


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Oct 17, 2009 05:27 PM    Msg. 2 of 13       
H3MT Narrows didn't have a killbox. It was just falling damage. But here's your script:

(global short plyrnum 0)

(script continuous blargh
(if
(= plyrnum 15)
(begin
(set plyrnum 0)
)
(begin
(set plyrnum (+ plyrnum 1))
)
)
)

(script continuous killbox
(if
(volume_test_object [TRIGGER VOLUME] (unit (list_get (players) plyrnum)))
(begin
(unit_kill (unit (list_get (players) plyrnum)))
)
)
)


UBE Chief
Joined: Sep 28, 2009

Raising the bar, one kill at a time.


Posted: Oct 17, 2009 05:45 PM    Msg. 3 of 13       
OK, perfect, but now I need to know HOW to put it into my map (Through Guerilla or Sapien). And btw, I ripped H3MT and it does have Trigger Volumes below the Shotgun spawn point and the rest of the level too.


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Oct 17, 2009 05:46 PM    Msg. 4 of 13       
Well, it should work naturally using falling damage. As for adding it in, you add it in like any other script.


UBE Chief
Joined: Sep 28, 2009

Raising the bar, one kill at a time.


Posted: Oct 17, 2009 06:02 PM    Msg. 5 of 13       
Yes, but the issue NOW is that I don't know HOW to put it in, because this is my first time working with scripts, despite me making multiple maps over the few years...


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Oct 17, 2009 06:14 PM    Msg. 6 of 13       
Find the directory of your map.

Example: tags\levels\test\bloodgulch\lame_bloodgulch_mod.scenario

Go to the data folder with that directory

Example: data\levels\test\bloodgulch

Create the directory if it doesn't exist. Then, create a scripts folder.

Example: data\levels\test\bloodgulch\scripts

Put the script in that folder. Open scenario in Sapien, File > Compile scripts.

Done.

Protip: Using leaked weapons (H3MT stuff) doesn't make you cool.


UBE Chief
Joined: Sep 28, 2009

Raising the bar, one kill at a time.


Posted: Oct 17, 2009 06:47 PM    Msg. 7 of 13       
No, really? Anyways, thanks for the help you guys, I'll try it and I'll let you know if it works.

EDIT:

Ummm...what should I name the script file as?

E.G. crappy_bloodgulch_mod or script?
Edited by UBE Chief on Oct 17, 2009 at 07:00 PM


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Oct 17, 2009 08:02 PM    Msg. 8 of 13       
Name it:

this_script_was_made_by_gamma_and_thus_should_be_treated_like_a_god.hsc

The filename must be a .hsc file.


UBE Chief
Joined: Sep 28, 2009

Raising the bar, one kill at a time.


Posted: Oct 17, 2009 08:21 PM    Msg. 9 of 13       
lol thanks, I didn't know that

EDIT:

Now I keep getting a error when I ask Sapien to compile the scripts:

10.17.09 20:33:31 [script line 3] i expected (if <condition> <then> [<else>]).: (if
10.17.09 20:33:31 recompiling scripts after scenarios were merged.
10.17.09 20:33:31 this left parenthesis is unmatched.: (if

Edited by UBE Chief on Oct 17, 2009 at 08:48 PM


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Oct 17, 2009 09:27 PM    Msg. 10 of 13       
@ 2.

That's improper syntax. In modern programming languages, sure it would be. However, in the Halo Scripting Language, you use the operator before the variable and constant.


UBE Chief
Joined: Sep 28, 2009

Raising the bar, one kill at a time.


Posted: Oct 17, 2009 09:53 PM    Msg. 11 of 13       
Never mind guys, I got some MAJOR help with my script from HDoan just now. Thanks anyways guys. Also, if you want the proper script, here it is:

Quote: from my script
(global short plyrnum 0)

(script continuous ~deathzone
(if
(or
(volume_test_object fall_killer1 (unit (list_get (players) plyrnum)))
(volume_test_object fall_killer2 (unit (list_get (players) plyrnum)))
(volume_test_object fall_killer3 (unit (list_get (players) plyrnum)))
(volume_test_object fall_killer4 (unit (list_get (players) plyrnum)))
(volume_test_object fall_killer5 (unit (list_get (players) plyrnum)))
)
(begin
(unit_kill (unit (list_get (players) plyrnum)))
)
)
(if
(>= plyrnum 15)
(set plyrnum 0)
(set plyrnum (+ 1 plyrnum))
)
)


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Oct 17, 2009 10:01 PM    Msg. 12 of 13       
The only difference is that there's 5 trigger volumes, and the increase plyrnum count script was merged with the killbox. It's also been optimized a bunch.


UBE Chief
Joined: Sep 28, 2009

Raising the bar, one kill at a time.


Posted: Oct 18, 2009 04:55 PM    Msg. 13 of 13       
Of course! That script was from my c20 mod, which now has proper death trigger volumes thanks to HDoan. If you just want to have one, then take out the last 4 fall_killer trigger volumes and name it according to your trigger volume that you want people to die in. (Instead of fall_killer1, put in something like death_space1 or whatever and put in a different number for each kill zone if you have more than one)
Edited by UBE Chief on Oct 18, 2009 at 04:56 PM
Edited by UBE Chief on Oct 18, 2009 at 05:37 PM

 

 
Previous Older Thread    Next newer Thread







Time: Sat January 21, 2023 1:01 AM 187 ms.
A Halo Maps Website