• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Allyship HELP

Status
Not open for further replies.
Level 7
Joined
May 21, 2009
Messages
289
I need help with some allyship triggers
(example= make player 1 red treat player 2 blue as an ally with shared vision)

I know how to ally everyone in triggers like this but i dont want to waste hours on players 1-12 ally-ing, unally-ing, all ally-ing, and all unally-ing, that is at least 4 triggers for the way I do allyship triggers
I need a trigger like this---

EVENT
-<Player> types (-ally all) as an exact match
CONDITION
(I dont need one but if it makes the the trigger work)
ACTION
-player group
-------pick all players in player group and do actions
----------------make <player> treat <picked player> as an ally
----------------make <picked player> treat <player> as an ally

this works but i have to enter <player> as a <player 1, 2, ect.)

if anyone can help me with a trigger like this that doesnt require me to create a billion triggers I will +rep and it would help :thumbs_up:
 
Level 10
Joined
Jan 28, 2009
Messages
442
I think it can be done in two triggers, if I get you right.

FIRST TRIGGER
Events
Map initialization
Actions
Pick every player in (All Players) and do actions
Loop
Add Event((picked player) enters chat(all ally) as an exact match) to "TheOtherTrigger"

The other trigger:
Events
None (allready set by the previous trigger)
Actions
For each Integer A from 1 to Number of players in All players do
For each Integer B from 1 to Number of players in All players do
Make Player (Integer A) treat Player (Integer B) as an ally with shared vision
 
Level 13
Joined
Mar 4, 2009
Messages
1,156
maybe just
make player group player 1 red treat player group all players as an all with shared vision ?

btw you need to destroy any player groups accept (all players) or else it will leak

set=PLAYERGROUP = (Your group)
-----anything you want to do with the group------
Custom script:call DestroyForce(udg_PLAYERGROUP)
 
Status
Not open for further replies.
Top