• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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