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 »Strafe/Ascend/Descend for Flying Type Vehicles

Author Topic: Strafe/Ascend/Descend for Flying Type Vehicles (10 messages, Page 1 of 1)
Moderators: Dennis

EcoSurge
Joined: Apr 1, 2019


Posted: Apr 16, 2019 05:39 PM    Msg. 1 of 10       
Inspired by CMT's use of player_action_test for the Sparrowhawk, I have redone my last thread about strafing flying type vehicles. They can now move up and down. Press the space bar to make the vehicle ascend or descend, unit flashlight state toggles between ascend and descend. Like before this is using a flying type biped to allow strafing.


(script static unit redwasp0driver (vehicle_driver redwasp0))
(script static unit redwasp0vehdriver (vehicle_driver redwasp0veh))

(script static unit bluewasp0driver (vehicle_driver bluewasp0))
(script static unit bluewasp1driver (vehicle_driver bluewasp1))
(script static unit bluewasp2driver (vehicle_driver bluewasp2))
(script static unit bluewasp3driver (vehicle_driver bluewasp3))
(script static unit bluewasp4driver (vehicle_driver bluewasp4))
(script static unit bluewasp5driver (vehicle_driver bluewasp5))
(script static unit bluewasp6driver (vehicle_driver bluewasp6))
(script static unit bluewasp7driver (vehicle_driver bluewasp7))

(script startup startstuff
(set developer_mode 127)

(object_create redwasp0veh)

(ai_disregard redwasp0 1)

(ai_disregard bluewasp0 1)
(ai_disregard bluewasp1 1)
(ai_disregard bluewasp2 1)
(ai_disregard bluewasp3 1)
(ai_disregard bluewasp4 1)
(ai_disregard bluewasp5 1)
(ai_disregard bluewasp6 1)
(ai_disregard bluewasp7 1)

)

(script continuous wasp_gravity
(objects_attach redwasp0 "" redwasp0veh "")
(if (= (unit_get_health (redwasp0driver)) -1)
(begin
(objects_detach redwasp0 redwasp0veh)
(objects_attach redwasp0veh "" redwasp0 "")
(sleep_until (!= (unit_get_health (redwasp0driver)) -1))
(objects_detach redwasp0veh redwasp0)
(objects_attach redwasp0 "" redwasp0veh "")
)
)


)


(script continuous wasp_load
(if (!= (unit_get_health (redwasp0vehdriver)) -1)
(begin
(vehicle_load_magic redwasp0 "driver" (redwasp0vehdriver))
)
)


)

(script continuous wasp_updown
(if (and (!= (unit_get_health (redwasp0driver)) -1)
(= (unit_get_current_flashlight_state redwasp0) 0)
(= (player_action_test_jump) 1)

)
(begin
(object_data_set_real redwasp0 transitional_velocity z 0.3)
(player_action_test_reset)
)
)

(if (and (!= (unit_get_health (redwasp0driver)) -1)
(!= (unit_get_current_flashlight_state redwasp0) 0)
(= (player_action_test_jump) 1)

)
(begin
(object_data_set_real redwasp0 transitional_velocity z -0.3)
(player_action_test_reset)
)
)
)


Test map:
https://drive.google.com/open?id=1Cy6lBuz6RrFrwUechpSXqRzXvO9tvJA7

Use the wasp that spawns on the bridge, the others are not set up for gravity yet.

Vid:
https://youtu.be/9nWYha-egus

Edited by EcoSurge on Apr 16, 2019 at 06:37 PM


sparky
Joined: Jun 27, 2009

Dismissal of Truth leaves one to believe lies


Posted: Apr 19, 2019 09:20 AM    Msg. 2 of 10       
Thanks! One step closer to emulating behavior in PlanetSide 2 and other open-space flight simulator games like Vendetta Online.
https://planetside.fandom.com/wiki/Liberator
https://www.vendetta-online.com/manual/gam_flight.html

EDIT: In terms of game engine, you basically just added a feature that revises a desired constraint that was determined to be cool by attaching the camera to the model marker's location. https://www.youtube.com/watch?v=_ENjQvnEAJ8

It can apply to first-person and third-person views, as one could see by switching the vehicle's driver view between first and third person options.

Now maybe do a script that toggles between first person and third person views. Has that been done? Could it be done by overwriting the bitmask value in memory? Food for thought.
Edited by sparky on Apr 19, 2019 at 09:30 AM


EcoSurge
Joined: Apr 1, 2019


Posted: Apr 19, 2019 01:21 PM    Msg. 3 of 10       
Quote: --- Original message by: sparky

Thanks! One step closer to emulating behavior in PlanetSide 2 and other open-space flight simulator games like Vendetta Online.
https://planetside.fandom.com/wiki/Liberator
https://www.vendetta-online.com/manual/gam_flight.html

EDIT: In terms of game engine, you basically just added a feature that revises a desired constraint that was determined to be cool by attaching the camera to the model marker's location. https://www.youtube.com/watch?v=_ENjQvnEAJ8

It can apply to first-person and third-person views, as one could see by switching the vehicle's driver view between first and third person options.

Now maybe do a script that toggles between first person and third person views. Has that been done? Could it be done by overwriting the bitmask value in memory? Food for thought.
Edited by sparky on Apr 19, 2019 at 09:30 AM


Glad you are showing interest. Tried my hand at it.


(if (and (!= (unit_get_health (redwasp0driver)) -1)
(= (player_action_test_zoom) 1)
)
(begin
(camera_set_first_person (player0))
(camera_control 1)
(player_action_test_reset)
(sleep_until (= (player_action_test_zoom) 1))
(camera_control 0)
(player_action_test_reset)
)
)


Edit: you would also check if the driver exists, and if they dont then we set the camera back to normal

Vid:
https://youtu.be/cxWDpLvMN_8
Edited by EcoSurge on Apr 19, 2019 at 01:32 PM


DeadHamster
Joined: Jun 8, 2014


Posted: Apr 19, 2019 02:57 PM    Msg. 4 of 10       
Is there any way to give that vehicle physics when you're riding it?


EcoSurge
Joined: Apr 1, 2019


Posted: Apr 19, 2019 04:22 PM    Msg. 5 of 10       
Quote: --- Original message by: DeadHamster
Is there any way to give that vehicle physics when you're riding it?


I've tried before but it didnt work out. Hopefully I can think of something and I'm always open to ideas.


Masters1337
Joined: Mar 5, 2006

halonaminator's unfortunate idol


Posted: Apr 19, 2019 08:29 PM    Msg. 6 of 10       
So I have to look into this and what we did in more detail, but how does this differ than our implementation of the sparrow hawk? I was never happy with how that turned out but we just ran out of time to further refine what we were doing, so I am very happy to see someone improve these types of things.


EcoSurge
Joined: Apr 1, 2019


Posted: Apr 20, 2019 12:28 PM    Msg. 7 of 10       
Quote: --- Original message by: Masters1337
So I have to look into this and what we did in more detail, but how does this differ than our implementation of the sparrow hawk? I was never happy with how that turned out but we just ran out of time to further refine what we were doing, so I am very happy to see someone improve these types of things.


I saw that your script used player_action_test and I messed around with that. This doesn't use any devices, and is more simple.

We attach the flying biped to the vehicle at all times until the vehicle driver exists. When the vehicle driver exists, we magically load that unit into the flying biped, detach that biped from the vehicle and then attach the vehicle to it. The script sleeps until the flying biped driver no longer exists. When that happens the vehicle is detached from that biped, and that biped is attached to the vehicle.

This allows the flying biped to have physics when the driver doesn't exist (exiting that biped will make it fall, stuff can interact with it).

The second part of the script runs when the biped driver exists. It uses player_action_test_jump. When the player presses down the space bar, the script adds velocity to the biped and then uses player_action_test_reset. If the player holds down space then it will continuously add velocity to the biped.

Edit: On another note, I'm thinking about making dropships and other stuff like that into flying bipeds. That might be tremendously easier than using recorded/custom animations, and you have more flexibility with how they can behave.
Edited by EcoSurge on Apr 20, 2019 at 12:37 PM


DeadHamster
Joined: Jun 8, 2014


Posted: Apr 20, 2019 06:38 PM    Msg. 8 of 10       
Does the biped have a physics tag referenced? Can bipeds use physics?


sparky
Joined: Jun 27, 2009

Dismissal of Truth leaves one to believe lies


Posted: Apr 21, 2019 08:47 AM    Msg. 9 of 10       
Biped ground-related physics are stored inside the .biped tag in undocumented metadata between the "camera, collision, and auto-aim" section and the "contact points" section, if I remember correctly. The rest is either configured using bitmask flags or other metadata visible in the .biped tag or simply hardcoded into the game engine.
Edited by sparky on Apr 21, 2019 at 08:49 AM


Masters1337
Joined: Mar 5, 2006

halonaminator's unfortunate idol


Posted: Apr 21, 2019 10:41 PM    Msg. 10 of 10       
Quote: --- Original message by: EcoSurge

Quote: --- Original message by: Masters1337
So I have to look into this and what we did in more detail, but how does this differ than our implementation of the sparrow hawk? I was never happy with how that turned out but we just ran out of time to further refine what we were doing, so I am very happy to see someone improve these types of things.


I saw that your script used player_action_test and I messed around with that. This doesn't use any devices, and is more simple.

We attach the flying biped to the vehicle at all times until the vehicle driver exists. When the vehicle driver exists, we magically load that unit into the flying biped, detach that biped from the vehicle and then attach the vehicle to it. The script sleeps until the flying biped driver no longer exists. When that happens the vehicle is detached from that biped, and that biped is attached to the vehicle.

This allows the flying biped to have physics when the driver doesn't exist (exiting that biped will make it fall, stuff can interact with it).

The second part of the script runs when the biped driver exists. It uses player_action_test_jump. When the player presses down the space bar, the script adds velocity to the biped and then uses player_action_test_reset. If the player holds down space then it will continuously add velocity to the biped.

Edit: On another note, I'm thinking about making dropships and other stuff like that into flying bipeds. That might be tremendously easier than using recorded/custom animations, and you have more flexibility with how they can behave.
Edited by EcoSurge on Apr 20, 2019 at 12:37 PM


We used device machines with it in order to avoid weirdness with having to enter 2 seats, but iirc we also had an issue with the 2 objects colliding with eachother and causing damage to the biped. Either way, we are both using transitional velocity applied to the biped, which causes the weird jittery movements.

I forget a lot of the exact reasoning we did things the way we did with the hawk, as it was almost 2 years ago we did it but I will later take a look of adapting some of this stuff to ours. Feel free to message me on discord some time, would love to pick your brain on some of this. Or if you'd be willing to mess with our hawk yourself, it would be much appreciated.

 

 
Previous Older Thread    Next newer Thread







Time: Fri May 24, 2019 6:04 AM 453 ms.
A Halo Maps Website