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 help

Author Topic: script help (5 messages, Page 1 of 1)
Moderators: Dennis

KouRyuu
Joined: Jul 9, 2009

U.S. Marines. 'nuff said.


Posted: Jul 13, 2009 06:28 PM    Msg. 1 of 5       
hello. yes, i have been given a script (thanks to gamma!) that should allow me to have marines or whatever actor exit a vehicle (in this case a pelican) on the 'q' button press.

(script continuous empty
(begin
(if (and (= (unit_get_current_flashlight_state testing_vehicle) true)
(vehicle_test_seat testing_vehicle "" (unit (list_get (ai_actors Marines) 1))))
(begin

(vehicle_unload testing_vehicle "")
(unit_enter_vehicle (unit (list_get (ai_actors Marines) "")) testing_vehicle "")
(unit_set_desired_flashlight_state testing_vehicle false)
)
)))


now the only problem is NOTHING HAPPENS! what is wrong? i've looked through the scripting bible to get some sense into me before i looked at this again, but i am still confused...


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Jul 13, 2009 09:57 PM    Msg. 2 of 5       
Did you name your vehicle "testing_vehicle", and the marine encounter "Marines"?

E: What the heck? You want to check the flashlight state of the vehicle? Change it to (unit (list_get (players) 0))
Edited by Gamma927 on Jul 13, 2009 at 09:58 PM


KouRyuu
Joined: Jul 9, 2009

U.S. Marines. 'nuff said.


Posted: Jul 13, 2009 11:07 PM    Msg. 3 of 5       
yes i did.

um.. well when it's dark :P

when i try to do that. get_current.... or set_desired? i think the first.

ok. when i tried it, nothing happened, again.

(script continuous empty
(begin
(if (and (= (unit_get_current_flashlight_state (unit (list_get (players) 0))) true)
(vehicle_test_seat testing_vehicle "" (unit (list_get (ai_actors Marines) 1))))
(begin

(vehicle_unload testing_vehicle "")
(unit_enter_vehicle (unit (list_get (ai_actors Marines) "")) testing_vehicle "")
(unit_set_desired_flashlight_state testing_vehicle false)
)
)))

Edited by KouRyuu on Jul 13, 2009 at 11:16 PM


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Jul 13, 2009 11:40 PM    Msg. 4 of 5       
Both. After reading the script again, you've completely butchered it, for lack of a better phrase. Here's what I sent you, with the blanks properly filled out.

(script continuous empty
(begin
(if (and (= (unit_get_current_flashlight_state (unit (list_get (players) 0))) true)
(vehicle_test_seat testing_vehicle "" (unit (list_get (players) 0)))
(begin
(vehicle_unload testing_vehicle "")
(unit_enter_vehicle (unit (list_get (players) 0)) testing_vehicle "")
(unit_set_desired_flashlight_state (unit (list_get (players) 0)) false)
)))


Here's how it works.
ASSUMING that the AI are already in the vehicle, and the player is too, pressing the flashlight button will make EVERYONE exit the vehicle. As soon as that happens, the player will ENTER the vehicle, but the AI will not.


KouRyuu
Joined: Jul 9, 2009

U.S. Marines. 'nuff said.


Posted: Jul 14, 2009 01:59 AM    Msg. 5 of 5       
uhh.... it still didn't work... maybe it's the vehicle tag?

so.... does anyone know?
Edited by KouRyuu on Jul 16, 2009 at 01:28 PM

Very Late edit: Should the term 'players' be related to the AI? that may be the problem with the script. i just decided to wait a year for a response from anyone haha. all is well, thanks for the help gamma.
Edited by KouRyuu on Jul 19, 2010 at 08:31 PM

 

 
Previous Older Thread    Next newer Thread







Time: Thu January 19, 2023 7:11 PM 125 ms.
A Halo Maps Website