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.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top