• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] need help (Occupational Takeover Trigger)

Status
Not open for further replies.
Level 7
Joined
Oct 6, 2006
Messages
293
K trying to figure out a trigger that responds in way where all military units and buildings that can attack are destroyed and when they all are give ownership to the attacker.
I made something similar but on singleplayer level on on preset buildings but wouldnt work for newer buildings made.

Maybe something that picks all structures inside a region and then take picked units and give ownership to attacker somehow if u can think of a way to recognize the attacker or just have. *player types -Take Over then integer check of all military units of type -blank-, then pick all structures or something and give ownership to player that typed the msg?

Wish i could do types msg -take over / if all units of type -blank- = 0 / then pick all structures in region and give ownership to player.
 
Last edited:
Level 22
Joined
Feb 4, 2005
Messages
3,971
I'd say use 3 players - one is the attacker, the second is neutral-passive (change the color of that player to make it look like a player) of the attacked, and the third is the attacked itself. Say that the attacked loses all buildings - you can do it with integer or boolean dont remember -
(OR if you don't wanna use another player just make a region, map initialization the owner to be set to neutral passive, change colour)
C: number of buildings by player (2 say that is the attacked)
C: food of player 2 less than 1 (integer comparison condition trigger). These are the conditions. (Event may be 'every 0.5 seconds of game time', I don't remember an event for destroyed things)

Actions :
Pick every unit in units owned by player Netraul passive and Change onwership of (picked unit) to player 1 (attacking unit)
Turn off this trigger, to prevent something happening again. There must be an event for that but I don't remember otherwise use this event.
 
Level 7
Joined
Oct 6, 2006
Messages
293
Hmm

Thanx for the thought intake TheTerran. It seems like a tricky trigger to accomplish. But its absolutely necessary for my map in taking over planets.
Just trying to figure out when the last of a certain unit dies of another player in a region it picks all structures in region and gives to the player attacker.
 
Status
Not open for further replies.
Top