How can I make only certain units be able to save allies?

TTR.Cloud

New Member
Reaction score
0
On the map I am currently working on (Tree Tag Revolution 4.2), you can save dead allies called Ents from the jail. When an Ent player dies he is sent to the jail as an Ent Ash. Other players can save him by hitting the Ent Ash which revives the players Ent (Actually it gives him a new one). Now I only want Ents and Heroes to be able to save the dead Ents. Right now buildings and even tanks can save from long away which is quite annoying as you can imagine. Normally this would be no problem for me but I have not used WE in probably about 5 years. I tried changing the units each unit is allowed to hit but heroes have been set to not be able to hit allies and they still can so I guess that's not it.

Thanks for the help you guys have shown so far :) This is definitely the friendliest and most helpful WC3/WE forum I have ever come across.

EDIT: Can someone also help me make a -zoom command? I found out the end result of the trigger by searching on here but I still can't even find all of the different things I need to make it.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
Try using a trigger that fires when a unit attacks. If the attacker isn't supposed to attack the target, then order the attacker to stop.
 

TTR.Cloud

New Member
Reaction score
0
Thanks for the idea. From what I can tell that mean I have to make a trigger for every unit in the map. I know there is another way to do what I want because there are no triggers like that and yet some units in the map cannot save such as Water Elements or Tree Fighters. If it comes down to it I will use your idea.
 

Sil3nt

SUP?
Reaction score
134
You don't have to make one for every unit. Unless I read your post wrong, something like this should work:

Code:
Untitled Trigger 001
    Events
        Unit - A unit Is attacked
    Conditions
        (Unit-type of (Triggering unit)) Equal to ENT ASH
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Or - Any (Conditions) are true
                    Conditions
                        ((Attacking unit) is A Hero) Equal to False
                        (Unit-type of (Attacking unit)) Not equal to ENT
            Then - Actions
                Unit - Order (Attacking unit) to Stop
            Else - Actions


You can use this to set a player's "zoom" distance

Code:
Camera - Set Player 1 (Red)'s camera Distance to target to 1000.00 over 0.00 seconds

You will need to make the event a periodic timer to prevent them from mouse wheeling it back to normal.
 

TTR.Cloud

New Member
Reaction score
0
Actually I wanted to have the player to be able to type -setcam 2000 or something like that but thank you for the first trigger. I really suck at WE now and I can't even get the event to work. There seems to be no "A unit" option or I just can't find it anywhere.

EDIT: Ok scratch that, I found it right after I posted this. Thanks for the help.
 

TTR.Cloud

New Member
Reaction score
0
Is there some kind of way to copy the codes you guys are giving me instead of finding everything in WE? This is getting really annoying and some of the codes you guys give me seem to be different in WE.
 

TTR.Cloud

New Member
Reaction score
0
Well there have been a few triggers posted on here that I know are not the same in WE, but they are being pulled straight from the WE according to the authors and/or they are pictures of the triggers from WE. Oh well, I guess I'll manage.
 

Sim

Forum Administrator
Staff member
Reaction score
534
Well, one of the possible reasons is that you might not be using Jass NewGen pack, which I believe adds some GUI functions. Not sure though, I haven't used GUI for a while.

As for one of the solutions to your copy-paste problem, there is JASS, which can be copy-pasted as a script language. :)
 

TTR.Cloud

New Member
Reaction score
0
I actually am using Jass NewGen :p Also another question. This may be one of the last don't worry haha. I want to make a unit (To be specific, the main unit called an Ent) unable to buy certain a few certain items that would make him almost impossible to kill. This seems pretty complicated and I have no idea what to do.
 

Sil3nt

SUP?
Reaction score
134
I've always used the default editor, didn't even realise NewGen had GUI commands because of the JASS label. As for your item problem;

Code:
Melee Initialization
    Events
        Unit - A unit Acquires an item
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                And - All (Conditions) are true
                    Conditions
                        (Unit-type of (Triggering unit)) Equal to Archer
                        (Item-type of (Item being manipulated)) Equal to Glyph of Purification
            Then - Actions
                Hero - Drop (Item being manipulated) from (Triggering unit)
            Else - Actions

I couldn't find a way to get the value of an item so i could 'refund' it back to the player directly.
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
JASS = GUI converted into custom script (what the editor does in the background to make the triggers)
JASS = Terrible, hard to use, and not fun to script in
vJass != Jass (does not equal), it adds a lot to the jass script and does not take from the gui script (cept hashtables)
 

TTR.Cloud

New Member
Reaction score
0
I've always used the default editor, didn't even realise NewGen had GUI commands because of the JASS label. As for your item problem;

Code:
Melee Initialization
    Events
        Unit - A unit Acquires an item
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                And - All (Conditions) are true
                    Conditions
                        (Unit-type of (Triggering unit)) Equal to Archer
                        (Item-type of (Item being manipulated)) Equal to Glyph of Purification
            Then - Actions
                Hero - Drop (Item being manipulated) from (Triggering unit)
            Else - Actions

I couldn't find a way to get the value of an item so i could 'refund' it back to the player directly.

Thanks so much. You have been very helpful :D

Just one more thing guys. I want a players units and buildings to be completely removed from the game when they leave. I have this much so far but they players hero, other units, and buildings will still live.

e6df2172f46a6dc47c84a833033011fd.png


Ah I fixed it. It was because the ownership was being set to allies.
 

TTR.Cloud

New Member
Reaction score
0
This is probably very simple but unfortunately I cannot find it. I want to increase the movement speed of the Tornado ability but I cannot find where to do that. I don't think it's projectile speed since that is set to 0. Does anyone know?

Thanks to everyone on here I am slowly regaining my knowledge of WE. Thanks a bunch everyone :)
 

Troll_Killer

New Member
Reaction score
0
This is probably very simple but unfortunately I cannot find it. I want to increase the movement speed of the Tornado ability but I cannot find where to do that. I don't think it's projectile speed since that is set to 0. Does anyone know?

Thanks to everyone on here I am slowly regaining my knowledge of WE. Thanks a bunch everyone :)

I've played tree tag revolution, I nodiced that the Tornado was an entity try editing its speed or you could use a trigger that summons a unit "Tornado" then kills it after an ammount of time.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
Open up the Object Editor. Locate the unit that Tornado summons. Increase the value of the Movement - Speed Base field.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top