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 »scripting help

Author Topic: scripting help (9 messages, Page 1 of 1)
Moderators: Dennis

lordofblake
Joined: Jan 6, 2008

Nice Tongue


Posted: Apr 29, 2008 05:07 PM    Msg. 1 of 9       
Hi people. I am making a map when the chief starts in a pelican beeing driven by a AI. I made a script like this.

(script startup entervehicle
(vehicle_load_magic (unit(list(driver) (G-driver) (spk1)
(vehicle_load_magic (unit(list_get(player))0) (P-riderRF) (spk1)
)

It says that:
this left parenthesis is unmatched.: (vehicle_load magic (driver) (driver) (spk1)

04.29.08 16:53:21 this is not a valid function or script name.: driver) (G-driver) (spk1))
04.29.08 16:53:35 this is not a valid function or script name.: driver) (G-driver) (spk1))
04.29.08 16:53:44 this is not a valid function or script name.: driver) (driver) (spk1))
04.29.08 16:54:34 [Script line 6] this is not a valid function or script name.: driver) (G-driver) (spk1)

04.29.08 16:54:34 recompiling scripts after scenarios were merged.
04.29.08 16:54:34 this left parenthesis is unmatched.: (vehicle_load_magic (driver) (G-driver) (spk1)

04.29.08 16:56:26 [Script line 6] the "vehicle_load_magic" call requires exactly 3 arguments.: (vehicle_load_magic) (driver) (G-driver) (spk1)

04.29.08 16:56:26 recompiling scripts after scenarios were merged.
04.29.08 16:56:26 [Script line 5] this left parenthesis is unmatched.: (script startup entervehicle

04.29.08 16:56:37 [Script line 6] this is not a valid function or script name.: driver) (G-driver) (spk1)

04.29.08 16:56:37 recompiling scripts after scenarios were merged.
04.29.08 16:56:37 this left parenthesis is unmatched.: (vehicle_load_magic (driver) (G-driver) (spk1)

BTW driver is the AI encounter name and spk1 is the vehicle i want them to get into


Me KS
Joined: Feb 2, 2008

Desire is Reality. Xfire: jetmaster23


Posted: Apr 29, 2008 06:27 PM    Msg. 2 of 9       
I recommend reading some scripting tutorials on syntax. You don't use parentheses in arguments unless the argument is a function, and you misused "players" in the second line, as an AI encounter reference has nothing to do with players. Also, you reversed the arguments in the command. It's "<vehicle> <seat> <object_list>", not "<object_list> <seat> <vehicle>". You also don't need "unit", because the command's argument refers to an object or an object list.

So, here's that script fixed:

(script startup entervehicle
(vehicle_load_magic spk1 G-driver (ai_actors driver))
(vehicle_load_magic spk1 P-riderRF (players))
)


I used "ai_actors" because it converts an encounter into an object list, and that is the argument there. I also used "players" alone because the command accepts <object_list> so, assuming this is a single player map, it would be easier to write that in considering that there's only one player anyways.

On a side note, I think that from experience "vehicle_load_magic" actually uses the marker name for the seat, not the animation label. If it works fine as it is, then don't mind this, but if it doesn't, look for the marker names for the seats you want.


lordofblake
Joined: Jan 6, 2008

Nice Tongue


Posted: Apr 29, 2008 06:57 PM    Msg. 3 of 9       
i cant thank you enough. And BTW, its a multiplayer map. :)

P.S. Is it okay if I PM you about scripting?


Me KS
Joined: Feb 2, 2008

Desire is Reality. Xfire: jetmaster23


Posted: Apr 29, 2008 07:17 PM    Msg. 4 of 9       
Sure, you can. But, if it's a multiplayer map, then you might not want to use "(players)" because that would cause any players in the game to get loaded into the "P-riderRF" seat (or seats) of that pelican. Also, you should never use AI in a multiplayer map, because they don't sync.


lordofblake
Joined: Jan 6, 2008

Nice Tongue


Posted: Apr 29, 2008 08:52 PM    Msg. 5 of 9       
Well, im a pretty big noob. I tried doing single player stuff but i have a few problems.

1. I can't script very well(except for vehiclespawn and cutscenes.)
2. I dont know how to make my maps have single player menu interfaces
3. and i dont know how to make objectives or navpoints.
now I think you get why i dont like making single player maps


kirby_422
Joined: Jan 22, 2006

Apparently public enemy number 1?


Posted: Apr 29, 2008 10:12 PM    Msg. 6 of 9       
Quote: --- Original message by: ILLEGALLcheatsMAN
I understand, I can't figure out how bungie got all of the ai to run all of the animations without error in cutscenes.

(unit_set_emotion_animation <unit> <string>)
sets the emotion animation to be used for the given unit

(unit_set_emotion <unit> <short>)
sets a unit's facial expression (-1 is none, other values depend on unit)

(unit_custom_animation_at_frame <unit> <animation_graph> <string> <boolean> <short>)
starts a custom animation playing on a unit at a specific frame index(interpolates into animation if next to last parameter is TRUE)

using those together, you can manipulate a biped alot. so use sleeps to time it out, use the animation at frame to start at the exact part you want, ect. the emotion to look right, ect.


lordofblake
Joined: Jan 6, 2008

Nice Tongue


Posted: Apr 30, 2008 04:11 PM    Msg. 7 of 9       
Quote: --- Original message by: lordofblake
Well, im a pretty big noob. I tried doing single player stuff but i have a few problems.

1. I can't script very well(except for vehiclespawn and cutscenes.)
2. I dont know how to make my maps have single player menu interfaces
3. and i dont know how to make objectives or navpoints.
now I think you get why i dont like making single player maps


Can anyone help me with this


DarkZealot
Joined: Jan 1, 2008

Time management: 40% Xbox, 30% PC, 30% Skating


Posted: Apr 30, 2008 04:19 PM    Msg. 8 of 9       
2 is easy. You just set the .scenario file type to 'SOLO' in Guerilla (or Sapien).


lordofblake
Joined: Jan 6, 2008

Nice Tongue


Posted: Apr 30, 2008 04:26 PM    Msg. 9 of 9       
and 3? (ill work on my scripting)
Edited by lordofblake on Apr 30, 2008 at 04:28 PM
Edited by lordofblake on Apr 30, 2008 at 04:45 PM

 

 
Previous Older Thread    Next newer Thread







Time: Fri January 20, 2023 4:25 AM 110 ms.
A Halo Maps Website