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

Requesting help with a JASS function

Status
Not open for further replies.
Level 2
Joined
Jun 21, 2015
Messages
6
Im unable to post in the JASS forum section, so i apologise if this is in the wrong place.

Ive been developing a map for quite some time (more than id like to admit), but I had to put it down for a while due to a couple of limitations in my own knowledge and free time.

Basically, im creating a co-op hero style map. Unfortunately, while testing a friend of mine has pointed out that healing is made extremely difficult, as there is no possibility to heal via either the portraits or the in game UI (by which i mean the bottom of the screen when you drag select units). Having done a little digging, it seems using JASS to enable ONLY advanced unit control would be the best option, but im not exactly sure how to do this, as i am only used to the basic GUI.
I was wondering if someone who is more knowledgeable with JASS could create a trigger for me for use regarding this purpose, (or assist with), and would be very grateful for any help.
 
Level 7
Joined
Oct 19, 2015
Messages
286
You want the following custom script action in one of your initialization triggers.
  • Custom script: call SetPlayerAlliance( Player(1), Player(0), ALLIANCE_SHARED_ADVANCED_CONTROL, true)
This gives player 1 advanced shared control of player 2's units. Player numbers start from 0 in JASS, so Player(0) is Player 1 - Red.
 
Level 2
Joined
Jun 21, 2015
Messages
6
Im looking to find a way to heal allied units without having to manually click them in the field, using either hero portraits at the side or by the unit selection screen at the bottom. I need to do this WITHOUT giving shared unit control to the allied player.

Meaning, i want a healer owned by player 2 to heal a unit owned by player 1, without click targeting him, using either portraits or unit selection screen. The best way to do this would (i think) be to give ONLY advanced unit control, so that units would be selectable but not controllable. the basic world editor doesnt give enough flexibility for this, so i would need to use custom scripts or JASS, which i dont know enough about to do myself.

However, if anyone has any other suggestions that will give the desired effect as above, im very willing to try anything else out.

EDIT: I can confirm that Anitarfs solution worked :D big thanks to you sir! +rep
 
Last edited by a moderator:
Status
Not open for further replies.
Top