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

Help with rescuable units!! (noob)

Level 3
Joined
Aug 29, 2024
Messages
23
I started making a map for me and my buddy and I have rescuable units around the map. I'm super new to this and haven't edited a map since 09. If there is anyway that player 1 and 2 can both rescue those units that would be rad. I have little knowledge on triggers and actions but I know some. If you could do a step by step thing I swear ill tip you on cashapp hahah

Thanks for the help and read!
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
I started making a map for me and my buddy and I have rescuable units around the map. I'm super new to this and haven't edited a map since 09. If there is anyway that player 1 and 2 can both rescue those units that would be rad. I have little knowledge on triggers and actions but I know some. If you could do a step by step thing I swear ill tip you on cashapp hahah

Thanks for the help and read!
Hello, I couldn't get the standard method to work:
  • Unit - Make (Last created unit) Rescuable by (All players controlled by a User player)
For some reason this ignored my allied User when I tested it in LAN. So instead I made a more complicated system using triggers. That being said, it should be fairly easy to use, just open my map and follow these steps.

Step 1: Copy the "Rescuable" ability from the Object Editor and paste it into your map.
Step 2: Copy the "Rescue System" folder in the Trigger Editor and paste it into your map.
Step 3: Define the two variables in the "Rescue Setup" trigger. They're at the very top of the Actions and have comments that say "DEFINE" above them.
  • Rescue Setup
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • -------- DEFINE the rescue range: --------
      • Set VariableSet Rescue_Range = 256.00
      • -------- --------
      • -------- DEFINE the rescue ability (copy from object editor): --------
      • Set VariableSet Rescue_Ability = Rescuable
      • -------- --------
      • -------- Don't touch anything else if you're confused. --------
Step 4: Add the "Rescuable" ability to any units that you want to be rescuable. You can do this in the Object Editor and with triggers.
Step 5: Make sure that you've enabled JassHelper in the Trigger Editor. There's a dropdown window at the top of the menu where you can turn it on.

The attached map requires the latest patch to open. EDIT: Updated map! Fixed bugs.
 

Attachments

  • Rescue Demo.w3m
    25.4 KB · Views: 5
Last edited:
Level 3
Joined
Aug 29, 2024
Messages
23
Hello, I couldn't get the standard method to work:
  • Unit - Make (Last created unit) Rescuable by (All players controlled by a User player)
For some reason this ignored my allied User when I tested it in LAN. So instead I made a more complicated system using triggers. That being said, it should be fairly easy to use, just open my map and follow these steps.

Step 1: Copy the "Rescuable" ability from the Object Editor and paste it into your map.
Step 2: Copy the "Rescue System" folder in the Trigger Editor and paste it into your map.
Step 3: Define the two variables in the "Rescue Setup" trigger. They're at the very top of the Actions and have comments that say "DEFINE" above them.
  • Rescue Setup
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • -------- DEFINE the rescue range: --------
      • Set VariableSet Rescue_Range = 256.00
      • -------- --------
      • -------- DEFINE the rescue ability (copy from object editor): --------
      • Set VariableSet Rescue_Ability = Rescuable
      • -------- --------
      • -------- Don't touch anything else if you're confused. --------
Step 4: Add the "Rescuable" ability to any units that you want to be rescuable. You can do this in the Object Editor and with triggers.
Step 5: Make sure that you've enabled JassHelper in the Trigger Editor. There's a dropdown window at the top of the menu where you can turn it on.

The attached map requires the latest patch to open.
Hey friend!!! I'm on the object editor and cannot simply for the life of me find the 'ability' section for 'rescuable' is there another part I'm missing? Like maybe a category?

What I'm doing:
Object editor > comb through all categories/ even the ability category > cannot find rescuable as an ability or however. I apologize in advance! Your steps looks simple and doable if I can find the rescuable thing.
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
Hey friend!!! I'm on the object editor and cannot simply for the life of me find the 'ability' section for 'rescuable' is there another part I'm missing? Like maybe a category?

What I'm doing:
Object editor > comb through all categories/ even the ability category > cannot find rescuable as an ability or however. I apologize in advance! Your steps looks simple and doable if I can find the rescuable thing.
It's a custom ability I created, you'll see it at the very bottom of the list. (I assume you're looking through my map)
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
Also someone suggested a region thing:

doesnt seem to fit but also seems like a easier suggestion I don't seem to get. Sorry about the simple mindedness I have on editor so far. Thanks for the help.
Regions don't make much sense for rescuing units since the units can move and the Regions cannot.

Anyway, you just have to copy and paste two things, from there it's as easy as adding that "Rescuable" ability to units in the Object Editor like you would any other ability.
 
Level 3
Joined
Aug 29, 2024
Messages
23
Ok I pasted the ability into my map. I have a rescuable thing that you made into my editor. Now I use that and change the variable, but what is the DEFINE thing? Define the player or define the color. I'm so sorry for these noob questions.
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
For the first step, do I copy the first ability that the footman has (on your download map?) It shows when I open the object editor a footman is purple and has rescuable on them.
Then I paste it (rescuable ability) into my into my map when I open it with ctrl + v.
Then, from your map, I copy "rescue system" folder into my trigger editor on MY map.
Finally, when it comes to defining, how do I do that?

The last steps look easy with the adding. Again sorry for the stupid noobness.

Edit: sorry I totally meant the ability tab, I'm passed the first step.
Copy and paste the ability first. Then copy and paste the folder.
copy1.png
copy2.png

Use the Window tab to bounce between my map and your own map:
copy3.png


About the Trigger stuff...

You just need to make sure that the Rescue_Ability variable is Set to the Rescuable ability. When you copy an ability from one map and paste it into another it can be given a different rawcode - which is a unique ID that sets it apart from other abilities. My triggers might not work properly if the ID of the ability changed when switching between maps, so you want to update these references (just the 1 variable in this case).

As long as the top section of your Rescue Setup trigger looks like this then you're good to go:
  • Rescue Setup
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • -------- DEFINE the rescue range: --------
      • Set VariableSet Rescue_Range = 256.00
      • -------- --------
      • -------- DEFINE the rescue ability (copy from object editor): --------
      • Set VariableSet Rescue_Ability = Rescuable
Of course you can change the range needed to rescue a unit to any value you want, 256.00 is sort of short.
 
Last edited:
Level 3
Joined
Aug 29, 2024
Messages
23
Copy and paste the ability first. Then copy and paste the folder.
View attachment 485392View attachment 485393
Use the Window tab to bounce between my map and your own map:
View attachment 485394

About the Trigger stuff...

You just need to make sure the Rescue_Ability variable is Set to the Rescuable ability. When you copy an ability from one map and paste it into another it can be given a different rawcode - which is like a unique ID that sets it apart from other abilities. This means my triggers might not work properly since the ID's can switch between maps. The Rescue_Ability variable solves this problem but you need to make sure you Set it properly.

As long as the top section of your Rescue Setup trigger looks like this then you're good to go:
  • Rescue Setup
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • -------- DEFINE the rescue range: --------
      • Set VariableSet Rescue_Range = 256.00
      • -------- --------
      • -------- DEFINE the rescue ability (copy from object editor): --------
      • Set VariableSet Rescue_Ability = Rescuable
Thanks so much! Say dark green is the rescuable. How do I go about giving them the ability that wraps around the player 1 and 2? Or is it just automatically set in the unit? Last question so sorry haha
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
Thanks so much! Say dark green is the rescuable. How do I go about giving them the ability that wraps around the player 1 and 2? Or is it just automatically set in the unit? Last question so sorry haha
Any unit with the Rescuable ability will be rescuable.

You can go into the Object Editor and manually assign the ability to specific Unit-Types like how I made ALL Footman in my demo map rescuable.

Alternatively, you can make specific Units rescuable by adding the Ability to them in the Rescue Setup trigger like this:
  • Rescue Setup
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • -------- DEFINE the rescue range: --------
      • Set VariableSet Rescue_Range = 256.00
      • -------- --------
      • -------- DEFINE the rescue ability (copy from object editor): --------
      • Set VariableSet Rescue_Ability = Rescuable
      • -------- --------
      • -------- NEW --------
      • -------- Add the rescue ability to specific units: --------
      • Unit - Add Rescue_Ability to Knight 0018 <gen>
      • Unit - Add Rescue_Ability to Knight 0022 <gen>
      • Unit Group - Pick every unit in (Units owned by Player 11 (Dark Green).) and do (Actions)
        • Loop - Actions
          • Unit - Add Rescue_Ability to (Picked unit)
      • -------- --------
      • -------- Don't touch anything else if you're confused. --------
In this example I've made two of the Knights rescuable and made all of Player 11's units rescuable.
 
Level 3
Joined
Aug 29, 2024
Messages
23
This was so hopefully thanks a bunch. I found the rescuable ability on a model (archer or knight) and checked their ability to rescuable. Would that have the same affect? I think I'm in the clear. Thanks again.
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
This was so hopefully thanks a bunch. I found the rescuable ability on a model (archer or knight) and checked their ability to rescuable. Would that have the same affect? I think I'm in the clear. Thanks again.
That sounds correct, you can Add it in addition to their other Abilities:
add abil.png

You can bypass the Ability limit by holding shift while opening the Abilities field. I say this just in case you run into that problem (you shouldn't).
 
Last edited:
Level 3
Joined
Aug 29, 2024
Messages
23
That sounds correct, you can Add it in addition to their other Abilities:
View attachment 485398
You can bypass the Ability limit by holding shift while opening the Abilities field. I say this just in case you run into that problem (you shouldn't).
Shut the fuck up. You are so helpful man. My God bless you and your life. I appreciate it all! Thanks again and take care in the universe.
 
Level 3
Joined
Aug 29, 2024
Messages
23
Hey I totally had my friend test it but said he coudn't grab any unit (their ability rescuable was active, unless I have to untick the box fore rescuable lol). I have that top half perfect but haven't tried your second to last post method yet. Ill post a screen shot tomorrow morning of my current rescue setup thing you gave me. Thanks Unc.
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
Hey I totally had my friend test it but said he coudn't grab any unit (their ability rescuable was active, unless I have to untick the box fore rescuable lol). I have that top half perfect but haven't tried your second to last post method yet. Ill post a screen shot tomorrow morning of my current rescue setup thing you gave me. Thanks Unc.
Feel free to attach the map to your post so I can see exactly what's going on. My guess would be:
1) You forgot to Set the Rescue_Ability variable in the Rescue Setup trigger.
2) The units that your friend is trying to rescue don't have the ability.
3) MAYBE the system breaks when there's too many units with the ability. How many do you have?

You definitely don't want to disable the ability.
 
Level 3
Joined
Aug 29, 2024
Messages
23
thanks for taking a look at it man, I think I did it all correctly but still, this is my first time doing triggers somewhat but I'm getting the hang of it. Thanks again. I have the ability on the people south of the base. (Not brown team) (DG is the rescuable) ability is active too on all of them!
 

Attachments

  • Nick and Aiden's Map.w3m
    162.6 KB · Views: 3
Level 3
Joined
Aug 29, 2024
Messages
23
Feel free to attach the map to your post so I can see exactly what's going on. My guess would be:
1) You forgot to Set the Rescue_Ability variable in the Rescue Setup trigger.
2) The units that your friend is trying to rescue don't have the ability.
3) MAYBE the system breaks when there's too many units with the ability. How many do you have?

You definitely don't want to disable the ability.
I combed over it and it seems pretty right. I don't think I messed up D: i hope i did at least so it works haha
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
I combed over it and it seems pretty right. I don't think I messed up D: i hope i did at least so it works haha
I found some mistakes and fixed them. It should work now.

1) I wasn't using one of my variables in a few triggers which broke things when importing the system over to your map.
2) You still had P11 set to Rescuable in the Player Properties. These two systems will conflict with one another, I set them to Neutral instead.
3) You don't have to toggle the ability's Active option when editing a pre-placed Unit, that doesn't do anything here.
4) I modified the setup process to be more flexible and organized.

So here's the updated Rescue Setup trigger, which is the ONLY trigger you should ever worry about:
  • Rescue Setup
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • -------- DEFINE the rescue range (how close you have to be to rescue): --------
      • Set VariableSet Rescue_Range = 256.00
      • -------- --------
      • -------- DEFINE the rescue ability (must be copied over from the demo map): --------
      • Set VariableSet Rescue_Ability = Rescuable
      • -------- --------
      • -------- --------
      • -------- You can manually add the Rescue ability to specific units here. --------
      • -------- --------
      • -------- Here I'm adding the Ability to Captains, Swordsmans, and Archers that are owned by Player 11: --------
      • Unit Group - Pick every unit in (Units owned by Player 11 (Dark Green).) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Unit-type of (Picked unit)) Equal to Captain
                  • (Unit-type of (Picked unit)) Equal to Swordsman
                  • (Unit-type of (Picked unit)) Equal to Archer
              • (Level of Rescue_Ability for (Picked unit)) Equal to 0
            • Then - Actions
              • Unit - Add Rescue_Ability to (Picked unit)
            • Else - Actions
      • -------- --------
      • -------- Here I am removing the Ability from units that are NOT owned by Player 11: --------
      • Unit Group - Pick every unit in (Units in (Playable map area) matching ((Owner of (Matching unit)) Not equal to Player 11 (Dark Green))) and do (Actions)
        • Loop - Actions
          • Unit - Remove Rescue_Ability from (Picked unit)
I've added Actions at the bottom of the trigger which do the following:
1) Add the Rescue ability to any Units owned by P11 that are Captains, Swordsman, or Archers.
2) Remove the Rescue ability from any Units NOT owned by P11 (so everyone else).

You can delete these new Actions if you don't need them. I simply wanted to show how you can go about modifying units to have/not have the Rescue ability in order to create different outcomes.

So if only P11 is meant to be Rescuable then you likely want to keep the Action which Removes the ability from units owned by non-P11 players. Also, if ALL of P11's units are intended to be Rescuable then simply do this:
  • Unit Group - Pick every unit in (Units owned by Player 11 (Dark Green).) and do (Actions)
    • Loop - Actions
      • Unit - Add Rescue_Ability to (Picked unit)
Now you don't even need to mess around with the Ability in the Object Editor since this will ensure every single P11 unit has the Ability.
 

Attachments

  • Nick and Aiden's Map.w3m
    163.6 KB · Views: 3
Last edited:
Level 3
Joined
Aug 29, 2024
Messages
23
Thank you so much! I booted up the map but I have no spawn points. I tried undoing the fixed location and the map is black. Only start with one unit by blue's camp. I didn't touch the triggers or anything! Sorry for the bugging.

Also, if I'm wanting to add more units to the roaster of rescuable. I just go under:

unitgroup.gif
Unit Group - Pick every unit in (Units owned by Player 11 (Dark Green).) and do (Actions)

Then add it to this list with these units?:

Conditions
  • empty.gif
    line.gif
    empty.gif
    empty.gif
    line.gif
    line.gif
    empty.gif
    join.gif
    if.gif
    (Unit-type of (Picked unit)) Equal to Captain
  • empty.gif
    line.gif
    empty.gif
    empty.gif
    line.gif
    line.gif
    empty.gif
    join.gif
    if.gif
    (Unit-type of (Picked unit)) Equal to Swordsman
  • empty.gif
    line.gif
    empty.gif
    empty.gif
    line.gif
    line.gif
    empty.gif
    joinbottom.gif
    if.gif
    (Unit-type of (Picked unit)) Equal to Archer
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
Thank you so much! I booted up the map but I have no spawn points. I tried undoing the fixed location and the map is black. Only start with one unit by blue's camp. I didn't touch the triggers or anything! Sorry for the bugging.
I deleted the Map Initialization trigger because it was immediately ending the game. I guess you wanted that? You'll have to add it back, you can just copy one from a fresh map since it's the default "melee" trigger.

Also, if I'm wanting to add more units to the roaster of rescuable. I just go under:

unitgroup.gif
Unit Group - Pick every unit in (Units owned by Player 11 (Dark Green).) and do (Actions)

Then add it to this list with these units?:
Yes, that's correct. HOWEVER, that's just one way of doing it.

If say ALL of Player 11's units are meant be Rescuable then literally just do this:
  • Rescue Setup
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • -------- DEFINE the rescue range (how close you have to be to rescue): --------
      • Set VariableSet Rescue_Range = 256.00
      • -------- --------
      • -------- DEFINE the rescue ability (must be copied over from the demo map): --------
      • Set VariableSet Rescue_Ability = Rescuable
      • -------- --------
      • -------- --------
      • -------- You can manually add the Rescue ability to specific units here. --------
      • -------- --------
      • Unit Group - Pick every unit in (Units owned by Player 11 (Dark Green).) and do (Actions)
        • Loop - Actions
          • Unit - Add Rescue_Ability to (Picked unit)
Now you don't even need to Add the ability in the Object Editor, this will give ALL of P11's units the ability from the very start. This is obviously a much better solution if that's all you need and will save you from needing to do extra work.
 
Level 3
Joined
Aug 29, 2024
Messages
23
I deleted the Map Initialization trigger because it was immediately ending the game. I guess you wanted that? You'll have to add it back, you can just copy one from a fresh map since it's the default "melee" trigger.


Yes, that's correct. HOWEVER, that's just one way of doing it.

If say ALL of Player 11's units are meant be Rescuable then literally just do this:
  • Rescue Setup
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • -------- DEFINE the rescue range (how close you have to be to rescue): --------
      • Set VariableSet Rescue_Range = 256.00
      • -------- --------
      • -------- DEFINE the rescue ability (must be copied over from the demo map): --------
      • Set VariableSet Rescue_Ability = Rescuable
      • -------- --------
      • -------- --------
      • -------- You can manually add the Rescue ability to specific units here. --------
      • -------- --------
      • Unit Group - Pick every unit in (Units owned by Player 11 (Dark Green).) and do (Actions)
        • Loop - Actions
          • Unit - Add Rescue_Ability to (Picked unit)
Now you don't even need to Add the ability in the Object Editor, this will give ALL of P11's units the ability from the very start. This is obviously a much better solution if that's all you need and will save you from needing to do extra work.
Brother....... You don't know how much I appreciate you. I'll reread all of this and learn from it. It worked out perfectly. Thanks for the shortcuts too. Take care and I'll be around probably for more questions hahaha thank you!
 
Top