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

[Trigger] If condition does not work

Status
Not open for further replies.
Level 51
Joined
Dec 8, 2008
Messages
4,358
Hey guys. I'm currently facing a weird problem I've never encountered before.

I have a second hero next to my main one, which works as a bag and is always with the first one. It also acts as a brewery station, so always after a certain time you simply have to click a spell to brew a potion.

As for now, I have two potions. (see screenshots)

swallow.JPG thunderbolt.JPG

Problem is, that no matter which spell I click, there are always both items generated.

There are different spells for each potion, I even based them off other abilities (warstomp and the MK equivalent) just to be sure.

Yet it still creates both items every time my unit uses one of the two spells.

Any ideas?
 
Level 14
Joined
Jul 1, 2008
Messages
1,314
@KILLCIDE It seems like the game thinks, they have the same order ID, right?

@PROXY as far as I know, the "effect event" should work anyway, but it would not hurt to reset everything.
To answer KILLCIDEs question fully, what means MK equivalent of warstomp? Mountain King equivalent? then it most probably really IS the same order ID, so KILLCIDE's guess was right
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
I believe having two of the same order ID's on a unit / Hero will make both abilities go off at once if either one is casted. I have always avoided this problem by using Channel and or making sure that a unit / Hero didn't have two of the same default abilities, so I'm unsure.

If you based both abilities off the same one, and that ability is not Channel, then you won't be able to change the order ID. Channel is the only ability in the World Editor that actually has any changes when you change their order id. You either choose another default ability for one of them, or you base both off Channel and just change the order ID.
 
Level 22
Joined
Aug 27, 2013
Messages
3,973
I think I see the problem. You made "Brew Swallow" and "Brew Thunderbolt" based on the same ability. You only changed the orderstring of "Brew Swallow" to stomp and unfortunately, it doesn't change the order ID. So the solution is, you should make a totally new ability based on something different for one of them. It can be Thunder Clap, War Stomp, Roar, or anything. But they mustn't be based on the same ability. Hope this helps.
 
Level 14
Joined
Jul 1, 2008
Messages
1,314
so wait, how did you solve it? So it was the order strings? ...

as for the cool down I tried your map and I have no clue at all. If you cannot solve it, why not using channel anyway? Other than that, there is a possible work around to remove the ability (you have t give an ability first at map init to remove it later. Preset abilities cannot be removed) and use a dummy cool down ability.
But I am quite sure, the other guys maybe know whats going on there. off topic: witcher :)
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
Lol :p
If you based both abilities off the same one, and that ability is not Channel, then you won't be able to change the order ID. Channel is the only ability in the World Editor that actually has any changes when you change their order id.


As for the cooldown, something is interrupting the Alchemy Station, thus not making it possible for the trigger to run. Setting the backswing & cast point to 0 fixes it.


OT
I noticed that your icons get the "green" box issue whenever I opened up the menu. I checked out your texture paths and noticed you spell "ReplaceableTextures\..." wrong. You spelled it as Replacebale.


EDIT
I found the issue. You are using the GUI function "Unit - Move Unit (Instantly)" every 0.03 seconds, which interrupts all orders. If you want to keep the backswing & cast point, then you can use SetUnitX() and SetUnitY() (I personally believe it should be 0 anyway given the nature of the Alchemy Station). Both natives move the unit without interrupting orders.
 
Last edited:
Status
Not open for further replies.
Top