• 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.

Co-op Rescuable Units

Status
Not open for further replies.
Level 3
Joined
Jul 4, 2013
Messages
35
I'd like to know how to make a faction flagged as Rescuable able to be rescued by players other than Player 1.

I'm working on a co-op map at the moment, and it seems that only Player 1 can rescue units. If player 2 attempts to, the units remain passive.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
JASS:
constant alliancetype ALLIANCE_RESCUABLE = ConvertAllianceType(8)

native SetPlayerAlliance takes player sourcePlayer, player otherPlayer, alliancetype whichAllianceSetting, boolean value returns nothing
native SetUnitRescuable takes unit whichUnit, player byWhichPlayer, boolean flag returns nothing

So there is an alliance treaty between players aiming at rescuing and you can determine what units are rescuable by which players.

I guess for the first option the player, whose units are rescued, may need to be flagged as Rescuable controller.
 
Status
Not open for further replies.
Top