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 Technical / Map Design »AI Team Allegiance Scripting Issue

Author Topic: AI Team Allegiance Scripting Issue (3 messages, Page 1 of 1)
Moderators: Dennis

SquishyPon3
Joined: Jul 6, 2021


Posted: Jul 6, 2021 05:27 PM    Msg. 1 of 3       
I have been attempting to set up some simple encounters but I have been having trouble with setting the allegiance through script.


(script startup basicsript
(ai_allegiance player human)
(fade_in 0 0 0 200)
(ai_disregard (players) true)
)


Here is what I have set up. I added the fade to debug and confirm it works. The script compiles correctly in sapien and indeed the screen does fade. My problem though is the allegiance does not seem to work neither from human / player. As a test case I tried human / covenant and that did not work either (these teams are correctly set in their respective "encounters" as far as I can tell). Additionally as another debug bit I tried the ai_disregard command but it seemed the ai would still fight the player. Could it be that changes with the MCC version in multiplayer maps has changed something about the relationships or am I missing something super simple?

If you have any insight I would love the help!


Piano
Joined: Jun 23, 2021


Posted: Aug 3, 2021 01:07 AM    Msg. 2 of 3       
Quote: --- Original message by: SquishyPon3
I have been attempting to set up some simple encounters but I have been having trouble with setting the allegiance through script.


(script startup basicsript
(ai_allegiance player human)
(fade_in 0 0 0 200)
(ai_disregard (players) true)
)


Here is what I have set up. I added the fade to debug and confirm it works. The script compiles correctly in sapien and indeed the screen does fade. My problem though is the allegiance does not seem to work neither from human / player. As a test case I tried human / covenant and that did not work either (these teams are correctly set in their respective "encounters" as far as I can tell). Additionally as another debug bit I tried the ai_disregard command but it seemed the ai would still fight the player. Could it be that changes with the MCC version in multiplayer maps has changed something about the relationships or am I missing something super simple?

If you have any insight I would love the help!


Make sure you are actually referencing the player. The campaign scripts all do this.
(script static unit player0 (unit (list_get (players) 0)))
Needs to be at the top of your script.

Then you can apply that to the player.
(ai_disregard (player0) true)


Ermac
Joined: Nov 24, 2006

Pops up from time to time


Posted: Aug 8, 2021 02:45 PM    Msg. 3 of 3       
Quote: --- Original message by: SquishyPon3
I have been attempting to set up some simple encounters but I have been having trouble with setting the allegiance through script.


(script startup basicsript
(ai_allegiance player human)
(fade_in 0 0 0 200)
(ai_disregard (players) true)
)


Here is what I have set up. I added the fade to debug and confirm it works. The script compiles correctly in sapien and indeed the screen does fade. My problem though is the allegiance does not seem to work neither from human / player. As a test case I tried human / covenant and that did not work either (these teams are correctly set in their respective "encounters" as far as I can tell). Additionally as another debug bit I tried the ai_disregard command but it seemed the ai would still fight the player. Could it be that changes with the MCC version in multiplayer maps has changed something about the relationships or am I missing something super simple?

If you have any insight I would love the help!


If I remember correctly, allegiance scripts do not work in multiplayer.

 

 
Previous Older Thread    Next newer Thread







Time: Wed January 18, 2023 11:36 PM 94 ms.
A Halo Maps Website