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 »can this be done?

Author Topic: can this be done? (3 messages, Page 1 of 1)
Moderators: Dennis

Guilty_spark
Joined: Dec 8, 2011

enjoy my bright, blue, balls!


Posted: Jun 25, 2012 01:58 AM    Msg. 1 of 3       
is it possible to make it so that a elite can pull out a energy sword when you get to close to him while already wielding a plasma rifle like in halo 2?


UnevenElefant5
Joined: May 3, 2008

its been fun yall, i'll never forget this site :')


Posted: Jun 25, 2012 03:06 AM    Msg. 2 of 3       
You could do it through permutations I believe.
(object_set_permutation ELITE "right arm" SWORDPERM)
but I don't think AI encounters count as objects. I think you can use ai_attach to attach an encounter to a biped or something similar, so you could have a biped, attach the PR AI, then wait for the trigger, then detach the PR AI, change the perm, and attach the sword AI.

Scripting never was my strong point and it's been a while so I could be wrong.


kirby_422
Joined: Jan 22, 2006

Apparently public enemy number 1?


Posted: Jun 25, 2012 03:43 PM    Msg. 3 of 3       
you can use encounters as objects, but all that will do is appearance. If you actually want them to change to other weapon, your best option would be OS (because first, you want the distance to them. Next of all, the weapon changing)

(script startup blah
(sleep_until (and (< (objects_distance_to_object (players) (unit (list_get (ai_actors YourEncounter) 0))) 3) (objects_can_see_object (ai_actors YourEncounter (unit (list_get (players) 0)) 90)) 10)
(unit_data_set_integer (unit (list_get (ai_actors YourEncounter) 0)) current_weapon_index 1)
(ai_berserk YourEncounter 1)
)


Without OS, you would need AI that act as a volume trigger to see when your in range, and you would actually have to replace the AI to get one with a sword.

 

 
Previous Older Thread    Next newer Thread







Time: Thu January 19, 2023 6:13 PM 125 ms.
A Halo Maps Website