• 🏆 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!

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