PDA

View Full Version : Scripting Help



Jay2645
August 30th, 2007, 07:18 AM
Well, I'm trying to set up a vehicle boarding script, and I don't know what command to use to determine if a unit is within the specified world units of another unit.
Basically:

(script continuous hijack_Ghostie1
(if (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1))) true)
(if
(if (player_action_test_action) true)
(objects_attach ghostie1 "boarding_begin" (unit (list_get (players) 0)) "head")
(objects_detach ghostie1 (unit (list_get (players) 0)))
(object_cannot_take_damage Ghostie1)
(custom_animation (unit (list_get (players) 0)) characters\cyborg\cyborg ghost_boarding true)
(ai_renew (unit (vehicle_driver ghostie1)))
(ai_exit_vehicle (unit (vehicle_driver ghostie1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 0)))
(object_can_take_damage Ghostie1)
(player_action_test_reset)
)I have everything else set up to make it work, but I don't know what command (or string of commands) to use to determine if the unit is within range to board. Right now, I have it so if you press action at any point on the map if the AI is inside a vehicle, you teleport and board the vehicle, H2-style. I need to make it so that if you happen to be within, oh, 2 world units of that vehicle, you jump on the vehicle, kick the AI out, and get in.

Also, I'm still learning the ways of the scripts, so pardon my shoddy work. Clean it up for me if you can. =P

Ki11a_FTW
August 30th, 2007, 10:36 AM
mmmm.. i did mine totally different then that

Kornman00
August 30th, 2007, 11:50 AM
Last I checked, there is no such thing to test a condition like that on a dynamic object in Halo 1 (I think you can do something similar with a object and a flag though, I forget). I did it totally different as well, something that I think would be pretty straight forward in implementation and idea, but I guess its not that obvious to some. Good luck though

Jay2645
August 30th, 2007, 06:03 PM
I decided to go on a different approach then testing for action. I still need to do my animations and make a new seat on the vehicle where you can sit in the beginning of the board position, and then I have to redo my animations, but:

(script continuous hijack_Ghostie1
(if (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1)) true)
(if (vehicle_test_seat ghostie1 "begin boarding" (unit (list_get (players) 0)) true)
(object_cannot_take_damage Ghostie1)
(camera_set_dead (unit (list_get (players) 0)))
(custom_animation (unit (list_get (players) 0)) characters\cyborg\cyborg ghost_boarding true)
(ai_renew (unit (vehicle_driver ghostie1)))
(ai_exit_vehicle (unit (vehicle_driver ghostie1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 0)))
(Camera_control 0)
(object_can_take_damage Ghostie1)
)
That should work, correct me if I'm wrong.

Tarzan
August 30th, 2007, 06:38 PM
if I were going to try to develop something like this, I'd attach invisible tiny bipeds with 360 degree fields of vision to each player and vehicle. Then test the ability to board based on if the bipeds could see each other... but idk if that'd sync...

Jay2645
August 30th, 2007, 07:28 PM
Mine is for singleplayer, I can easily convert it to make it sync via a Warthog teleportation script.

Anyway, your theory wouldn't work too well, as it would make it so you can board any vehicle on the entire map, since the bipeds would not only be able to see each other up close, but they could see each other from far away.

Right now, here's my (unsyncing) multiplayer version of the script:

(global short plyrnum 0)

(script continuous increase_plyrnum
(begin
(set plyrnum (+ plyrnum 1))
)
)

(script continuous reset_plyrnum
(if
(= (> plyrnum 15) true)
(begin
(set plyrnum 0)
)
)
)

(script continuous hijack_Ghostie1_empty
(if (and (= (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1)) false) (if (vehicle_test_seat ghostie1 "begin boarding" (unit (list_get (players) plyrnum)) true))
(begin
(object_cannot_take_damage Ghostie1)
(camera_set_dead (unit (list_get (players) plyrnum))
(custom_animation (unit (list_get (players) plyrnum)) characters\cyborg\cyborg ghost_boarding true)
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) plyrnum)))
(Camera_control 0)
(object_can_take_damage Ghostie1)
)
)

(script continuous hijack_Ghostie1_full
(if (and (= (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1)) true) (if (vehicle_test_seat ghostie1 "begin boarding" (unit (list_get (players) plyrnum)) true))
(begin
(object_cannot_take_damage Ghostie1)
(camera_set_dead (unit (list_get (players) plyrnum)))
(custom_animation (unit (list_get (players) plyrnum)) characters\cyborg\cyborg ghost_boarding true)
(vehicle_unload (unit (vehicle_driver ghostie1)) "driver")
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) plyrnum)))
(Camera_control 0)
(object_can_take_damage Ghostie1)
)
)

Jay2645
August 31st, 2007, 07:07 AM
Sorry about the double post, but here's the final version of the script, you'll have to make your own animations and invisible vehicle, but here you go, this one WILL sync, there's no reason it shouldn't.

(script continous Jay_is_very_lazy
(object_create_anew board1)
)

(script continuous no_random_collision
(object_set_collideable board1 false)
)

(script continuous hijack_attaches
(objects_attach ghostie1 "frame hull" board1 "frame hull")
)

(script continuous hijack_Ghostie1_empty_player0
(if (and (= (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1)) false) (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 0)) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 0))
)
)

(script continuous hijack_Ghostie1_empty_player1
(if (and (= (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1)) false) (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 1)) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 1))
)
)

(script continuous hijack_Ghostie1_empty_player2
(if (and (= (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1)) false) (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 2)) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 2))
)
)

(script continuous hijack_Ghostie1_empty_player3
(if (and (= (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1)) false) (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 3)) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 3))
)
)

(script continuous hijack_Ghostie1_empty_player4
(if (and (= (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1)) false) (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 4)) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 4))
)
)

(script continuous hijack_Ghostie1_empty_player5
(if (and (= (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1)) false) (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 5)) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 5))
)
)

(script continuous hijack_Ghostie1_empty_player6
(if (and (= (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1)) false) (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 6)) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 6))
)
)

(script continuous hijack_Ghostie1_empty_player7
(if (and (= (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1)) false) (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 7)) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 7))
)
)

(script continuous hijack_Ghostie1_empty_player8
(if (and (= (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1)) false) (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 8)) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 8))
)
)

(script continuous hijack_Ghostie1_empty_player9
(if (and (= (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1)) false) (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 9)) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 9))
)
)

(script continuous hijack_Ghostie1_empty_player10
(if (and (= (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1)) false) (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 10)) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 10))
)
)

(script continuous hijack_Ghostie1_empty_player11
(if (and (= (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1)) false) (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 11)) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 11))
)
)

(script continuous hijack_Ghostie1_empty_player12
(if (and (= (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1)) false) (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 12)) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 12))
)
)

(script continuous hijack_Ghostie1_empty_player13
(if (and (= (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1)) false) (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 13)) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 13))
)
)

(script continuous hijack_Ghostie1_empty_player14
(if (and (= (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1)) false) (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 14)) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 14))
)
)

(script continuous hijack_Ghostie1_empty_player15
(if (and (= (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1)) false) (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 15)) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 15))
)
)

(script continuous hijack_Ghostie1_full_player0
(if (and (= (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1)) true) (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 0)) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(unit_exit_vehicle (unit (vehicle_driver ghostie1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 0)))
)
)

(script continuous hijack_Ghostie1_full_player1
(if (and (= (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1)) true) (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 1)) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(unit_exit_vehicle (unit (vehicle_driver ghostie1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 1)))
)
)

(script continuous hijack_Ghostie1_full_player2
(if (and (= (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1)) true) (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 2)) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(unit_exit_vehicle (unit (vehicle_driver ghostie1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 2)))
)
)

(script continuous hijack_Ghostie1_full_player3
(if (and (= (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1)) true) (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 3)) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(unit_exit_vehicle (unit (vehicle_driver ghostie1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 3)))
)
)

(script continuous hijack_Ghostie1_full_player4
(if (and (= (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1)) true) (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 4)) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(unit_exit_vehicle (unit (vehicle_driver ghostie1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 4)))
)
)

(script continuous hijack_Ghostie1_full_player5
(if (and (= (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1)) true) (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 5)) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(unit_exit_vehicle (unit (vehicle_driver ghostie1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 5)))
)
)

(script continuous hijack_Ghostie1_full_player6
(if (and (= (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1)) true) (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 6)) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(unit_exit_vehicle (unit (vehicle_driver ghostie1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 6)))
)
)

(script continuous hijack_Ghostie1_full_player7
(if (and (= (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1)) true) (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 7)) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(unit_exit_vehicle (unit (vehicle_driver ghostie1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 7)))
)
)

(script continuous hijack_Ghostie1_full_player8
(if (and (= (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1)) true) (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 8)) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(unit_exit_vehicle (unit (vehicle_driver ghostie1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 8)))
)
)

(script continuous hijack_Ghostie1_full_player9
(if (and (= (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1)) true) (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 9)) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(unit_exit_vehicle (unit (vehicle_driver ghostie1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 9)))
)
)

(script continuous hijack_Ghostie1_full_player10
(if (and (= (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1)) true) (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 10)) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(unit_exit_vehicle (unit (vehicle_driver ghostie1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 10)))
)
)

(script continuous hijack_Ghostie1_full_player11
(if (and (= (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1)) true) (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 11)) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(unit_exit_vehicle (unit (vehicle_driver ghostie1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 11)))
)
)

(script continuous hijack_Ghostie1_full_player12
(if (and (= (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1)) true) (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 12)) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(unit_exit_vehicle (unit (vehicle_driver ghostie1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 12)))
)
)

(script continuous hijack_Ghostie1_full_player13
(if (and (= (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1)) true) (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 13)) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(unit_exit_vehicle (unit (vehicle_driver ghostie1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 13)))
)
)

(script continuous hijack_Ghostie1_full_player14
(if (and (= (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1)) true) (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 14)) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(unit_exit_vehicle (unit (vehicle_driver ghostie1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 14)))
)
)

(script continuous hijack_Ghostie1_full_player15
(if (and (= (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1)) true) (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 15)) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(unit_exit_vehicle (unit (vehicle_driver ghostie1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 15)))
)
)Yes, all that is for 1 vehicle, BUT it works online.
Singleplayer:

(global short plyrnum 0)

(script continuous increase_plyrnum
(begin
(set plyrnum (+ plyrnum 1))
)
)

(script continuous reset_plyrnum
(if
(= (> plyrnum 15) true)
(begin
(set plyrnum 0)
)
)
)

(script continous Jay_is_very_lazy
(object_create_anew board1)
)

(script continuous no_random_collision
(object_set_collideable board1 false)
)

(script continuous hijack_attaches
(objects_attach ghostie1 "frame hull" board1 "frame hull"
)

(script continuous hijack_Ghostie1_empty
(if (and (= (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1)) false) (if (vehicle_test_seat board1 "driver" (unit (list_get (players) plyrnum)) true))
(begin
(object_cannot_take_damage Ghostie1)
(camera_set_dead (unit (list_get (players) 0)))
(unit_exit_vehicle (unit (vehicle_driver board1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) plyrnum)))
(Camera_control 0)
(object_can_take_damage Ghostie1)
)
)

(script continuous hijack_Ghostie1_full
(if (and (= (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1)) true) (if (vehicle_test_seat board1 "driver" (unit (list_get (players) plyrnum)) true))
(begin
(object_cannot_take_damage Ghostie1)
(camera_set_dead (unit (list_get (players) 0)))
(unit_exit_vehicle (unit (vehicle_driver board1)))
(ai_renew (unit (vehicle_driver ghostie1)))
(ai_exit_vehicle (unit (vehicle_driver ghostie1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) plyrnum)))
(Camera_control 0)
(object_can_take_damage Ghostie1)
)
)Much shorter and fancier, could have done without the plyrnums, but I wanted to use them anyway.
Instructions:
Make a boarding animation and a new vehicle. Give the vehicle something like, I don't know, a plane that is 1x1 as geometry, and use 2 nodes, 1 in the position you want MC to start on, and 1 on the same position as the frame hull of the vehicle you want to board. Name the former "driver" and the latter "frame hull". Make the Ghost boarding animation serve as the exit animation, and you're done!
Also, you will have to set it up for every vehicle you have in your map, as I'm not psychic and know how many vehicles you have.
If you use them, and do all the work required to get one ingame (Mostly 1 animation, but you want it to look good, right?), give me some credit. Thanks.

CtrlAltDestroy
August 31st, 2007, 09:40 AM
Flaws:

- You can't enter a child vehicle.
- You can "board" the vehicle even when it's unoccupied.

Jay2645
August 31st, 2007, 03:10 PM
1. By child vehicle, what do you mean? This uses a variation of the method used to allow more then one team in a vehicle.
2. I noticed that a while back, that is why I have this:

(script continuous hijack_Ghostie1_empty
(if (and (= (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1)) false) (if (vehicle_test_seat board1 "driver" (unit (list_get (players) plyrnum)) true))
(begin
(object_cannot_take_damage Ghostie1)
(camera_set_dead (unit (list_get (players) 0)))
(unit_exit_vehicle (unit (vehicle_driver board1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) plyrnum)))
(Camera_control 0)
(object_can_take_damage Ghostie1)
)
)

CtrlAltDestroy
August 31st, 2007, 03:20 PM
1. The child vehicle is the one that's being attached (to the parent).
2. That script is redundant. You can just remove the parent vehicle seat testing conditional and achieve the same effect. Either way, it would look odd boarding an empty vehicle.

Jay2645
August 31st, 2007, 03:25 PM
1. I could have sworn the multi-teams vehicle worked the same way. I'll look it up.
2. Look at it as a fancy way of getting in, like rolling over the hood of a car and jumping through the window instead of walking around, opening the door, and getting in that way.

CtrlAltDestroy
August 31st, 2007, 03:30 PM
1. You have to continuously attach and detach the child/parent vehicles in order for it to be "enterable". I've been thinking about a better way to execute it, but I'm still fooling around with it.
2. Still, your script is redundant.

Jay2645
August 31st, 2007, 04:49 PM
1. Ah, I see, thanks.
2. Check my avatar quote.

Also, I made a little hotfix, the script wasn't working in Sapien due to uneven parenthesis count, this one goes through fine, and has the Objects_attach and Objects_detach command CAD was just talking about. I'm still fixing the MP one, it's considerably longer then the SP one, so it may take a while.

Hotfix:

(global short plyrnum 0)

(script continuous increase_plyrnum
(begin
(set plyrnum (+ plyrnum 1))
)
)

(script continuous reset_plyrnum
(if
(= (> plyrnum 15) true)
(begin
(set plyrnum 0)
)
)
)

(script startup Jay_is_very_lazy
(object_create_anew board1)
)


(script continuous no_random_collision
(object_set_collideable board1 false)
)

(script continuous hijack_attaches
(objects_attach ghostie1 "frame hull" board1 "frame hull")
(objects_detach ghostie1 board1)
)

(script continuous hijack_Ghostie1_empty
(sleep_until (if (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1))) false))
(sleep_until (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 0))) true))
(begin
(object_cannot_take_damage Ghostie1)
(camera_set_dead (unit (list_get (players) 0)))
(unit_exit_vehicle (unit (vehicle_driver board1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) plyrnum)))
(Camera_control 0)
(object_can_take_damage Ghostie1)
)
)

(script continuous hijack_Ghostie1_full
(sleep_until (if (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1))) true))
(sleep_until (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 0))) true))
(begin
(object_cannot_take_damage Ghostie1)
(camera_set_dead (unit (list_get (players) 0)))
(unit_exit_vehicle (unit (vehicle_driver board1)))
(unit_exit_vehicle (unit (vehicle_driver ghostie1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) plyrnum)))
(Camera_control 0)
(object_can_take_damage Ghostie1)
)
)

Jay2645
September 3rd, 2007, 04:38 AM
Mind the bump and double post, but I have the multiplayer hotfix. I will update this with the board vehicle and animations so you no longer have to make them, unless you want to improve on my sucky animations.
Here's the hotfix:

(script startup Jay_is_very_lazy
(object_create_anew board1)
)


(script continuous no_random_collision
(object_set_collideable board1 false)
)

(script continuous hijack_attaches
(objects_attach ghostie1 "frame hull" board1 "frame hull")
(objects_detach ghostie1 board1)
)

(script continuous hijack_Ghostie1_empty_player0
(sleep_until (if (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1))) false))
(sleep_until (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 0))) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 0)))
)
)

(script continuous hijack_Ghostie1_full_player0
(sleep_until (if (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1))) true))
(sleep_until (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 0))) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(unit_exit_vehicle (unit (vehicle_driver ghostie1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 0)))
)
)

(script continuous hijack_Ghostie1_empty_player1
(sleep_until (if (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1))) false))
(sleep_until (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 1))) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 1)))
)
)

(script continuous hijack_Ghostie1_full_player1
(sleep_until (if (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1))) true))
(sleep_until (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 1))) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(unit_exit_vehicle (unit (vehicle_driver ghostie1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 1)))
)
)

(script continuous hijack_Ghostie1_empty_player2
(sleep_until (if (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1))) false))
(sleep_until (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 2))) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 2)))
)
)

(script continuous hijack_Ghostie1_full_player2
(sleep_until (if (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1))) true))
(sleep_until (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 2))) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(unit_exit_vehicle (unit (vehicle_driver ghostie1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 2)))
)
)

(script continuous hijack_Ghostie1_empty_player3
(sleep_until (if (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1))) false))
(sleep_until (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 3))) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 3)))
)
)

(script continuous hijack_Ghostie1_full_player3
(sleep_until (if (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1))) true))
(sleep_until (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 3))) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(unit_exit_vehicle (unit (vehicle_driver ghostie1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 3)))
)
)

(script continuous hijack_Ghostie1_empty_player4
(sleep_until (if (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1))) false))
(sleep_until (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 4))) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 4)))
)
)

(script continuous hijack_Ghostie1_full_player4
(sleep_until (if (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1))) true))
(sleep_until (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 4))) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(unit_exit_vehicle (unit (vehicle_driver ghostie1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 4)))
)
)

(script continuous hijack_Ghostie1_empty_player5
(sleep_until (if (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1))) false))
(sleep_until (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 5))) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 5)))
)
)

(script continuous hijack_Ghostie1_full_player5
(sleep_until (if (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1))) true))
(sleep_until (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 5))) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(unit_exit_vehicle (unit (vehicle_driver ghostie1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 5)))
)
)

(script continuous hijack_Ghostie1_empty_player6
(sleep_until (if (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1))) false))
(sleep_until (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 6))) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 6)))
)
)

(script continuous hijack_Ghostie1_full_player6
(sleep_until (if (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1))) true))
(sleep_until (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 6))) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(unit_exit_vehicle (unit (vehicle_driver ghostie1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 6)))
)
)

(script continuous hijack_Ghostie1_empty_player7
(sleep_until (if (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1))) false))
(sleep_until (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 7))) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 7)))
)
)

(script continuous hijack_Ghostie1_full_player7
(sleep_until (if (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1))) true))
(sleep_until (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 7))) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(unit_exit_vehicle (unit (vehicle_driver ghostie1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 7)))
)
)

(script continuous hijack_Ghostie1_empty_player8
(sleep_until (if (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1))) false))
(sleep_until (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 8))) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 8)))
)
)

(script continuous hijack_Ghostie1_full_player8
(sleep_until (if (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1))) true))
(sleep_until (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 8))) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(unit_exit_vehicle (unit (vehicle_driver ghostie1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 8)))
)
)

(script continuous hijack_Ghostie1_empty_player9
(sleep_until (if (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1))) false))
(sleep_until (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 9))) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 9)))
)
)

(script continuous hijack_Ghostie1_full_player9
(sleep_until (if (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1))) true))
(sleep_until (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 9))) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(unit_exit_vehicle (unit (vehicle_driver ghostie1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 9)))
)
)

(script continuous hijack_Ghostie1_empty_player10
(sleep_until (if (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1))) false))
(sleep_until (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 10))) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 10)))
)
)

(script continuous hijack_Ghostie1_full_player10
(sleep_until (if (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1))) true))
(sleep_until (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 10))) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(unit_exit_vehicle (unit (vehicle_driver ghostie1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 10)))
)
)

(script continuous hijack_Ghostie1_empty_player11
(sleep_until (if (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1))) false))
(sleep_until (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 11))) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 11)))
)
)

(script continuous hijack_Ghostie1_full_player11
(sleep_until (if (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1))) true))
(sleep_until (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 11))) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(unit_exit_vehicle (unit (vehicle_driver ghostie1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 11)))
)
)

(script continuous hijack_Ghostie1_empty_player12
(sleep_until (if (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1))) false))
(sleep_until (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 12))) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 12)))
)
)

(script continuous hijack_Ghostie1_full_player12
(sleep_until (if (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1))) true))
(sleep_until (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 12))) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(unit_exit_vehicle (unit (vehicle_driver ghostie1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 12)))
)
)

(script continuous hijack_Ghostie1_empty_player13
(sleep_until (if (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1))) false))
(sleep_until (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 13))) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 13)))
)
)

(script continuous hijack_Ghostie1_full_player13
(sleep_until (if (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1))) true))
(sleep_until (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 13))) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(unit_exit_vehicle (unit (vehicle_driver ghostie1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 13)))
)
)

(script continuous hijack_Ghostie1_empty_player14
(sleep_until (if (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1))) false))
(sleep_until (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 14))) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 14)))
)
)

(script continuous hijack_Ghostie1_full_player14
(sleep_until (if (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1))) true))
(sleep_until (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 14))) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(unit_exit_vehicle (unit (vehicle_driver ghostie1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 14)))
)
)

(script continuous hijack_Ghostie1_empty_player15
(sleep_until (if (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1))) false))
(sleep_until (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 15))) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 15)))
)
)

(script continuous hijack_Ghostie1_full_player15
(sleep_until (if (vehicle_test_seat ghostie1 "driver" (unit (vehicle_driver ghostie1))) true))
(sleep_until (if (vehicle_test_seat board1 "driver" (unit (list_get (players) 15))) true))
(begin
(unit_exit_vehicle (unit (vehicle_driver board1)))
(unit_exit_vehicle (unit (vehicle_driver ghostie1)))
(vehicle_load_magic ghostie1 "driver" (unit (list_get (players) 15)))
)
)