• 🏆 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!
  • ✅ HD Level Design Contest #1 POLL is now OPEN! Check out the stunning visuals of the final entries. 🔗Click here to cast your vote!

Must be a bug (Devour Spell (randomly not working now))

Status
Not open for further replies.
Level 9
Joined
Sep 5, 2015
Messages
369
(FIXED IT THANKS PAPA UNC.)

Basically the mimic-house (model) creature won't use devour properly. it will devour then not spit out the monster (this trigger forces the mob to spit out the creature (there's other triggers that work to get this trick to happen as well)) but then randomly it will after i did nothing new to the my map/triggers/OE/terrain/anything! LOL?
1641790188093.png


i tested this for like an hour (basically just opening the game and testing it, then losing it, coming back, staring at my game, and doing it again)
because i was proud everything was working
went to bed i wake up in the morning it just randomly doesnt work? then later on it randomly works again!!!! LOL now its broke again but one of the models that uses it will spit out the unit now when before it didnt either? LOL!!

(ive done nothing with the ability to change it. this has to be a straight up bug)

this is such a basic simple trigger too how does this not work


IM SIMPLY CURIOUS DONT TAKE THIS TOO SERIOUSLY IF YOU DONT WANT. HELP OTHERS FIRST

thanks
 
Last edited:
Level 9
Joined
Sep 5, 2015
Messages
369
it randomly just worked again.

could it have to do with the position of the unit placed onto the map by any chance? something that would change if someone else downloaded the map and opened it up and played it on their PC or whatever. something weird like that?

again i did nothing and (coincidentally) it worked now. although i did drag the mob away before attacking it instead of just right clicking it and having the paladins walk to it like normal (but why would this ever matter...lmao)


the paladins have like 0.25 attack speed (really faster) in their stat's field too btw and there's 6. this shouldnt matter though but im wondering with my trigger if the paladin begins an attack as it's eaten or something that it would bug it out?

1641790739402.png


btw this is what it looks like idk if like the mimic-house being jammed up in the corner would matter or something weird? lmao idk man

im stumped. oh well.
 

Uncle

Warcraft Moderator
Level 62
Joined
Aug 10, 2018
Messages
6,252
1) Don't use the Event "Begins casting an ability". This happens before the ability actually executes and is really only useful in certain niche situations.
Solution: Use "Starts the effect of an ability".

2) A lot of Event Responses can break after using Waits. There's different types of Event Responses, some function fine with Waits, some work like global variables which can have their values changed from other triggers (not Wait safe), and some that become Null the moment a Wait happens (not Wait safe).
Solution: Change (Casting unit) to (Triggering unit).

Also, your description of the problem is very vague. All I can gather from what you said is that the Devour ability isn't working, which leaves a lot of questions unanswered. In the future, let us know how your map works, what your intention is, the more details the better.

Also, Warcraft 3 has annoying bugs/quirks but most of the time it's either user error or a lack of understanding of the problem that's the issue.
 
Last edited:
Level 9
Joined
Sep 5, 2015
Messages
369
1) Don't use the Event "Begins casting an ability". This happens before the ability actually executes and is really only useful in certain niche situations.
Solution: Use "Starts the effect of an ability".

2) A lot of Event Responses can break after using Waits. There's different types of Event Responses, some function fine with Waits, some work like global variables which can have their values changed from other triggers (not Wait safe), and some that become Null the moment a Wait happens (not Wait safe).
Solution: Change (Casting unit) to (Triggering unit).

Also, your description of the problem is very vague. All I can gather from what you said is that the Devour ability isn't working, which leaves a lot of questions unanswered. In the future, let us know how your map works, what your intention is, the more details the better.

Also, Warcraft 3 has annoying bugs/quirks but most of the time it's either user error or a lack of understanding of the problem that's the issue.
ahhh my bad i do that regularly. just assume everybody lives in my head and has the context of the situation (i do this with literally anything big small, from real life stuff to relationships to events to work lol)

i edited it but basically:
I use this trigger (picture above) to force whatever monster that is devouring a unit to "spit it out" because naturally devour doesn't have a duration time (that works anyways lmao). and ya it just like randomly is working fine now i've tested it like 100 times after simply deleting the model and pasting it again somewhere else in my test zone.

just wondering if this was a leak or something or what? idk so strange. because after doing nothing (not changing ability, not changing unit, literally nothing just deleting 3 paladins and moving the unit closer to the paladins in the terrain window slightly) it works now.

I do believe i changed (casting unit) to (triggering unit) as well and it still did the same half-work half-broke thing.
and some that become Null the moment a Wait happens (not Wait safe).
Solution: Change (Casting unit) to (Triggering unit).
also i had a feeling it was something to do with this because i do have other triggers connected to/relating to the same unit/model (and its alternate form) that uses waits and is based around "when a unit casts ability (or uses effect which i might try that if it breaks again randomly)" but.

====================================
let us know how your map works, what your intention is, the more details the better.
also i subconsciously try to explain as much as possible in as short of a reponse as possible which always ends up making my comments jumbled unorganized messes because i feel (and it IS true naturally) people arent willing to read longer more detailed comments, anywhere on the internet for that matter. (like literally right now this entire post is a mess and its embarrassing for me. lmao)

But i've noticed that isn't really the case with TheHive people are more willing to read so i'll keep that in mind next time

thank you for the tips i will remember them
=====================================
 

Uncle

Warcraft Moderator
Level 62
Joined
Aug 10, 2018
Messages
6,252
Just because something appears to work doesn't mean that it's bug free. Using the Begins casting Event can introduce all sorts of issues due to the nature of it's design. Understand that the Event happens when a unit BEGINS casting an ability, not when the ability actually executes. This means that the user can begin casting the ability, cancel it ("Stop" command), and the trigger will still run. The result is that the ability never went off but the trigger did. The user can easily exploit this by casting/cancelling the ability in a rapid fire succession, causing the Actions to run repeatedly while the ability has never actually been successfully cast. Additionally, the ability can get interrupted by a Stun/Silence/Disable and still run it's Actions. This isn't something up for debate, if you use "Begins casting" then you're using the wrong Event (at least most of the time).

So when should you use this Event then? It's useful in situations when you want to cancel the ability if some special requirements aren't met. For example, maybe your Ability requires 500 Hit Points to cast, and if the caster has less than that amount the ability is cancelled:
  • When to use Begins casting
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Life of (Triggering unit)) Less than 500.00
      • (Ability being cast) Equal to SomeAbility
    • Actions
      • Unit - Order (Triggering unit) to Stop.

Now onto the Event Responses like (Casting unit):

Referencing that thread you can see that (Casting unit) acts like a global variable and is not MUI. This means that it can only have one value at a time and this value will be updated whenever ANY unit casts an ability. So for example, let's look at this trigger:
  • Events
  • Unit - A unit Starts the effect of an ability
  • Conditions
  • (Ability being cast) Equal to Devour
  • Actions
  • Wait 10.00 seconds
  • Unit - Kill (Casting unit)

Who do you think will be Killed after the 10.00 seconds has passed? Of course you'd assume it'd be the unit that cast the ability 10.00 seconds ago, but that's not likely to happen. Why? Because (Casting unit) acts like a global variable and is always set to the most recent unit that cast an ability. So if one of your Paladins casts Holy Light during that 10.00 second Waiting period they would become the new (Casting unit) and thus be the one to die when the action "Kill (Casting unit)" finally executes.

(Triggering unit) on the other hand is unique in that it acts like a local variable that will retain it's value throughout your entire trigger regardless of Waits or no Waits.
 
Last edited:
Level 9
Joined
Sep 5, 2015
Messages
369
@Uncle I completely understand. (you're very articulate)
thank you for your time and patience i appreciate it. im realizing alot about game-development, atleast at its core, it's really interesting the kind of unique perspective(s) you have to constantly have..it's like some detective stuff and at the end you're like "oh my god...-.- thats what it is!" crazy
Who do you think will be Killed after the 10.00 seconds has passed? Of course you'd assume it'd be the unit that cast the ability 10.00 seconds ago, but that's not likely to happen. Why? Because (Casting unit) acts like a global variable and is always set to the most recent unit that cast an ability. So if one of your Paladins casts Holy Light during that 10.00 second Waiting period they would become the new (Casting unit) and thus be the one to die when the action "Kill (Casting unit)" finally executes.

(Triggering unit) on the other hand is unique in that it acts like a local variable that will retain it's value throughout your entire trigger regardless of Waits or no Waits.
Also this catches my interest especially because I COULD'VE SWORE once or twice i seen one of my paladins turn team's then back to its original team(due to my trigger posted above) (although the boss did the same thing too so i ignored it as a problem)

I completely understand everything you're saying Uncle. Thanks brothabrotha
 
Status
Not open for further replies.
Top