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

Want to be invulnerable during teleport

Status
Not open for further replies.
Level 3
Joined
Jul 26, 2018
Messages
17
I'm trying to create a teleport ability that can target friendly units (not just town structures) like mass teleport or staff of teleportation can, but I want to be invulnerable when teleporting, like town portal scroll. (mass teleport/staff of teleportation leave you vulnerable during the cast, unlike town portal).

So my question is how can I either get the town portal ability to target units, or how can I make myself invulnerable while using the staff of teleportation ability? (either option would solve the problem)

I tried applying an invulnerable buff to staff of teleportation (Didn't work. I can teleport to friendly units, but I'm not invulnerable)

I tried switching the targets allowed on town portal to the same as staff of teleportation (Didn't work. I'm invulnerable, but I can't teleport to friendly units.)

Thank you in advance



teleport.jpg
teleport 2.jpg
 
Level 39
Joined
Feb 27, 2007
Messages
5,011
Buffs are entirely a ui thing so changing to the buff of another ability doesn't give your new spell the effects of that ability. Imo changing the targets to the item version should have worked; is there a 'non-structures' targeting tag you can add?
 
Level 3
Joined
Jul 26, 2018
Messages
17
Buffs are entirely a ui thing so changing to the buff of another ability doesn't give your new spell the effects of that ability. Imo changing the targets to the item version should have worked; is there a 'non-structures' targeting tag you can add?
No, I tried messing with the 'targets allowed', and even took off 'structures' to see if that would make a difference. That just made it so town portal couldn't target anything. But I solved my problem with a trigger that I showed on my second comment. Thanks anyways.
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
Alternatively, you can make a dummy unit with Big-Bad-Voodoo.
When the teleport is cast, you spawn that next to the caster and make it cast Big-Bad-Voodoo

Don't forget to make it unit version, without levels and such.

Other option is to just pick units in range on cast and make them invulnerable by temporary giving them invulnerability.
That would require some more triggering though and indexing way (whatever you prefer)

-Ned
 
Level 39
Joined
Feb 27, 2007
Messages
5,011
Alternatively, you can make a dummy unit with Big-Bad-Voodoo.
When the teleport is cast, you spawn that next to the caster and make it cast Big-Bad-Voodoo
Suggestion 1 is just bad. There's no way to get an AoE spell to target only that specific hero while its teleporting, so I would never use something like BBV to achieve this. That's like trying to go skeet shooting with a surface-to-air missile. Sure, but why?
Other option is to just pick units in range on cast and make them invulnerable by temporary giving them invulnerability.
That would require some more triggering though and indexing way (whatever you prefer)
Suggestion 2 tells me you didn't actually read this thread at all. The OP here did exactly that AND updated the thread to tell us he figured out a solution. I would suggest you try reading next time, it was only 4 posts here.
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
Suggestion 1 is just bad. There's no way to get an AoE spell to target only that specific hero while its teleporting, so I would never use something like BBV to achieve this. That's like trying to go skeet shooting with a surface-to-air missile. Sure, but why?

Suggestion 2 tells me you didn't actually read this thread at all. The OP here did exactly that AND updated the thread to tell us he figured out a solution. I would suggest you try reading next time, it was only 4 posts here.
Did read, My understanding is that OP is looking to get a mass teleport that works to units, not only to buildings.
As such, Big-Bad-Voodoo. If it is a single unit only, then obviously not a solution.

OP has suggested that he has used a buff, not invulnerability.
Later has shown triggers with invulnerability status.
Making unit invulnerable and then removing the invulnerability is bad as it would remove other sources of invulnerability. As such, I would not consider this as a viable solution.
I should have specified that I mean a copy of the permanent invulnerability passive ability (whatever it is called), not the status.

-Ned
 
Level 39
Joined
Feb 27, 2007
Messages
5,011
It's called "Invulnerable" and its 'Avul'. The OP's hero is invulnerable for a grand total of 1 second while casting, so in order to screw that up some other invulnerability effect would have to happen to the same hero precisely during that 1 second. But it can't be messed up by using Divine Shield or any Invulnerability potion variants because the hero is channeling TP so can't cast two spells at once. That leaves, what... Animate Dead? If the hero has been animated then he has bigger problems than a teleport fucking up that invulnerable status.

IMO the only things that can get fucked up by directly setting it invulnerable are other things that directly set invulnerability, and I definitely support using the ability if its going to be a thing the OP needs to change regularly. Really doesn't seem like a big deal to me, what horrifying things do you see happening by setting its vulnerability status with code rather than abilities?
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
It's called "Invulnerable" and its 'Avul'. The OP's hero is invulnerable for a grand total of 1 second while casting, so in order to screw that up some other invulnerability effect would have to happen to the same hero precisely during that 1 second. But it can't be messed up by using Divine Shield or any Invulnerability potion variants because the hero is channeling TP so can't cast two spells at once. That leaves, what... Animate Dead? If the hero has been animated then he has bigger problems than a teleport fucking up that invulnerable status.
What about if the skills/potions were used before channeling the TP ? Taking vanilla, Divine Shield has lvl x 15s duration (I think?). A viable combat tactic is to TP into the fight with Inv. on.

IMO the only things that can get fucked up by directly setting it invulnerable are other things that directly set invulnerability, and I definitely support using the ability if its going to be a thing the OP needs to change regularly. Really doesn't seem like a big deal to me, what horrifying things do you see happening by setting its vulnerability status with code rather than abilities?
Looking only at vanilla stuff is not good. We got no idea what is inside OP's map, could be custom invulnerability system or anything ? Any vanilla Invulnerability may be a major part of the OP's map gameplay.
As well, OP may have not have a single invulnerability thing in his map except this making my concerns redundand.

Regardless, Suggestions have to be as error-proof as they can be.
Sometimes, OP would ask for something that can't be done in a safe way.

-Ned
 
Level 39
Joined
Feb 27, 2007
Messages
5,011
You got me, I did not consider activating an invulnerability effect before teleport.
Regardless, Suggestions have to be as error-proof as they can be.
No, solutions should be simple when there is no explicit need to overcomplicate a problem. Trying to account for every edge case and special scenario is a quick ride to extremely complex code that accounts for way more than is ever likely to matter.

Consider for a second where "fixing" this "problem" takes you. You probably need to implement a unit indexer... and then some code to keep track of which units have been temp-invul'd... and then some code to resolve any double-application of invulnerability or overlapping periods of invulnerability... and then make sure all invulnerability effects are handled the same way map-wide... etc. It's not a simple "just do this one thing" fix.

Is it 'better' with properly triggered invulnerability? Definitely. But what other cases are you accounting for besides "unit was already invulnerable prior to telepoetong"? You don't even know that the OP has any real invuln effects in their map.
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
Exactly as I have no idea what is in OPs map, I could at least present a problem for OPs consideration.
If my suggestion is an overkill (and it is a bit excessive for a simple solution, although it is the cleanest I can think of atm), OP may decide to go with what he has done, no problem, as long as he decides that it is ok to do it.
At least I have presented a situation for consideration, it is not up to me to decide if it is worth it or not.

It is accounting for a behavior that may be undesired-able, which is enough for me.
Or may actually be an intended mechanic? "This skill cleanses immortality of souls" or whatever.

There are side effects, let op decide if he wants them or avoid them.

-Ned
 
Level 11
Joined
May 16, 2016
Messages
730
I'm trying to create a teleport ability that can target friendly units (not just town structures) like mass teleport or staff of teleportation can, but I want to be invulnerable when teleporting, like town portal scroll. (mass teleport/staff of teleportation leave you vulnerable during the cast, unlike town portal).

So my question is how can I either get the town portal ability to target units, or how can I make myself invulnerable while using the staff of teleportation ability? (either option would solve the problem)

I tried applying an invulnerable buff to staff of teleportation (Didn't work. I can teleport to friendly units, but I'm not invulnerable)

I tried switching the targets allowed on town portal to the same as staff of teleportation (Didn't work. I'm invulnerable, but I can't teleport to friendly units.)

Thank you in advance



View attachment 303361 View attachment 303362
 

Attachments

  • STAFF OF TELEPORT.w3x
    17.5 KB · Views: 59
Status
Not open for further replies.
Top