
Delicon20
Joined: Oct 3, 2008
Still here. Still loves bacon
|
Posted: Apr 16, 2011 02:45 PM
Msg. 1 of 13
hey, I'm trying to learn to script (yeah I completely forgot)
so uh, what is wrong with this script?
(Script dormant rebels (sleep_until (volume_test_objects trigger1 (players ))1 ) (ai_place rebels_scripted ))
it won't work ingame and I tried consulting scripting tutorials but in all honesty nobody here knows how to make a tutorial that doesn't cause horrible damage to the average brain when trying to comprehend what the tutorial is saying.
|
|
|

The Cereal Killer
Joined: Mar 18, 2011
Scripts, AI, cutscenes, ui_widgets, animation.
|
Posted: Apr 16, 2011 05:40 PM
Msg. 2 of 13
So you want it to wait until you hit a trigger volume and then spawn some guys? The script in its current state would have to be woken before it even started waiting for you to hit the trigger volume, because it's set to "dormant." Set it to "startup" or put a command to wake it in a previous script.
|
|
|

Delicon20
Joined: Oct 3, 2008
Still here. Still loves bacon
|
Posted: Apr 16, 2011 06:29 PM
Msg. 3 of 13
I put startup, didn't work either
|
|
|

The Cereal Killer
Joined: Mar 18, 2011
Scripts, AI, cutscenes, ui_widgets, animation.
|
Posted: Apr 16, 2011 07:27 PM
Msg. 4 of 13
Try replacing your sleep_until command with this:
(sleep_until (= (volume_test_object trigger1 (unit (list_get (players) 0))) true))
|
|
|

Muscl3r
Joined: May 22, 2010
dont pray 4 easy lives...pray to be STRONGER MEN
|
Posted: Apr 16, 2011 09:02 PM
Msg. 5 of 13
Did you compile the scripts correctly?
Also check that your trigger volume is nice and wide so theres no chance the script will miss the player going through it (happened to me a lot in my early days)
|
|
|

The Cereal Killer
Joined: Mar 18, 2011
Scripts, AI, cutscenes, ui_widgets, animation.
|
Posted: Apr 16, 2011 10:12 PM
Msg. 6 of 13
Quote: --- Original message by: Muscl3r Also check that your trigger volume is nice and wide so theres no chance the script will miss the player going through it (happened to me a lot in my early days) Yes, be sure to do that as well.
|
|
|

Muscl3r
Joined: May 22, 2010
dont pray 4 easy lives...pray to be STRONGER MEN
|
Posted: Apr 17, 2011 01:41 AM
Msg. 7 of 13
(sleep_until (volume_test_objects (players)) 15)
That is the same on one line, so its not shorter at all lol
|
|
|

Muscl3r
Joined: May 22, 2010
dont pray 4 easy lives...pray to be STRONGER MEN
|
Posted: Apr 17, 2011 04:04 AM
Msg. 8 of 13
:P
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Apr 17, 2011 11:27 AM
Msg. 9 of 13
Quote: --- Original message by: Muscl3r (sleep_until (volume_test_objects (players)) 15)
That is the same on one line, so its not shorter at all lol Nor does it work. No trigger volume is specified in the volume_test_objects command. It does, however, remove the (= true) clause, which is perfectly fine. If the (= true) clause is omitted, the compiler automatically assumes that you're intending it to check for truth. The 15 can also be omitted; it merely represents how often the script checks for the condition. (sleep_until (volume_test_objects TRIGGERVOLUME (players)))
|
|
|

The Cereal Killer
Joined: Mar 18, 2011
Scripts, AI, cutscenes, ui_widgets, animation.
|
Posted: Apr 17, 2011 12:38 PM
Msg. 10 of 13
The reason I told him to switch to the other one was just to be specifically sure that it wasn't causing any problems. And actually, I think it is a good idea to leave the 15 at the end, I cannot tell you how many times I've walked straight through a volume with nothing happening because it's too slow at detecting.
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Apr 17, 2011 01:14 PM
Msg. 11 of 13
15 ticks would be half a second. If nothing is specified, it's instantaneous. The original Halo CE campaign doesn't specify any ticks.
|
|
|

The Cereal Killer
Joined: Mar 18, 2011
Scripts, AI, cutscenes, ui_widgets, animation.
|
Posted: Apr 17, 2011 03:11 PM
Msg. 12 of 13
Quote: --- Original message by: Gamma927 15 ticks would be half a second. If nothing is specified, it's instantaneous. No if nothing is specified, it checks once per second :P Says it in the hs_doc. Edited by The Cereal Killer on Apr 17, 2011 at 03:23 PM
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Apr 17, 2011 05:11 PM
Msg. 13 of 13
So it does. My apologies.
|
|
|