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 »AI that can walk on walls, and switch between air/ground combat

Author Topic: AI that can walk on walls, and switch between air/ground combat (6 messages, Page 1 of 1)
Moderators: Dennis

JadeMcLain
Joined: Nov 13, 2018

Moved to JadeUndead


Posted: Dec 21, 2018 04:23 PM    Msg. 1 of 6       
This will be a better thread where I can post my progress.

If we check the flying bitmask in the actor tag, ground units can walk on walls. Flood infection forms can do this by default because they are set to a different type and other crap. Normally units that are not infection forms are not able to climb on walls, sometimes not even with the flying bitmask in the actor tag, but these units can, and they can fly when they get stuck.

I've abandoned using migration to make them land, instead using their attack/defend state. We make one encounter and can duplicate that for as many AI as we need, we can set these encounters to search and attack depending on eachother, making them like one encounter, but allowing units to individually go into searching state among other things.

This is an early test of my new system and I hope to iron everything out so we can have a new working feature.

https://www.youtube.com/watch?v=C47u3nEQ1Y4


(global boolean is_host false)
(global boolean is_dedicated false)


(script startup host_detector
(if (!= (unit_get_health hog1) -1)
(set is_host true)
)
(if (= (list_count (players)) 0)
(set is_dedicated true)
)
)

(script static unit player0 (unit (list_get (players) 0)))
(script static unit player1 (unit (list_get (players) 1)))
(script static unit player2 (unit (list_get (players) 2)))
(script static unit player3 (unit (list_get (players) 3)))
(script static unit player4 (unit (list_get (players) 4)))
(script static unit player5 (unit (list_get (players) 5)))
(script static unit player6 (unit (list_get (players) 6)))
(script static unit player7 (unit (list_get (players) 7)))
(script static unit player8 (unit (list_get (players) 8)))
(script static unit player9 (unit (list_get (players) 9)))
(script static unit player10 (unit (list_get (players) 10)))
(script static unit player11 (unit (list_get (players) 11)))
(script static unit player12 (unit (list_get (players) 12)))
(script static unit player13 (unit (list_get (players) 13)))
(script static unit player14 (unit (list_get (players) 14)))
(script static unit player15 (unit (list_get (players) 15)))

(global object_definition bug_fly_def "characters\bugger\bipeds\bug_fly")
(global object_definition bug_ground_def "characters\bugger\bipeds\bug_ground")

(script static unit g1_driver (vehicle_driver g1))
(script static unit g1_boarder (vehicle_driver g1))

(script startup startup_crap
(sleep 30)
(set allow_client_side_weapon_projectiles false)
(set cheat_bottomless_clip true)
(object_create g1)
(object_create g1b)
(object_pvs_set_camera cam1)
(ai_braindead red true)
(ai_braindead blue true)
(ai_force_active red true)
(ai_force_active blue true)
)

(global short index0 0)

(global unit DroneGroundEncounter (unit (list_get (ai_actors red_bug_ground_base0) 0)))
(global unit DroneAirEncounter (unit (list_get (ai_actors red_bug_fly_base0) 0)))

(global ai DroneGroundEncounterName "red_bug_ground_base0")
(global ai DroneAirEncounterName "red_bug_fly_base0")

;----------------------------------------------------------------------------------------------------------------------------------------------------------------------"update encounter name for ai status"
(script continuous SetDroneEncounter
(if (= 0 index0)
(begin
(set DroneGroundEncounterName "red_bug_ground_base0")
(set DroneAirEncounterName "red_bug_fly_base0")
(set DroneGroundEncounter (unit (list_get (ai_actors red_bug_ground_base0) 0)))
(set DroneAirEncounter (unit (list_get (ai_actors red_bug_fly_base0) 0)))
)
)

(if (= 1 index0)
(begin
(set DroneGroundEncounterName "red_bug_ground_base1")
(set DroneAirEncounterName "red_bug_fly_base1")
(set DroneGroundEncounter (unit (list_get (ai_actors red_bug_ground_base1) 0)))
(set DroneAirEncounter (unit (list_get (ai_actors red_bug_fly_base1) 0)))
)
)

(if (= 2 index0)
(begin
(set DroneGroundEncounterName "red_bug_ground_base2")
(set DroneAirEncounterName "red_bug_fly_base2")
(set DroneGroundEncounter (unit (list_get (ai_actors red_bug_ground_base2) 0)))
(set DroneAirEncounter (unit (list_get (ai_actors red_bug_fly_base2) 0)))
)
)

(if (= 3 index0)
(begin
(set DroneGroundEncounterName "red_bug_ground_base3")
(set DroneAirEncounterName "red_bug_fly_base3")
(set DroneGroundEncounter (unit (list_get (ai_actors red_bug_ground_base3) 0)))
(set DroneAirEncounter (unit (list_get (ai_actors red_bug_fly_base3) 0)))
)
)

(if (= 4 index0)
(begin
(set DroneGroundEncounterName "red_bug_ground_base4")
(set DroneAirEncounterName "red_bug_fly_base4")
(set DroneGroundEncounter (unit (list_get (ai_actors red_bug_ground_base4) 0)))
(set DroneAirEncounter (unit (list_get (ai_actors red_bug_fly_base4) 0)))
)
)

(if (= 5 index0)
(begin
(set DroneGroundEncounterName "red_bug_ground_base5")
(set DroneAirEncounterName "red_bug_fly_base5")
(set DroneGroundEncounter (unit (list_get (ai_actors red_bug_ground_base5) 0)))
(set DroneAirEncounter (unit (list_get (ai_actors red_bug_fly_base5) 0)))
)
)
)

;----------------------------------------------------------------------------------------------------------------------------------------------------------------------"update encounter name for ai status"
(script static "void" bug0a
(ai_command_list DroneGroundEncounterName jump)
(sleep 15)
(objects_attach DroneGroundEncounter "head" DroneAirEncounter "head")
(objects_detach DroneGroundEncounter DroneAirEncounter)

(ai_braindead DroneAirEncounterName false)

(object_teleport DroneGroundEncounter bugoff)

(ai_braindead DroneGroundEncounterName true)

(ai_set_current_state DroneAirEncounterName "search")
(ai_set_current_state DroneGroundEncounterName "none")

(ai_magically_see_players DroneAirEncounterName)
)

(script static "void" bug0b
(ai_attack DroneAirEncounterName)
(sleep 15)
(objects_attach DroneAirEncounter "head" DroneGroundEncounter "head")
(objects_detach DroneAirEncounter DroneGroundEncounter)

(ai_braindead DroneGroundEncounterName false)

(object_teleport DroneAirEncounter bugoff)

(ai_braindead DroneAirEncounterName true)

(ai_defend DroneAirEncounterName)

(ai_set_current_state DroneGroundEncounterName "search")
(ai_set_current_state DroneAirEncounterName "none")

(ai_magically_see_players DroneGroundEncounterName)

)

(script continuous bug0

(if (and (= (volume_test_objects highestpoint (players)) 1)
(!= (ai_status DroneAirEncounterName) 1)
)
(begin
(ai_attack DroneAirEncounterName)
(ai_command_list DroneAirEncounterName goup)
)
)

;----------------------------------------------------------------------------------------------------------------------------------------------------------------------"check health, respawn"
(if (= (unit_get_health DroneAirEncounter) 0)
(begin
(unit_doesnt_drop_items DroneGroundEncounter)
(unit_kill_silent DroneGroundEncounter)

)
)

(if (= (unit_get_health DroneGroundEncounter) 0)
(begin
(unit_kill_silent DroneAirEncounter)
)
)

;----------------------------------------------------------------------------------------------------------------------------------------------------------------------"check AI status for switching"
(if (and (= (ai_status DroneGroundEncounterName) 3)
(= (volume_test_objects bugoffvol DroneAirEncounter) 1)
)
(begin
(sleep 15)
(if (and (= (ai_status DroneGroundEncounterName) 3)
(= (volume_test_objects bugoffvol DroneAirEncounter) 1)
)
(begin
(bug0a)
)
)
)
)

(if (and (= (ai_status DroneGroundEncounterName) 4)
(= (volume_test_objects bugoffvol DroneAirEncounter) 1)
)
(begin
(sleep 15)
(if (and (= (ai_status DroneGroundEncounterName) 4)
(= (volume_test_objects bugoffvol DroneAirEncounter) 1)
)
(begin
(bug0a)
)
)
)
)


(if (and (= (ai_status DroneAirEncounterName) 6)
(= (volume_test_objects bugoffvol DroneGroundEncounter) 1)
)
(begin
(sleep 15)
(if (and (= (ai_status DroneAirEncounterName) 6)
(= (volume_test_objects bugoffvol DroneGroundEncounter) 1)
)
(begin
(bug0b)
)
)
)
)


(set index0 (+ index0 1))
(if (< 5 index0)
(set index0 0)
)

)





EDIT: Vid of them walking on the canyon walls, it looks really cool
https://youtu.be/rS28uOgk8so
https://www.youtube.com/watch?v=pChyrPuMrTk




Edited by JadeMcLain on Dec 21, 2018 at 07:27 PM
Edited by JadeMcLain on Dec 21, 2018 at 08:05 PM


DeadHamster
Joined: Jun 8, 2014

https://discord.gg/Neu4EJM


Posted: Dec 21, 2018 07:40 PM    Msg. 2 of 6       
I like it, looking much better and the walking on walls part is cool.

But I do think they fire too often. Curious how turning on "must crouch to shoot" would affect that.


JadeMcLain
Joined: Nov 13, 2018

Moved to JadeUndead


Posted: Dec 21, 2018 08:45 PM    Msg. 3 of 6       
Quote: --- Original message by: DeadHamster
I like it, looking much better and the walking on walls part is cool.

But I do think they fire too often. Curious how turning on "must crouch to shoot" would affect that.


Thanks! I could adjust their firing rates. Right now they start off slower like you would expect, but after a couple seconds of being tracked on you their burst firing thing kicks in that makes them fire that way.

I'm glad you think the walking on walls part is cool because I think its crazy awesome, I can plant encounters on the wall now. Normally this would be impossible unless you set them up in a very specific way like infection forms, and that would sacrifice most of their AI to be simple and unable to fire among other things.
Edited by JadeMcLain on Dec 21, 2018 at 08:45 PM


Pabeung
Joined: Dec 18, 2018

Oify


Posted: Dec 26, 2018 12:16 PM    Msg. 4 of 6       
Try that with the flood and I've already setup bipeds that has animations for wall climbing, the halo 2 one.


JadeMcLain
Joined: Nov 13, 2018

Moved to JadeUndead


Posted: Dec 27, 2018 06:52 PM    Msg. 5 of 6       
Quote: --- Original message by: Pabeung
Try that with the flood and I've already setup bipeds that has animations for wall climbing, the halo 2 one.


I've been working on that, but I don't have a way for them to detect when they are on walls right now. Maybe if there was a way to attach something it could only see at a certain angle.. I'm not sure but I want this working as much as anyone else here would. I think the flood climbing on stuff was scripted, I don't remember them ever going back to climb on stuff after they detached. I could set them up the way the buggers climb but it wouldn't look nearly as good.

I used trigger vols and bipeds to get the buggers perching on walls, but I abandoned that in favor of giving them the ability to just walk on walls and be able to fly on any surface. I was thinking of using trigger volumes but that would just suck with this flood climbing idea. I'm open to ideas.


DeadHamster
Joined: Jun 8, 2014

https://discord.gg/Neu4EJM


Posted: Feb 1, 2019 11:50 PM    Msg. 6 of 6       
Bump because Halomaps doesn't allow you to double post






Edited by DeadHamster on Feb 1, 2019 at 11:55 PM

 

 
Previous Older Thread    Next newer Thread







Time: Sun August 18, 2019 1:51 AM 218 ms.
A Halo Maps Website