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 »What's wrong with my script?

Author Topic: What's wrong with my script? (4 messages, Page 1 of 1)
Moderators: Dennis

Halo CE Noob Modder117
Joined: Aug 9, 2018

Some tutorials would be nice...


Posted: Aug 16, 2018 02:16 AM    Msg. 1 of 4       
(script static unit player
(unit (list_get (players) 0))
)

(script startup 1
(fade_in 0 0 0 200)
)

(script dormant intro
(sleep_until (volume_test_objects chapter_trigger (players) 0))
(cinematic_show_letterbox true )
(show_hud false )
(sleep 30 )
(cinematic_set_title intro )
(sleep 150 )
(cinematic_show_letterbox false )(show_hud true ))
)

The script dormant intro part is what's giving me the error. I wanted to make my chapter title pop up via my trigger point so I copied one from the campaign script but I get this error:

08.16.18 16:03:41 [scripts line 10] the "volume_test_objects" call requires exactly 2 arguments.: (volume_test_objects chapter_trigger (players) 0))

08.16.18 16:03:41 recompiling scripts after scenarios were merged.
08.16.18 16:03:41 [scripts line 9] this left parenthesis is unmatched.: (script dormant intro

EDIT: I've been having major success for once, and for some dumb reason the hardest thing I could never be assed learning about (scripts) is what I seem to be having success with, yet I still cannot make a damn map in 3DS MAX!!! So, I already did another work around but I assume this error has something to do with having one of the "))" as incorrect?
Edited by Halo CE Noob Modder117 on Aug 16, 2018 at 11:16 AM


DeadHamster
Joined: Jun 8, 2014


Posted: Aug 16, 2018 01:18 PM    Msg. 2 of 4       
(volume_test_objects) returns a true or false value based on the objects passed to it, you don't want the 0 at the end.

So you would want

(sleep_until (volume_test_objects chapter_trigger (players)) 5)


The 5 at the end makes it check every 5 ticks, instead of the default of 30.


Halo CE Noob Modder117
Joined: Aug 9, 2018

Some tutorials would be nice...


Posted: Aug 17, 2018 12:38 AM    Msg. 3 of 4       
Figures it was something that small.

I cheated, basically, going through the default campaign scripts I looked at similar ones and the moment I got one trigger volume related script working, I started copying it for everything else to spawn vehicles, encounters, objective hud notifications etc.

Alls going well so far. For once I'm actually getting something done. Maybe one day I'll give 3DS MAX a crack again and try to edit a map or just make one from scratch especially now that I somehow figured out scripting!
Edited by Halo CE Noob Modder117 on Aug 17, 2018 at 12:38 AM


DeadHamster
Joined: Jun 8, 2014


Posted: Aug 17, 2018 04:11 PM    Msg. 4 of 4       
It's always something small. Other things to note; if there's an error with a command's syntax inside an (if) statement's true/false return, it'll return that the (if) itself is invalid, and not the command 7 lines down that's causing the glitch. This can make debugging huge lines of code impossible, If you ever have an error pop up on the (if), spend 10 minutes or so making sure the conditional is absolutely valid, and then remove the (if) from the script so that it will parse down to the actual error and return that. If it completes you know that it was the (if) statement's conditional, or that you forgot a (begin) or that you mistyped the format for the true/false returns.

This is how I learned. It doesn't have every command, but it almost does.



Edit: Look at the error it gave you by the way. It gave you the line that was wrong, and then said "requires exactly 2 arguments". Arguments are the data being analyzed by the command. In the BSL Bible you'll see the two arguments are the trigger_volume being analyzed, and the object_list to check. That extra 0 is an argument it doesn't know what to do with. This will help you figure out which line of code is causing you grief, and why.
Edited by DeadHamster on Aug 17, 2018 at 04:14 PM

 

 
Previous Older Thread    Next newer Thread







Time: Tue October 23, 2018 3:13 PM 469 ms.
A Halo Maps Website