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 a script

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

sneak12
Joined: Aug 25, 2008


Posted: May 3, 2009 12:23 PM    Msg. 1 of 13       
well, i tried to make my own script so that when i walk into the trigger volume, the ai spawn.
but when ever i compile it in sapien, i has a bunch of errors.

heres my script:
(script dormant)
(sleep_until (volume_test_objects beach_1 (players)))
(ai_place beach_lz)
(game_save_no_timeout)


so have i done something wrong? or is sapien just messing up


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: May 3, 2009 12:26 PM    Msg. 2 of 13       

(script dormant
(sleep_until (volume_test_objects beach_1 (players)))
(ai_place beach_lz)
(game_save_no_timeout)
)


FTFY


sneak12
Joined: Aug 25, 2008


Posted: May 3, 2009 09:45 PM    Msg. 3 of 13       
alrighty....sapien compiled the scritps, and i added onto the script as well. heres what i have:

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

(sleep_until (volume_test_objects beach_1 (players)))
(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)))
(ai_place spartan_crash_peli)
(game_save_no_timeout)
)


so i compiled the map and open halo up and opened the map to test it....
none of the scripts worked. and one scenery object that didnt have a script attached to it didnt spawn. so what happened? do i just have a lying sapien or what?


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: May 3, 2009 10:41 PM    Msg. 4 of 13       
Quote: --- Original message by: sneak12

(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)
)


sierra117
Joined: Jan 10, 2008

If sex is good exercise, why are there fat sluts?


Posted: May 4, 2009 03:36 AM    Msg. 5 of 13       
is the script even being woken?

(wake "name of script")


sneak12
Joined: Aug 25, 2008


Posted: May 4, 2009 04:26 PM    Msg. 6 of 13       
so your suggesting like adding (wake "name of script") to the end of it? ill try that cause i tried gammas recent meathod and none of the scripts worked.


sierra117
Joined: Jan 10, 2008

If sex is good exercise, why are there fat sluts?


Posted: May 4, 2009 06:45 PM    Msg. 7 of 13       
no in the startup script add the (wake "script name") command so the dormant script can be used.
eg

Quote: (script dormant "dormant_script"
(game_save)
)
(script startup "map name"
(game_save)
(wake dormant_script)
)


notice that the dormant script is before the startup script.
this is because the game reads the script down. and if it cant find the dormant script it doesnt think it exists. :| so put the (wake "script name") after the dormant script.


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: May 4, 2009 06:45 PM    Msg. 8 of 13       
I was assuming you woke the script...


sneak12
Joined: Aug 25, 2008


Posted: May 4, 2009 07:57 PM    Msg. 9 of 13       
sorry, gamma, i wasnt aware that i had to "wake" my script. im kinda new to scripting.


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: May 4, 2009 08:26 PM    Msg. 10 of 13       
If you want it to be working immediately, just set it to a startup script instead of dormant. Replace dormant with startup.


sneak12
Joined: Aug 25, 2008


Posted: May 4, 2009 11:28 PM    Msg. 11 of 13       
well, ive looked at ai placing and scripting tutorials. and my scripts still wont work. if i type like: ai_place "encounter name" they will spawn. but i want them to spawn when i walk through the trigger volume. everything that i have posted about my script is whats in the .hsc file, the file is under data\scripts\"map name" so i dont know. help would be greatly appreciated


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: May 4, 2009 11:41 PM    Msg. 12 of 13       
You have it in the wrong place. It goes in data\"map name"\scripts


Nebulon
Joined: Jan 6, 2008

I am a noble warrior!


Posted: May 5, 2009 11:28 AM    Msg. 13 of 13       
i made an ai ally script that works pretty well. try mine if the one you have still dont work :)

(script startup allyspawn
(sleep_until (volume_test_objects call_backup (players))15)
(ai_place allies)
(ai_follow_target_players allies)
)

this is a script i made for an sp map i have been working on. it is almost complete 2! :)

and btw, i am not a good script writer either, but i have made some well-working scripts by myself

 

 
Previous Older Thread    Next newer Thread







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