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 General Discussion »Script to open spirit with fliashlight?

Author Topic: Script to open spirit with fliashlight? (18 messages, Page 1 of 1)
Moderators: Dennis

Officer egg
Joined: Mar 16, 2008

Dancing is forbidden.


Posted: Nov 16, 2009 03:56 PM    Msg. 1 of 18       
I've asked this before, but I failed to save the script this long. What is the script for opening a spirits cargo doors with the flashlight as the driver? OR the right trigger. That's what happens with the mythos...


Koo294
Joined: Nov 30, 2008

How is she when she doesn't surf?


Posted: Nov 16, 2009 03:59 PM    Msg. 2 of 18       
there's no script for crouch/right button. you just need to use functions and animations. If you give me the spirit (is it the one in apocalypse hugass?) then i could do that for ya.


Officer egg
Joined: Mar 16, 2008

Dancing is forbidden.


Posted: Nov 16, 2009 04:04 PM    Msg. 3 of 18       
Yah, it's the one from apocalypsehugeass. I looked in the Mythos functions, but didn't see anything relating to the door.


Koo294
Joined: Nov 30, 2008

How is she when she doesn't surf?


Posted: Nov 16, 2009 04:15 PM    Msg. 4 of 18       
it'd be in the weapon of it. erm, so do you have xfire or shall i post a link on the forum?


Officer egg
Joined: Mar 16, 2008

Dancing is forbidden.


Posted: Nov 16, 2009 04:47 PM    Msg. 5 of 18       
Post a link, if that'd be fine. :D


lordofblake
Joined: Jan 6, 2008

Nice Tongue


Posted: Nov 16, 2009 06:13 PM    Msg. 6 of 18       
If you want a script that would open the spirits door when you are in it and you press flashlight, then heres one. I would make it that you can only enter the vehicle if the doors were open, make it work with more than one spirit, and with more than one player, but..... :effort

Havent scripted in awhile, tell me if im "rusty"

(Script continuous canopener
(if
(and
(= (vehicle_test_seat "driver?" (unit (list_get (players)0))))
(= (unit_get_current_flashlight_state (unit (list_get (players)0)))1)
)
(begin
(unit_set_desired_flashlight_state (unit (list_get (players)0))0)
(unit_open )
)
)
)

Might be right, might be wrong. either way, ill wait for Gamma.
Edited by lordofblake on Nov 16, 2009 at 06:15 PM


Officer egg
Joined: Mar 16, 2008

Dancing is forbidden.


Posted: Nov 16, 2009 07:49 PM    Msg. 7 of 18       
Thanks, all:D


Polamee
Joined: Feb 25, 2008

MP2SPMT's founder


Posted: Nov 18, 2009 01:16 AM    Msg. 8 of 18       
Quote: --- Original message by: lordofblake

If you want a script that would open the spirits door when you are in it and you press flashlight, then heres one. I would make it that you can only enter the vehicle if the doors were open, make it work with more than one spirit, and with more than one player, but..... :effort

Havent scripted in awhile, tell me if im "rusty"

(Script continuous canopener
(if
(and
(= (vehicle_test_seat "driver?" (unit (list_get (players)0))))
(= (unit_get_current_flashlight_state (unit (list_get (players)0)))1)
)
(begin
(unit_set_desired_flashlight_state (unit (list_get (players)0))0)
(unit_open )
)
)
)

Might be right, might be wrong. either way, ill wait for Gamma.
Edited by lordofblake on Nov 16, 2009 at 06:15 PM


This script won't work for multiple reasons:

1) Gah, I hate seeing people use (unit (list_get (players) 0 )) for MP scripts.

Getting the 0th player in a list does not work in Multiplayer. Instead, you need to have a variable which constantly adds one to itself until it reaches 15, then resets to 0. This will refer to all the players at once in less than a second if you substitute the '0' in the command with the variable, effectively finding out if any of the 15 players are in the vehicle.

Such a script would look like this:

(global short x 0)

(script continuous plyrnum
(if
(= x 15)
(begin
(set x 0)
(begin
(set x (+ x 1))
)))

2) If the above method is used, it'll be a little chaotic, since the unit_get_current_flashlight state command will probably look for another player's flashlight.

3) The doors can't close. You'll need another continuous script, triggered only when a player uses the above script to open a door, to detect when the player's flashlihght is off and will promptly close the doors.

4) The unit_set_desired_flashlight state command is unneeded and confusing, because of the fact that you can't close the doors as explained in 3.


Marka Haiyana
Joined: Mar 24, 2009

w0rt


Posted: Nov 18, 2009 01:58 AM    Msg. 9 of 18       
Many games use scripting as a necessity for good modding. Halo is an exception because of the tag system.

For the most part, scripting looks like lines and letters and numbers, but after working with it users get used to it.


lordofblake
Joined: Jan 6, 2008

Nice Tongue


Posted: Nov 18, 2009 06:50 AM    Msg. 10 of 18       
Quote: --- Original message by: Polamee
Quote: --- Original message by: lordofblake

If you want a script that would open the spirits door when you are in it and you press flashlight, then heres one. I would make it that you can only enter the vehicle if the doors were open, make it work with more than one spirit, and with more than one player, but..... :effort

Havent scripted in awhile, tell me if im "rusty"

(Script continuous canopener
(if
(and
(= (vehicle_test_seat "driver?" (unit (list_get (players)0))))
(= (unit_get_current_flashlight_state (unit (list_get (players)0)))1)
)
(begin
(unit_set_desired_flashlight_state (unit (list_get (players)0))0)
(unit_open )
)
)
)

Might be right, might be wrong. either way, ill wait for Gamma.
Edited by lordofblake on Nov 16, 2009 at 06:15 PM


This script won't work for multiple reasons:

1) Gah, I hate seeing people use (unit (list_get (players) 0 )) for MP scripts.

Getting the 0th player in a list does not work in Multiplayer. Instead, you need to have a variable which constantly adds one to itself until it reaches 15, then resets to 0. This will refer to all the players at once in less than a second if you substitute the '0' in the command with the variable, effectively finding out if any of the 15 players are in the vehicle.

Such a script would look like this:

(global short x 0)

(script continuous plyrnum
(if
(= x 15)
(begin
(set x 0)
(begin
(set x (+ x 1))
)))

2) If the above method is used, it'll be a little chaotic, since the unit_get_current_flashlight state command will probably look for another player's flashlight.

3) The doors can't close. You'll need another continuous script, triggered only when a player uses the above script to open a door, to detect when the player's flashlihght is off and will promptly close the doors.

4) The unit_set_desired_flashlight state command is unneeded and confusing, because of the fact that you can't close the doors as explained in 3.


Ummm, dude. I whipped that up in a minute. If you want me to make a full script i will. It was a sample for officer egg to show him the basis on how it would work. Not fully functional. When i come home from school, ill right a fully functional script. I even said that i didnt want to spend a tremendous amount of effort. And btw, your number 2) is wrong. you have to be in the driver seat to open the doors.
Edited by lordofblake on Nov 18, 2009 at 06:52 AM
Edited by lordofblake on Nov 18, 2009 at 06:53 AM


Polamee
Joined: Feb 25, 2008

MP2SPMT's founder


Posted: Nov 18, 2009 07:33 AM    Msg. 11 of 18       
Quote: --- Original message by: lordofblake

Quote: --- Original message by: Polamee
Quote: --- Original message by: lordofblake

If you want a script that would open the spirits door when you are in it and you press flashlight, then heres one. I would make it that you can only enter the vehicle if the doors were open, make it work with more than one spirit, and with more than one player, but..... :effort

Havent scripted in awhile, tell me if im "rusty"

(Script continuous canopener
(if
(and
(= (vehicle_test_seat "driver?" (unit (list_get (players)0))))
(= (unit_get_current_flashlight_state (unit (list_get (players)0)))1)
)
(begin
(unit_set_desired_flashlight_state (unit (list_get (players)0))0)
(unit_open )
)
)
)

Might be right, might be wrong. either way, ill wait for Gamma.
Edited by lordofblake on Nov 16, 2009 at 06:15 PM


This script won't work for multiple reasons:

1) Gah, I hate seeing people use (unit (list_get (players) 0 )) for MP scripts.

Getting the 0th player in a list does not work in Multiplayer. Instead, you need to have a variable which constantly adds one to itself until it reaches 15, then resets to 0. This will refer to all the players at once in less than a second if you substitute the '0' in the command with the variable, effectively finding out if any of the 15 players are in the vehicle.

Such a script would look like this:

(global short x 0)

(script continuous plyrnum
(if
(= x 15)
(begin
(set x 0)
(begin
(set x (+ x 1))
)))

2) If the above method is used, it'll be a little chaotic, since the unit_get_current_flashlight state command will probably look for another player's flashlight.

3) The doors can't close. You'll need another continuous script, triggered only when a player uses the above script to open a door, to detect when the player's flashlihght is off and will promptly close the doors.

4) The unit_set_desired_flashlight state command is unneeded and confusing, because of the fact that you can't close the doors as explained in 3.


Ummm, dude. I whipped that up in a minute. If you want me to make a full script i will. It was a sample for officer egg to show him the basis on how it would work. Not fully functional. When i come home from school, ill right a fully functional script. I even said that i didnt want to spend a tremendous amount of effort. And btw, your number 2) is wrong. you have to be in the driver seat to open the doors.
Edited by lordofblake on Nov 18, 2009 at 06:52 AM
Edited by lordofblake on Nov 18, 2009 at 06:53 AM


No. You've completely misinterpreted what Iw as trying to say.

What I was saying is, if I used the variable method, the changing variable x would probably have changed between the commands. So the only way to do it is somehow to stop the variable once the player is in the driver seat and allow the flashlight to be referenced to THAT particular player.


lordofblake
Joined: Jan 6, 2008

Nice Tongue


Posted: Nov 18, 2009 12:48 PM    Msg. 12 of 18       
Quote: --- Original message by: Polamee
Quote: --- Original message by: lordofblake

Quote: --- Original message by: Polamee
Quote: --- Original message by: lordofblake

If you want a script that would open the spirits door when you are in it and you press flashlight, then heres one. I would make it that you can only enter the vehicle if the doors were open, make it work with more than one spirit, and with more than one player, but..... :effort

Havent scripted in awhile, tell me if im "rusty"

(Script continuous canopener
(if
(and
(= (vehicle_test_seat "driver?" (unit (list_get (players)0))))
(= (unit_get_current_flashlight_state (unit (list_get (players)0)))1)
)
(begin
(unit_set_desired_flashlight_state (unit (list_get (players)0))0)
(unit_open )
)
)
)

Might be right, might be wrong. either way, ill wait for Gamma.
Edited by lordofblake on Nov 16, 2009 at 06:15 PM


This script won't work for multiple reasons:

1) Gah, I hate seeing people use (unit (list_get (players) 0 )) for MP scripts.

Getting the 0th player in a list does not work in Multiplayer. Instead, you need to have a variable which constantly adds one to itself until it reaches 15, then resets to 0. This will refer to all the players at once in less than a second if you substitute the '0' in the command with the variable, effectively finding out if any of the 15 players are in the vehicle.

Such a script would look like this:

(global short x 0)

(script continuous plyrnum
(if
(= x 15)
(begin
(set x 0)
(begin
(set x (+ x 1))
)))

2) If the above method is used, it'll be a little chaotic, since the unit_get_current_flashlight state command will probably look for another player's flashlight.

3) The doors can't close. You'll need another continuous script, triggered only when a player uses the above script to open a door, to detect when the player's flashlihght is off and will promptly close the doors.

4) The unit_set_desired_flashlight state command is unneeded and confusing, because of the fact that you can't close the doors as explained in 3.


Ummm, dude. I whipped that up in a minute. If you want me to make a full script i will. It was a sample for officer egg to show him the basis on how it would work. Not fully functional. When i come home from school, ill right a fully functional script. I even said that i didnt want to spend a tremendous amount of effort. And btw, your number 2) is wrong. you have to be in the driver seat to open the doors.
Edited by lordofblake on Nov 18, 2009 at 06:52 AM
Edited by lordofblake on Nov 18, 2009 at 06:53 AM


No. You've completely misinterpreted what Iw as trying to say.

What I was saying is, if I used the variable method, the changing variable x would probably have changed between the commands. So the only way to do it is somehow to stop the variable once the player is in the driver seat and allow the flashlight to be referenced to THAT particular player.


Ahhhhh, i see. That would pose a problem. I will come up with a solution. I just got home from school and im a bit tired. Ill post back when i have a script that will work. It probably wont use the variable method.
Edited by lordofblake on Nov 18, 2009 at 12:50 PM


Koo294
Joined: Nov 30, 2008

How is she when she doesn't surf?


Posted: Nov 18, 2009 12:57 PM    Msg. 13 of 18       
er, the script which lodex posted was the solution.


lordofblake
Joined: Jan 6, 2008

Nice Tongue


Posted: Nov 18, 2009 01:28 PM    Msg. 14 of 18       
Quote: --- Original message by: Koo294
er, the script which lodex posted was the solution.


Lodex never posted anything here.


Koo294
Joined: Nov 30, 2008

How is she when she doesn't surf?


Posted: Nov 18, 2009 02:26 PM    Msg. 15 of 18       
sorry, i meant polamee. Dont know what made me say that.


lordofblake
Joined: Jan 6, 2008

Nice Tongue


Posted: Nov 18, 2009 05:05 PM    Msg. 16 of 18       
Quote: --- Original message by: Koo294
sorry, i meant polamee. Dont know what made me say that.


Loop wouldnt work. Its not the solution.


Polamee
Joined: Feb 25, 2008

MP2SPMT's founder


Posted: Nov 19, 2009 12:46 AM    Msg. 17 of 18       
Perhaps making a sepearate script for each of the 16 players?


lordofblake
Joined: Jan 6, 2008

Nice Tongue


Posted: Nov 19, 2009 01:29 PM    Msg. 18 of 18       
Quote: --- Original message by: Polamee
Perhaps making a sepearate script for each of the 16 players?


Yes. Big script but it would be ideal.


EDIT: I made a script. You will need two spirits. One named "spirit_blue" and another named "spirit_red" Without the quotes. The spirits will need a drivers seat named "pilot", no quotes, and has to be enterable by players. What the script does: Spawns two spirits and opens their doors. Waits for the pilots seat to be occupied by a player and his flashlight to be off. Once it detects that, it closes the doors and makes it so that no one can enter the vehicle. If the flashlight is on, it will open the doors, etc. This script hasnt been tested, so dont whine if it doesnt work. It also works with all 16 players.

Enjoy!!!

(global short "plyrnum" 0)

(script continuous redspirit_player0
(if
(and
(= (vehicle_test_seat spirit_red "pilot" (unit (list_get (players)0))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)0)))0)
)
(begin
(unit_close spirit_red)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))0)
)
)

(if
(and
(= (vehicle_test_seat spirit_red "pilot" (unit (list_get (players)0))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)0)))1)
)
(begin
(unit_open spirit_red)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))1)
)
)
)

(script continuous redspirit_player1
(if
(and
(= (vehicle_test_seat spirit_red "pilot" (unit (list_get (players)1))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)1)))0)
)
(begin
(unit_close spirit_red)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))0)
)
)

(if
(and
(= (vehicle_test_seat spirit_red "pilot" (unit (list_get (players)1))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)1)))1)
)
(begin
(unit_open spirit_red)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))1)
)
)
)

(script continuous redspirit_player2
(if
(and
(= (vehicle_test_seat spirit_red "pilot" (unit (list_get (players)2))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)2)))0)
)
(begin
(unit_close spirit_red)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))0)
)
)

(if
(and
(= (vehicle_test_seat spirit_red "pilot" (unit (list_get (players)2))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)2)))1)
)
(begin
(unit_open spirit_red)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))1)
)
)
)

(script continuous redspirit_player3
(if
(and
(= (vehicle_test_seat spirit_red "pilot" (unit (list_get (players)3))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)3)))0)
)
(begin
(unit_close spirit_red)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))0)
)
)

(if
(and
(= (vehicle_test_seat spirit_red "pilot" (unit (list_get (players)3))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)3)))1)
)
(begin
(unit_open spirit_red)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))1)
)
)
)

(script continuous redspirit_player4
(if
(and
(= (vehicle_test_seat spirit_red "pilot" (unit (list_get (players)4))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)4)))0)
)
(begin
(unit_close spirit_red)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))0)
)
)

(if
(and
(= (vehicle_test_seat spirit_red "pilot" (unit (list_get (players)4))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)4)))1)
)
(begin
(unit_open spirit_red)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))1)
)
)
)

(script continuous redspirit_player5
(if
(and
(= (vehicle_test_seat spirit_red "pilot" (unit (list_get (players)5))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)5)))0)
)
(begin
(unit_close spirit_red)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))0)
)
)

(if
(and
(= (vehicle_test_seat spirit_red "pilot" (unit (list_get (players)5))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)5)))1)
)
(begin
(unit_open spirit_red)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))1)
)
)
)

(script continuous redspirit_player6
(if
(and
(= (vehicle_test_seat spirit_red "pilot" (unit (list_get (players)6))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)6)))0)
)
(begin
(unit_close spirit_red)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))0)
)
)

(if
(and
(= (vehicle_test_seat spirit_red "pilot" (unit (list_get (players)6))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)6)))1)
)
(begin
(unit_open spirit_red)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))1)
)
)
)

(script continuous redspirit_player7
(if
(and
(= (vehicle_test_seat spirit_red "pilot" (unit (list_get (players)7))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)7)))0)
)
(begin
(unit_close spirit_red)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))0)
)
)

(if
(and
(= (vehicle_test_seat spirit_red "pilot" (unit (list_get (players)7))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)7)))1)
)
(begin
(unit_open spirit_red)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))1)
)
)
)

(script continuous redspirit_player8
(if
(and
(= (vehicle_test_seat spirit_red "pilot" (unit (list_get (players)8))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)8)))0)
)
(begin
(unit_close spirit_red)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))0)
)
)

(if
(and
(= (vehicle_test_seat spirit_red "pilot" (unit (list_get (players)8))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)8)))1)
)
(begin
(unit_open spirit_red)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))1)
)
)
)

(script continuous redspirit_player9
(if
(and
(= (vehicle_test_seat spirit_red "pilot" (unit (list_get (players)9))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)9)))0)
)
(begin
(unit_close spirit_red)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))0)
)
)

(if
(and
(= (vehicle_test_seat spirit_red "pilot" (unit (list_get (players)9))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)9)))1)
)
(begin
(unit_open spirit_red)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))1)
)
)
)

(script continuous redspirit_player10
(if
(and
(= (vehicle_test_seat spirit_red "pilot" (unit (list_get (players)10))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)10)))0)
)
(begin
(unit_close spirit_red)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))0)
)
)

(if
(and
(= (vehicle_test_seat spirit_red "pilot" (unit (list_get (players)10))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)10)))1)
)
(begin
(unit_open spirit_red)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))1)
)
)
)

(script continuous redspirit_player11
(if
(and
(= (vehicle_test_seat spirit_red "pilot" (unit (list_get (players)11))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)11)))0)
)
(begin
(unit_close spirit_red)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))0)
)
)

(if
(and
(= (vehicle_test_seat spirit_red "pilot" (unit (list_get (players)11))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)11)))1)
)
(begin
(unit_open spirit_red)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))1)
)
)
)

(script continuous redspirit_player12
(if
(and
(= (vehicle_test_seat spirit_red "pilot" (unit (list_get (players)12))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)12)))0)
)
(begin
(unit_close spirit_red)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))0)
)
)

(if
(and
(= (vehicle_test_seat spirit_red "pilot" (unit (list_get (players)12))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)12)))1)
)
(begin
(unit_open spirit_red)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))1)
)
)
)

(script continuous redspirit_player13
(if
(and
(= (vehicle_test_seat spirit_red "pilot" (unit (list_get (players)13))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)13)))0)
)
(begin
(unit_close spirit_red)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))0)
)
)

(if
(and
(= (vehicle_test_seat spirit_red "pilot" (unit (list_get (players)13))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)13)))1)
)
(begin
(unit_open spirit_red)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))1)
)
)
)

(script continuous redspirit_player14
(if
(and
(= (vehicle_test_seat spirit_red "pilot" (unit (list_get (players)14))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)14)))0)
)
(begin
(unit_close spirit_red)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))0)
)
)

(if
(and
(= (vehicle_test_seat spirit_red "pilot" (unit (list_get (players)14))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)14)))1)
)
(begin
(unit_open spirit_red)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))1)
)
)
)

(script continuous redspirit_player15
(if
(and
(= (vehicle_test_seat spirit_red "pilot" (unit (list_get (players)15))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)15)))0)
)
(begin
(unit_close spirit_red)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))0)
)
)

(if
(and
(= (vehicle_test_seat spirit_red "pilot" (unit (list_get (players)15))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)15)))1)
)
(begin
(unit_open spirit_red)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))1)
)
)
)

(script continuous bluespirit_player0
(if
(and
(= (vehicle_test_seat spirit_blue "pilot" (unit (list_get (players)0))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)0)))0)
)
(begin
(unit_close spirit_red)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))0)
)
)

(if
(and
(= (vehicle_test_seat spirit_blue "pilot" (unit (list_get (players)0))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)0)))1)
)
(begin
(unit_open spirit_blue)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))1)
)
)
)

(script continuous bluespirit_player1
(if
(and
(= (vehicle_test_seat spirit_blue "pilot" (unit (list_get (players)1))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)1)))0)
)
(begin
(unit_close spirit_blue)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))0)
)
)

(if
(and
(= (vehicle_test_seat spirit_blue "pilot" (unit (list_get (players)1))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)1)))1)
)
(begin
(unit_open spirit_blue)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))1)
)
)
)

(script continuous bluespirit_player2
(if
(and
(= (vehicle_test_seat spirit_blue "pilot" (unit (list_get (players)2))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)2)))0)
)
(begin
(unit_close spirit_blue)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))0)
)
)

(if
(and
(= (vehicle_test_seat spirit_blue "pilot" (unit (list_get (players)2))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)2)))1)
)
(begin
(unit_open spirit_blue)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))1)
)
)
)

(script continuous bluespirit_player3
(if
(and
(= (vehicle_test_seat spirit_blue "pilot" (unit (list_get (players)3))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)3)))0)
)
(begin
(unit_close spirit_blue)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))0)
)
)

(if
(and
(= (vehicle_test_seat spirit_blue "pilot" (unit (list_get (players)3))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)3)))1)
)
(begin
(unit_open spirit_blue)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))1)
)
)
)

(script continuous bluespirit_player4
(if
(and
(= (vehicle_test_seat spirit_blue "pilot" (unit (list_get (players)4))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)4)))0)
)
(begin
(unit_close spirit_blue)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))0)
)
)

(if
(and
(= (vehicle_test_seat spirit_blue "pilot" (unit (list_get (players)4))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)4)))1)
)
(begin
(unit_open spirit_blue)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))1)
)
)
)

(script continuous bluespirit_player5
(if
(and
(= (vehicle_test_seat spirit_blue "pilot" (unit (list_get (players)5))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)5)))0)
)
(begin
(unit_close spirit_blue)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))0)
)
)

(if
(and
(= (vehicle_test_seat spirit_blue "pilot" (unit (list_get (players)5))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)5)))1)
)
(begin
(unit_open spirit_blue)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))1)
)
)
)

(script continuous bluespirit_player6
(if
(and
(= (vehicle_test_seat spirit_blue "pilot" (unit (list_get (players)6))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)6)))0)
)
(begin
(unit_close spirit_blue)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))0)
)
)

(if
(and
(= (vehicle_test_seat spirit_blue "pilot" (unit (list_get (players)6))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)6)))1)
)
(begin
(unit_open spirit_blue)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))1)
)
)
)

(script continuous bluespirit_player7
(if
(and
(= (vehicle_test_seat spirit_blue "pilot" (unit (list_get (players)7))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)7)))0)
)
(begin
(unit_close spirit_blue)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))0)
)
)

(if
(and
(= (vehicle_test_seat spirit_blue "pilot" (unit (list_get (players)7))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)7)))1)
)
(begin
(unit_open spirit_blue)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))1)
)
)
)

(script continuous bluespirit_player8
(if
(and
(= (vehicle_test_seat spirit_blue "pilot" (unit (list_get (players)8))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)8)))0)
)
(begin
(unit_close spirit_blue)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))0)
)
)

(if
(and
(= (vehicle_test_seat spirit_blue "pilot" (unit (list_get (players)8))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)8)))1)
)
(begin
(unit_open spirit_blue)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))1)
)
)
)

(script continuous bluespirit_player9
(if
(and
(= (vehicle_test_seat spirit_blue "pilot" (unit (list_get (players)9))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)9)))0)
)
(begin
(unit_close spirit_blue)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))0)
)
)

(if
(and
(= (vehicle_test_seat spirit_blue "pilot" (unit (list_get (players)9))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)9)))1)
)
(begin
(unit_open spirit_blue)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))1)
)
)
)

(script continuous bluespirit_player10
(if
(and
(= (vehicle_test_seat spirit_blue "pilot" (unit (list_get (players)10))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)10)))0)
)
(begin
(unit_close spirit_blue)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))0)
)
)

(if
(and
(= (vehicle_test_seat spirit_blue "pilot" (unit (list_get (players)10))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)10)))1)
)
(begin
(unit_open spirit_blue)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))1)
)
)
)

(script continuous bluespirit_player11
(if
(and
(= (vehicle_test_seat spirit_blue "pilot" (unit (list_get (players)11))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)11)))0)
)
(begin
(unit_close spirit_blue)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))0)
)
)

(if
(and
(= (vehicle_test_seat spirit_blue "pilot" (unit (list_get (players)11))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)11)))1)
)
(begin
(unit_open spirit_blue)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))1)
)
)
)

(script continuous bluespirit_player12
(if
(and
(= (vehicle_test_seat spirit_blue "pilot" (unit (list_get (players)12))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)12)))0)
)
(begin
(unit_close spirit_blue)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))0)
)
)

(if
(and
(= (vehicle_test_seat spirit_blue "pilot" (unit (list_get (players)12))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)12)))1)
)
(begin
(unit_open spirit_blue)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))1)
)
)
)

(script continuous bluespirit_player13
(if
(and
(= (vehicle_test_seat spirit_blue "pilot" (unit (list_get (players)13))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)13)))0)
)
(begin
(unit_close spirit_blue)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))0)
)
)

(if
(and
(= (vehicle_test_seat spirit_blue "pilot" (unit (list_get (players)13))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)13)))1)
)
(begin
(unit_open spirit_blue)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))1)
)
)
)

(script continuous bluespirit_player14
(if
(and
(= (vehicle_test_seat spirit_blue "pilot" (unit (list_get (players)14))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)14)))0)
)
(begin
(unit_close spirit_blue)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))0)
)
)

(if
(and
(= (vehicle_test_seat spirit_blue "pilot" (unit (list_get (players)14))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)14)))1)
)
(begin
(unit_open spirit_blue)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))1)
)
)
)

(script continuous bluespirit_player15
(if
(and
(= (vehicle_test_seat spirit_blue "pilot" (unit (list_get (players)15))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)15)))0)
)
(begin
(unit_close spirit_blue)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))0)
)
)

(if
(and
(= (vehicle_test_seat spirit_blue "pilot" (unit (list_get (players)15))) 1)
(= (unit_get_current_flashlight_state (unit (list_get (players)15)))1)
)
(begin
(unit_open spirit_blue)
(unit_set_enterable_by_player (unit (list_get (players)plyrnum))1)
)
)
)


(script continuous player_number
(if
(= plyrnum 15)
(begin
(set plyrnum 0)
)
(begin
(set plyrnum (+ plyrnum 1))
)
)
)

(script startup spirit_setup
(object_create_anew spirit_red)
(object_create_anew spirit_blue)
(unit_open spirit_red)
(unit_open spirit_blue)
)

Edited by lordofblake on Nov 19, 2009 at 10:37 PM

 

 
Previous Older Thread    Next newer Thread







Time: Thu January 19, 2023 6:18 PM 157 ms.
A Halo Maps Website