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 »Script not working

Author Topic: Script not working (11 messages, Page 1 of 1)
Moderators: Dennis

FtDSpartn
Joined: May 1, 2009

Verified AI.


Posted: Jun 20, 2010 01:31 AM    Msg. 1 of 11       
Hey,when I compile my script and test it ingame,the trigger volumes don't work.
I tried changing (players) 0)) to (players) 15)) and it still doesn't work.
Script:
(script startup activate_navpoint
(sleep_until (= (volume_test_objects Trig1 (players) 0))
(activate_team_nav_point_flag target_red player Nav1 .6)
(activate_team_nav_point_flag target_red player Nav2 .6)
)

(script startup deactivate_navpoint
(sleep 50)
(sleep_until (= (ai_living_count EliteSniper 0))
(deactivate_team_nav_point_flag player Nav1)
)

(script startup deactivate_navpoint2
(sleep 50)
(sleep_until (= (ai_living_count EliteSniperBD 0))
(deactivate_team_nav_point_flag player Nav2)
)

(script dormant pelican
(object_create p1)
(objects_attach p1 cargo w1 1)
(recording_play_and_hover p1 insertion_pelican_in)
(sleep 655)
(objects_detach p1 w1)
(vehicle_hover p1 0)
(recording_play_and_delete p1 insertion_pelican_out)
)

(script startup GhostEncounterBanshee
(sleep_until (= (volume_test_objects Trig2 (players) 0))
(ai_place GhostEncounter)
(ai_command_list Ghost Driver)
(ai_place Banshee)
(object_create c_ship1)
(recording_play_and_delete c_ship1 insertion_pelican_out)
(sleep 50)
(sleep_until (= (ai_living_count GhostEncounter 0))
(wake pelican)
)


(script startup Ruins
(sleep_until (= (volume_test_objects Trig3 (players) 15))
(ai_place ForrunnerRuins)
)

(script startup Wraith
(sleep_until (= (volume_test_objects Trig4 (players) 0))
(ai_place Wraith)
(ai_magically_see_players Wraith)
(activate_team_nav_point_flag target_red player Nav3 .6)
(sleep_until (= (ai_living_count Wraith 0))
(deactivate_team_nav_point_flag player Nav3)
)

(script startup FinalBattle
(sleep_until (= (volume_test_objects Trig5 (players) 15))
(ai_place ODSTs)
(ai_command_list ODSTs ODSTAssault)
(ai_place FinalWraithEncounter)
)

(script startup FinalBattle
(sleep_until (= (volume_test_objects Trig5 (players) 0))
(ai_place ODSTs)
(ai_command_list ODSTs ODSTAssault)
(ai_place FinalWraithEncounter)
(sleep 50)
(sleep_until (= (ai_living_count FinalWraithEncounter 0))
(game_won)
)

(script startup Teleport
(sleep_until (= (volume_test_objects Tele1 (players) 0))
(object_teleport (unit (list_get (players) 0) Teleport1)
(sleep 50)
(sleep_until (= (volume_test_objects Tele2 (players) 0))
(object_teleport (unit (list_get (players) 0) Teleport2)
)
Can someone tell me how to fix?


Noobyourmom
Joined: Mar 23, 2010


Posted: Jun 20, 2010 07:50 AM    Msg. 2 of 11       
You can just use the command:

(sleep_until (volume_test_objects Trig2 (players)) 15)


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Jun 20, 2010 12:41 PM    Msg. 3 of 11       
The reason why your command doesn't work, is because:
a) Your parentheses are unmatched
b) You're using the (= (volume test objects thing) 0), which checks if the player ISN'T in the trigger volume. If the script were to compile due to some freak accident with the compiler, you'd execute every time the player ISN'T in the trigger volume


FtDSpartn
Joined: May 1, 2009

Verified AI.


Posted: Jun 20, 2010 02:09 PM    Msg. 4 of 11       
That is weird,because it compiled fine....wow,I must've had the scripts in the wrong folder.
Oh and,can you tell me where they are un-matched?
Edit: It IS in data/levels/test/infinity/scripts any idea what might be wrong?
Edited by FtDSpartn on Jun 20, 2010 at 02:11 PM


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Jun 20, 2010 02:34 PM    Msg. 5 of 11       
Look at this:

(sleep_until (= (volume_test_objects Trig1 (players) 0))

This means:
(sleep_until
(=
(volume_test_objects trig1
(players)
0)
)

See a problem here?


FtDSpartn
Joined: May 1, 2009

Verified AI.


Posted: Jun 20, 2010 02:53 PM    Msg. 6 of 11       
So it would be (sleep_until (volume_test_objects Trig1) (players) 0)))?
NE: I still havent fixed the problem where Sapien can't find my script,so it says successfully compiled.my script is in data/levels/test/infinity/scripts/ and my map is in
tags/levels/test/infinity/ , what could be the problem?
Edited by FtDSpartn on Jun 20, 2010 at 02:56 PM


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Jun 20, 2010 02:56 PM    Msg. 7 of 11       
(players) is a parameter used in volume_test_objects. What noobyourmom said is correct; use:

(sleep_until (volume_test_objects trig1 (players)) 15)


doompig444
Joined: Mar 22, 2010

Mornië alantië


Posted: Jun 20, 2010 03:06 PM    Msg. 8 of 11       
Quote: --- Original message by: FtDSpartn

So it would be (sleep_until (volume_test_objects Trig1) (players) 0)))?
NE: I still havent fixed the problem where Sapien can't find my script,so it says successfully compiled.my script is in data/levels/test/infinity/scripts/ and my map is in
tags/levels/test/infinity/ , what could be the problem?
Edited by FtDSpartn on Jun 20, 2010 at 02:56 PM


Your script says "wait until (true or false for if there are players or not) = false".
You're saying when it returns FALSE that there are players in the trigger volume, the script will activate. In other words, it'll spawn wraiths or whatever if you ARE NOT in the trigger volume... Like, as soon as the level begins...

Use the stuff noobyourmom and gamma said.

That reminds me, why is it always a "15" at the end? Isn't that just how often the script checks is someone is inside? I'm surprised EVERYONE uses 15...


FtDSpartn
Joined: May 1, 2009

Verified AI.


Posted: Jun 20, 2010 03:08 PM    Msg. 9 of 11       
Ok,so I got that,but now when I compile my script it says compiled fine,but in-game,the script doesn't work,even if I type wake [script]. I have them all in the correct folders.
Script: data\levels\Patrickmaps\scripts
Level: tags\levels\Patrickmaps\


sierra117
Joined: Jan 10, 2008

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


Posted: Jun 20, 2010 06:13 PM    Msg. 10 of 11       
Quote: --- Original message by: doompig444
Quote: --- Original message by: FtDSpartn

So it would be (sleep_until (volume_test_objects Trig1) (players) 0)))?
NE: I still havent fixed the problem where Sapien can't find my script,so it says successfully compiled.my script is in data/levels/test/infinity/scripts/ and my map is in
tags/levels/test/infinity/ , what could be the problem?
Edited by FtDSpartn on Jun 20, 2010 at 02:56 PM


Your script says "wait until (true or false for if there are players or not) = false".
You're saying when it returns FALSE that there are players in the trigger volume, the script will activate. In other words, it'll spawn wraiths or whatever if you ARE NOT in the trigger volume... Like, as soon as the level begins...

Use the stuff noobyourmom and gamma said.

That reminds me, why is it always a "15" at the end? Isn't that just how often the script checks is someone is inside? I'm surprised EVERYONE uses 15...

I use 1 instead of 15. :C


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Jun 20, 2010 06:24 PM    Msg. 11 of 11       
15 means that the sleep_until condition would check every 15 ticks, which is every half a second. You don't have to waste CPU time checking every thirtieth of a second whether the condition had been met or not when things don't occur that fast.

 

 
Previous Older Thread    Next newer Thread







Time: Thu January 19, 2023 10:32 PM 188 ms.
A Halo Maps Website