PDA

View Full Version : came here for help



sneak
May 6th, 2009, 10:42 PM
Before I start im new here so I dont know if this belongs here.

Alright, I am wanting to make a sp map. I have looked at ai tutorials, scripting tutorials, and I have even posted help on the matter of scripts on halomaps. heres the url:
http://forum.halomaps.org/index.cfm?page=topic&topicID=25914

my script is this:



(script dormant
(sleep_until (volume_test_objects unlock_path (players)) 15)
(ai_place unlock_hall)
(object_create hog1)
(game_save_no_timeout)

(sleep_until (volume_test_objects beach_1 (players)) 15)
(ai_place beach_lz)
(ai_place beach_crash)
(object_create drop_crash1)
(object_create drop_crash2)
(game_save_no_timeout)

(sleep_until (volume_test_objects peli_crash (players)) 15 )
(ai_place spartan_crash_peli)
(game_save_no_timeout)
)



Now, im able to place ai and vehicles and bipeds fine and all but, when ever I walk into the trigger volume activating them, they dont spawn. I have to go into console and type: ai_place "encounter name". So what am I doing wrong?

p0lar_bear
May 7th, 2009, 02:59 AM
Looking at your halomaps topic, the answers you need are already there. To reiterate:

First off, your script definition is wrong. A, it should be a startup script, or this dormant script needs to be woken up by an already running script. B, the script is not named.

The fact that Sapien also doesn't catch this problem on script compilation leads me to also believe that your HSC file isn't in the correct folder; it should be in data\<path to your map>\scripts\ as somescript.hsc (doesn't have to be that name, but you get the idea).

Your fixed script is as follows. Based on how it's scripted, you would want it to be a startup script so it will execute on map start, but will halt until the conditions of the sleep_until functions are met:

(script startup encounter_handling
(sleep_until (volume_test_objects unlock_path (players)) 15)
(ai_place unlock_hall)
(object_create hog1)
(game_save_no_timeout)

(sleep_until (volume_test_objects beach_1 (players)) 15)
(ai_place beach_lz)
(ai_place beach_crash)
(object_create drop_crash1)
(object_create drop_crash2)
(game_save_no_timeout)

(sleep_until (volume_test_objects peli_crash (players)) 15)
(ai_place spartan_crash_peli)
(game_save_no_timeout)
)

Polamee
May 7th, 2009, 09:33 AM
Looking at your halomaps topic, the answers you need are already there. To reiterate:

First off, your script definition is wrong. A, it should be a startup script, or this dormant script needs to be woken up by an already running script. B, the script is not named.

The fact that Sapien also doesn't catch this problem on script compilation leads me to also believe that your HSC file isn't in the correct folder; it should be in data\<path to your map>\scripts\ as somescript.hsc (doesn't have to be that name, but you get the idea).

Your fixed script is as follows. Based on how it's scripted, you would want it to be a startup script so it will execute on map start, but will halt until the conditions of the sleep_until functions are met:

(script startup encounter_handling
(sleep_until (volume_test_objects unlock_path (players)) 15)
(ai_place unlock_hall)
(object_create hog1)
(game_save_no_timeout)

(sleep_until (volume_test_objects beach_1 (players)) 15)
(ai_place beach_lz)
(ai_place beach_crash)
(object_create drop_crash1)
(object_create drop_crash2)
(game_save_no_timeout)

(sleep_until (volume_test_objects peli_crash (players)) 15)
(ai_place spartan_crash_peli)
(game_save_no_timeout)
)

It would also be advisable to cut them up into 3 separate statup scripts, or a startup script waking 2 dormant scripts. It gets messy if you do it this way.

A tip to remember in Halo scripting is always to close a parantheses. No parantheses must be left unmatched.

sneak
May 9th, 2009, 07:13 PM
thanks for all the help guys, i finally got it to work :). now im adding bsp switchers, ai spawners and object spawners. only thing is is that on one of the bsp switchers i have to go backwards for it to switch. probably a bug, but i thought id put it out there if someone had an idea