• 🏆 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!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

Vehicle Capture Ability

Status
Not open for further replies.
Level 13
Joined
Jul 2, 2015
Messages
875
I cant seem to figure out how to make a trigger that when a Worker uses the ability "Capture" on a Neutral owned tank, The tank would then become the players and the worker "disappears". How do I do this?
 

ISL

ISL

Level 13
Joined
Nov 7, 2014
Messages
239
There you go :)
  • Vehicle Capture cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Capture
    • Actions
      • Unit - Change ownership of (Target unit of ability being cast) to (Owner of (Casting unit)) and Change color
      • Unit - Remove (Casting unit) from the game
 
Level 13
Joined
Jul 2, 2015
Messages
875
There you go :)
  • Vehicle Capture cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Capture
    • Actions
      • Unit - Change ownership of (Target unit of ability being cast) to (Owner of (Casting unit)) and Change color
      • Unit - Remove (Casting unit) from the game
The thing is, is that Then workers could just run up to a enemy tank and do "Capture" and boom done, 'cheated' in a way. How would I make it that this can be casted on neutrals only?
 

ISL

ISL

Level 13
Joined
Nov 7, 2014
Messages
239
The thing is, is that Then workers could just run up to a enemy tank and do "Capture" and boom done, 'cheated' in a way. How would I make it that this can be casted on neutrals only?
Just change the "Stats - Targets Allowed" graph of your ability in the Object Editor and tick the "Neutral" and "Mechanical" options only :)

Then, your ability would still affect neutral buildings (if you have any), cause they are also considered Mechanical
To fix it, add the following trigger into your map
  • Vechicle Capture debug
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Capture
      • ((Target unit of ability being cast) is A structure) Equal to True
    • Actions
      • Unit - Order (Casting unit) to Stop
note that the event is different from the first trigger
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,241
The thing is, is that Then workers could just run up to a enemy tank and do "Capture" and boom done, 'cheated' in a way. How would I make it that this can be casted on neutrals only?
Although it will not stop the ability from targeting enemies, one could add a condition to the trigger to make sure that the owner of target unit is the appropriate neutral player. That way casting on an enemy would be wasted since the trigger will never run, while also not wasting the worker in case they accidently cast it on an enemy.
 
Level 13
Joined
Jul 2, 2015
Messages
875
Just change the "Stats - Targets Allowed" graph of your ability in the Object Editor and tick the "Neutral" and "Mechanical" options only :)

Then, your ability would still affect neutral buildings (if you have any), cause they are also considered Mechanical
To fix it, add the following trigger into your map
  • Vechicle Capture debug
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Capture
      • ((Target unit of ability being cast) is A structure) Equal to True
    • Actions
      • Unit - Order (Casting unit) to Stop
note that the event is different from the first trigger
There's other units like infantry so that wouldn't work, Thanks for the help! :D
If you want to reuse the 'pilot' unit and it is a hero, or some stats should be retained, then you should hide it instead of removing it.
Its just a standard combat engineer unit not a hero
Although it will not stop the ability from targeting enemies, one could add a condition to the trigger to make sure that the owner of target unit is the appropriate neutral player. That way casting on an enemy would be wasted since the trigger will never run, while also not wasting the worker in case they accidently cast it on an enemy.
So do I use "Target unit of ability being cast" or just "targeted unit"?

Also what base ability should I use? I'm using firebolt and it isn't working when I target the tank the worker disappears and the tank is stunned but stays neutral
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,241
So do I use "Target unit of ability being cast" or just "targeted unit"?
Target unit of ability being cast.
Also what base ability should I use? I'm using firebolt and it isn't working when I target the tank the worker disappears and the tank is stunned but stays neutral
Channel? It might be able to do what was described by xISLx and not require triggers to prevent it from casting on enemies.
I suggest just go with Possession, it has all your need, trigger-free.
Can this be made to target only neutral mechanical? I assume topic creator already tried this and it probably cannot be customized as desired.
 

ISL

ISL

Level 13
Joined
Nov 7, 2014
Messages
239
Also what base ability should I use? I'm using firebolt and it isn't working when I target the tank the worker disappears and the tank is stunned but stays neutral
I decided to attach a working version in case you need it
Works just as intended :)

Also, did you mention that there'll be neutral mechanical infantry in your map? :D
If there are, the trigger might need a couple of minor tweaks
 

Attachments

  • Vehicle Capture.w3x
    18.2 KB · Views: 29
Level 13
Joined
Jul 2, 2015
Messages
875
I decided to attach a working version in case you need it
Works just as intended :)

Also, did you mention that there'll be neutral mechanical infantry in your map? :D
If there are, the trigger might need a couple of minor tweaks
Yeah you can train Infantry and tanks are kinda there For support, for further details see my "Tiriath Civil War" map
 
Can this be made to target only neutral mechanical? I assume topic creator already tried this and it probably cannot be customized as desired.

It works, tried it for Building in Night Empire map of mine (check the Infiltrator unit).

A simple trigger might be needed if there's no way to exclude structure.
 
Level 13
Joined
Jul 2, 2015
Messages
875
It works, tried it for Building in Night Empire map of mine (check the Infiltrator unit).

A simple trigger might be needed if there's no way to exclude structure.
May I see this map so see how it works? Dr Super Good's idea of using "Target of casted ability" dosent work. I need a trigger that is simplistic (if possible) and dosent involve chaning "Mechanical" or editing the game the way xISLx tgat would make Infantry not be able to target each other...
 

Attachments

  • Tiriath Civil War - Telgarde - V2.w3x
    15.1 MB · Views: 30
Status
Not open for further replies.
Top