Shadowstep only active when unit is in stealth mode

weisdewad

New Member
Reaction score
0
Hello,

I am making a CTF-style map. There will be a rogue typed hero in the map with a spell called shadowstep (WOW-Rogue-like), in which the unit is moved to the targeted unit, and stunning and attacking it. My spell works great, but now i would like to make it usable only when my Rogue is in Stealth mode and also, if my hero learns the spell and is stealthed, then learn the spell in active mode, and if he isnt stealthed then learn it inactivated.

For stealth mode i have used the following triggers (Stealth_Invisibility equals "ghost ability" used by ud shades)
Trigger:
  • StealthOn
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Stealth
    • Actions
      • Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
      • Sound - Play StealthOn <gen> at 100.00% volume, attached to (Triggering unit)
      • Unit - Add Stealth_Invisibility to (Triggering unit)
      • Unit - Set (Triggering unit) movement speed to (Default movement speed of StealthDummy 0016 <gen>)
      • Hero - Drop (Item carried by (Triggering unit) of type FlagType1) from (Triggering unit)
      • Hero - Drop (Item carried by (Triggering unit) of type FlagType2) from (Triggering unit)
      • Wait 0.10 seconds
      • Trigger - Turn off (This trigger)
      • Trigger - Turn on StealthOff <gen>

Trigger:
  • StealthOff
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Stealth
    • Actions
      • Sound - Play StealthOn <gen> at 100.00% volume, attached to (Triggering unit)
      • Unit - Remove Stealth_Invisibility from (Triggering unit)
      • Unit - Set (Triggering unit) movement speed to (Default movement speed of (Triggering unit))
      • Wait 0.10 seconds
      • Trigger - Turn off (This trigger)
      • Trigger - Turn on StealthOn <gen>

Shadowstep:
Trigger:
  • Shadowstep
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Shadowstep
    • Actions
      • Set ShadowstepStunned = (Target unit of ability being cast)
      • Set ShadowstepLastPos = (Position of (Triggering unit))
      • Unit - Create 1 StepDummyAttack for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing (Target point of ability being cast)
      • Set ShadowstepStunner = (Last created unit)
      • Unit - Order ShadowstepStunner to Attack ShadowstepStunned
      • Unit - Add a 1.00 second Generic expiration timer to ShadowstepStunner
      • Special Effect - Create a special effect at ShadowstepLastPos using Abilities\Spells\NightElf\Blink\BlinkTarget.mdl
      • Special Effect - Create a special effect at ShadowstepLastPos using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
      • Unit - Move (Triggering unit) instantly to (Position of ShadowstepStunned)
      • Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\NightElf\Blink\BlinkTarget.mdl
      • Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
      • Unit - Order (Triggering unit) to Attack ShadowstepStunned
      • Custom script: call RemoveLocation (udg_ShadowstepLastPos)


One possible solution which i dont like so much is to build in a condition like: if unit is invisible then use spell, else do nothing..... but by that, the unit would have to get in range of the target to make the player recognize he cant use the spell right now..... very annoying.

thanks in advance for your help,
weisdewad
 

theDTD

Active Member
Reaction score
8
>how about a (boolean) variable
>if (stealth) is on set (boolean) to true, otherwise set it to false
>then in your (shadowstep) trigger
>add this in your first line
*if (boolean) = false then skip remaining actions
 

Joccaren

You can change this now in User CP.
Reaction score
54
Welcome to the Helper!!!

If your ability gives a buff, you can just check for the buff (Boolean Comparisson-Unit-Unit has buff)
Otherwise, do what theDTD said: Make a boolean variable, set it to true when the unit casts your ability, set it to false when your unit deactivates your ability and add 'YourBoolean is equal to True' in your conditions :)
 

weisdewad

New Member
Reaction score
0
i already had the same idea about the boolean, but this would cause a lot of problems when there are more than 1 rogue in the game..... i already tried to use "set custom value of unit to x" for

0=shadowstep is not learned
1=stealth is on -->add ability stealth
2=stealth is off -->remove ability stealth add stealth_off (a passive spell that does nothing)

kinda like that.... but somehow it never worked as i wanted :/

then i tried the buff thingie, added "Stats- Buff: Invisibility" and added a boolean condition checking if unit has the buff "invisibility" but somehow neither worked.... then i got crazy about it and posted my thread.

maybe i will try those two possibilities later again :/
anyone with a totally new idea..... something like NE bearform, with a alternate unit that has the exact same level as the normal unit apart of the shadowstep aswell.... but i could not figure out how to trigger that. damn.... this one's really tricky...
 

Joccaren

You can change this now in User CP.
Reaction score
54
No triggers needed. Just create your normal rogue, copy it, paste it, add a editor suffix of 'cloaked', add 'permanent invisibility' to your new unit, Then just edit bear form. Level, items ect. are kept the same beween forms when using this spell
 

weisdewad

New Member
Reaction score
0
horray!!! thanks man, i will try that later today.... if it works that way, you'll have made my day!
 

Avaleirra

Is back. Probably.
Reaction score
128
/offtopic


Lol I'm using almost the same spell in my map :p just only no stun


EDIT: and it's sortof a CTF :p
 

weisdewad

New Member
Reaction score
0
well, i started to play around with a modified bearform ability and came as far as the following:

i created a shadowstep (stealthed) and shadowstep (not stealthed) ability, typo roar and roar (morphed), while the latter needs an upgrade which the palyer can never update and hence has his shadowstep (not stealthed) always inactivated. works perfectly. only thing now is, that i can't use the spell as a hero ability :banghead:

any ideas on how to get that damned baby working?
thanks

wdw
 

Yizzy

New Member
Reaction score
20
if it works with an unit ability then make a dummy hero ability, and trigger on learn/levelup ability..
 

weisdewad

New Member
Reaction score
0
kk...

only thing i cant handle now, is to connect the level of shadowstep (not stealthed) with the level of shadowstep (stealthed).

this is my new trigger:
Trigger:
  • shadowstep
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Level of Shadowstep (dummy) for (Triggering unit)) Greater than or equal to 0
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to RogueHorde (stealthed)
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Shadowstep (stealthed) for (Triggering unit)) Equal to 0
            • Then - Actions
              • Unit - Add Shadowstep (stealthed) to (Triggering unit)
            • Else - Actions
              • Unit - Set level of Shadowstep (stealthed) for (Triggering unit) to ((Level of Shadowstep (stealthed) for (Triggering unit)) + 1)
          • Unit - Remove Shadowstep (dummy) from (Triggering unit)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to RogueHorde (not stealthed)
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Shadowstep (not stealthed) for (Triggering unit)) Equal to 0
            • Then - Actions
              • Unit - Add Shadowstep (not stealthed) to (Triggering unit)
            • Else - Actions
              • Unit - Set level of Shadowstep (not stealthed) for (Triggering unit) to ((Level of Shadowstep (not stealthed) for (Triggering unit)) + 1)
          • Unit - Remove Shadowstep (dummy) from (Triggering unit)
        • Else - Actions


so, when my not stealthed rogue learns the shadowstep (dummy) spell it will increase the level of its spell shadowstep (not stealthed), BUT NOT spell shadowstep (stealthed) of its alternate unit form rogue (stealthed).

i can feel im close to what i want to achieve.... so pls ppl be patient and keep up with the good support!<3

thanks, wdw

-edit-
damn -.- .... recently i realised another major problem: when changing from one to the other form and back.... of course all learned abilities are gone.... so i'd have to work with a thing kinda like that: add ability to "player-owned unit-type" but i cant find such a thing. any suggetions on that?
 

Joccaren

You can change this now in User CP.
Reaction score
54
Firstly, you don't need anything for the learned abilities. If the two units are heroes, they will carry across the abilities. For your level of spells problem, create an integer variable and each time one of the spells is learned, set the variable to the variable +1. Then, when the unit morphs/unmorphs, set the level of the spell to the integer variable.
 

weisdewad

New Member
Reaction score
0
Firstly, you don't need anything for the learned abilities. If the two units are heroes, they will carry across the abilities.

the thing is, shadowstep (stealthed) and shadowstep (not stealthed) are different spells, so they aren't carried across on shifiting, or did i missunderstand you?
 

weisdewad

New Member
Reaction score
0
well.... i still dont get it. maybe i am too dump for this stuff :banghead: .
maybe someone could help me out with using the variables and show me where to add which variable (respecting that there will be several rogues, not only one)

many many thanks!
wdw
 
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