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 over LAN?

Author Topic: Ai over LAN? (3 messages, Page 1 of 1)
Moderators: Dennis

xKRONNiKx
Joined: Nov 15, 2011

Turkey Farm.


Posted: Apr 29, 2012 09:09 PM    Msg. 1 of 3       
Hey, just wondering if Ai can sync over LAN. I know they wont sync online, but what about LAN?


YakZSmelk
Joined: Apr 3, 2006

- Environment Artist - robhow.com


Posted: Apr 29, 2012 09:21 PM    Msg. 2 of 3       
Lan and Internet are essentially the same thing, the reason AI can't sync is because it wasn't established in the source code of the game since online co-op wasn't part of Halo's original specs.

Since no one can add a server system for AI, it will not ever sync between two computers.


kirby_422
Joined: Jan 22, 2006

Apparently public enemy number 1?


Posted: Apr 29, 2012 09:38 PM    Msg. 3 of 3       
if you care about functionality over graphics, you can just attach and detach a vehicle to the AI, and have all projectiles controlled by the host.
You'll get this effect.


If you don't care about the large point, stop reading this post now. (This is why spoiler tags are great, people only see the stuff related to something IF they want to)



For projectiles, at the bottom of every weapon, in the trigger section, theres this box, "allow client-side projectiles" uncheck it, you want hosts to control it (So the host's AI projectiles are sent to clients) Alternitively, you can try (set allow_client_side_weapon_projectiles false) although I haven't tested whether that actually works, although it would universially do that if it does work.

For the AI, make the actual AI invisible. Make a vehicle, have its display model as the normal AI's model (the non-invisible copy) a brand new glass shader works for the invisiblitiy. If you place the AI as a biped and use ai_attach, follow this:
(script continuous blah
(if (> (unit_get_health YOURBIPED) 0) (begin
(objects_attach YOURBIPED "body" DISPLAYVEHICLE "body")
(objects_detach YOURBIPED DISPLAYVEHICLE)
(sleep 5)
) (begin
(object_teleport DISPLAYVEHICLE SOMEFLAG)
(sleep 900) ;;respawn every 30 seconds
(object_create_anew YOURBIPED)
))
)

someflag is just a flag placed under a rock or something (somewhere off screen) the sleep 5 controls how long between updates between the display and the actual AI.


If you're using an actual encounter:
(script continuous blah2
(objects_attach (list_get (ai_actors YOURENCOUNTER) 0) "body" DISPLAYVEHICLE "body")
(objects_detach (list_get (ai_actors YOURENCOUNTER) 0) DISPLAYVEHICLE)
(sleep 5)
)

have repeats of the middle section for each AI in the encounter, and unique display vehicles for each one. Respawning can work, but its not really best, as if you kill the enemy while its attached, it looses track of who ai0 is, and doesnt detach. Then that vehicle is gone, and your slowly dwindling out of display vehicles and you get enemies you can only see shots from. There is a few ways around this, but im keeping it simple for now.

 

 
Previous Older Thread    Next newer Thread







Time: Thu January 19, 2023 6:46 AM 453 ms.
A Halo Maps Website