
Polamee
Joined: Feb 25, 2008
MP2SPMT's founder
|
Posted: Feb 5, 2009 09:08 AM
Msg. 1 of 14
I have a couple of questuons to ask:
1) What do the four small buttons on the top left hand of the Sapien actually do?
2) What do fake starting positions do for AI?
3) Can someone give me the exact differences between startup, dormant, static, and stub scripts?
|
|
|

BeachParty clan
Joined: Oct 12, 2008
Sooo... You wanna switch to Red team huh?
|
Posted: Feb 5, 2009 01:59 PM
Msg. 2 of 14
There are alot of placeholders in Guerilla as you know, things like "DON'T USE", I guess those buttons didn't got a function aswell. I design my sites that way too, just make some useless stuff to fill them up for later use, as it's easier to develop that way. And also, the name FAKE start positions, I guess the name says it already, or anyways I couldn't get it to use for anything...
|
|
|

Ermac
Joined: Nov 24, 2006
Pops up from time to time
|
Posted: Feb 5, 2009 03:26 PM
Msg. 3 of 14
I have no idea what stubs do. Maybe Me KS can explain it.
Startup scripts run from the beginning, and only once.
Continuous scripts start at the beginning and loop.
Static scripts can be used to set something up to be called from the main script (as they often are used in the original campaign scripts).
Dormant scripts are sleeping, and are not awakened until called from another script using the (wake [script name]) command. Dormant scripts can ONLY be awakened once. Once it is done, it is done.
That roughly explains some of it. I know static scripts are actually a bit more complicated than I let on. Edited by drillinstructor on Feb 5, 2009 at 07:53 PM
|
|
|

Mythril
- Screenshot Guru -
Joined: Mar 29, 2008
Jeffrey Albert Waldo
|
Posted: Feb 5, 2009 03:35 PM
Msg. 4 of 14
DONT USE is used by flood to attack or something. There's a DONT USE filled in the flood biped with a damage_effect of their melee.
|
|
|

Me KS
Joined: Feb 2, 2008
Desire is Reality. Xfire: jetmaster23
|
Posted: Feb 5, 2009 10:39 PM
Msg. 5 of 14
Quote: --- Original message by: drillinstructor
I have no idea what stubs do. Maybe Me KS can explain it.
Startup scripts run from the beginning, and only once.
Continuous scripts start at the beginning and loop.
Static scripts can be used to set something up to be called from the main script (as they often are used in the original campaign scripts).
Dormant scripts are sleeping, and are not awakened until called from another script using the (wake [script name]) command. Dormant scripts can ONLY be awakened once. Once it is done, it is done.
That roughly explains some of it. I know static scripts are actually a bit more complicated than I let on.
Nope, no idea what stubs do. Although the Halo scripting bible says it's "sort of like a prototype". Still no idea. But you're right about the other types. And static scripts aren't as complicated as they seem. They're like self-made scripting commands. You can make your own command out of a static script's commands, so they're pretty useful. e.g:
(script static "void" replace_grunts (ai_kill grunts) (ai_place elites) )
(script static "void" replace_elites (ai_kill elites) (ai_place grunts) )
Whenever I want to replace the grunts with elites, instead of running two commands, I can just script in: (replace_grunts) And it will run the static script with no need for arguments or anything. Same for replacing elites with grunts: (replace_elites) Just as if the static scripts were commands. And unlike dormants, statics can be run as many times as needed. Edited by Me KS on Feb 6, 2009 at 04:03 PM
|
|
|

bobbysoon
Joined: Feb 1, 2007
|
Posted: Feb 6, 2009 04:16 AM
Msg. 6 of 14
Quote: --- Original message by: Me KS And it will run the static script with no need for arguments or anything. Do you know if it could take arguments? While we're at it, do you guys know about arrays? like #(1 2 3) ("Creates a vector (array) from a list of elements."). It wouldn't work for me. I think it could be useful when scripting with many vehicles, among other things. (Maybe i only tried in sapien) Edited by bobbysoon on Feb 6, 2009 at 04:23 AM
|
|
|

Ermac
Joined: Nov 24, 2006
Pops up from time to time
|
Posted: Feb 6, 2009 10:30 AM
Msg. 7 of 14
I don't think it can take arguments - but it can be configured so that it can be used as an argument for another command. Most common example is referring to players as units, but it can be used for a lot more than that.
As for the arrays... not too sure about that.
|
|
|

bobbysoon
Joined: Feb 1, 2007
|
Posted: Feb 6, 2009 06:41 PM
Msg. 8 of 14
Quote: --- Original message by: drillinstructor Most common example is referring to players as units, but it can be used for a lot more than that. Could you elaborate with some examples? Out of curiosity, of course :)
|
|
|

Ermac
Joined: Nov 24, 2006
Pops up from time to time
|
Posted: Feb 6, 2009 08:10 PM
Msg. 9 of 14
(script static "unit" player0 (unit (list_get (players) 0)) )
(script static "void" music_a30_03 (sound_looping_start "levels\a30\music\a30_03" none 1 ) (sleep_until (or play_music_a30_03_alt (not play_music_a30_03 ))1 global_delay_music ) (if play_music_a30_03_alt (begin (sound_looping_set_alternate "levels\a30\music\a30_03" true ) (sleep_until (not play_music_a30_03 )1 global_delay_music )(set play_music_a30_03_alt false ))) (set play_music_a30_03 false )(sound_looping_stop "levels\a30\music\a30_03" ))
(script dormant music_a30 (sleep_until play_music_a30_01 1 ) (music_a30_01 ) (sleep_until play_music_a30_02 1 ) (music_a30_02 ) (sleep_until play_music_a30_03 1 ) (music_a30_03 ) (sleep_until play_music_a30_04 1 ) (music_a30_04 ) (sleep_until play_music_a30_05 1 ) (music_a30_05 ) (sleep_until play_music_a30_06 1 ) (music_a30_06 ) (sleep_until play_music_a30_07 1 )(music_a30_07 )) Excerpts from a30's script. The first example was just me setting the script up to refer to the player as a unit. Say you wanted to check to see if player0 entered a vehicle. It would look like this: (script startup jets (sleep_until (= (or (vehicle_test_seat_list jet1 "scorpion-driver" (player0))(vehicle_test_seat_list jet2 "scorpion-driver" (player0)))true)15) ) Note the "player0" there. That is referring to player 1 in the campaign. I was able to do that because prior to writing that up, I used the first example. You can put anything after that and have it occur whenever you enter either one of the vehicles by the name of "jet1" and "jet2". I had some music play. You might choose differently. The second and third example are excerpts from a30's script, as noted above. The first one is ONE of the scripts they used to play one of the music tracks from that level. The second one is using what the first example did (along with a bunch of other scripts) to play the music; but as you can see, the script is dormant. That has no relevance to the functionality though; for any of the music tracks to play, you just type in something to this effect in the script: (set play_music_a30_03 1) The static script set it up so it would play. That saves you from typing the same command over and over if you want said music track to play more than once.
|
|
|

bobbysoon
Joined: Feb 1, 2007
|
Posted: Feb 8, 2009 03:04 PM
Msg. 10 of 14
thats pretty cool. I assume argument usage is typical, like this for iterating vehicles: (script static "unit" vehicles i (cond ((= i 0) (veh0)) ((= i 1) (veh1)) ((= i 2) (veh2)) ((= i 3) (veh3)) ((= i 4) (veh4)) ((= i 5) (veh5)) ((= i 6) (veh6)) ((= i 7) (veh7)) ) would that work?
|
|
|

Dragonmaster91
Joined: Jul 26, 2008
"Q, what nonsense is this?!"
|
Posted: Feb 8, 2009 05:04 PM
Msg. 11 of 14
I am guessing for a script to take a enemy out of a vehicle, and go in at the same time (taking over the vehicle), you would need to script the ai to get out, and then you get in...
|
|
|

vmt
Joined: Jan 29, 2008
|
Posted: Feb 8, 2009 05:52 PM
Msg. 12 of 14
why cant you use the ingame test button :( ?
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Feb 8, 2009 06:24 PM
Msg. 13 of 14
Why do you think?
Edit: Not an insult, just asking you why you think he didn't press the button Edited by Gamma927 on Feb 8, 2009 at 06:25 PM
|
|
|

Dragonmaster91
Joined: Jul 26, 2008
"Q, what nonsense is this?!"
|
Posted: Feb 8, 2009 06:58 PM
Msg. 14 of 14
I am guessing because that is not a real script?
|
|
|