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

Is there a problem with a trigger looking like this?

Status
Not open for further replies.
Level 13
Joined
Oct 18, 2013
Messages
692
  • Set TempLoc = (Position of Spawner)
  • Set CasterLoc = (TempLoc offset by 110.00 towards 25.00 degrees)
  • Hero - Instantly revive unit1 at CasterLoc, Hide revival graphics
  • Unit - Move unit1 instantly to CasterLoc
  • Custom script: call RemoveLocation (udg_CasterLoc)
  • Set CasterLoc = (TempLoc offset by 110.00 towards 60.00 degrees)
  • Hero - Instantly revive unit2 at CasterLoc, Hide revival graphics
  • Unit - Move unit2 instantly to CasterLoc
  • Custom script: call RemoveLocation (udg_CasterLoc)
  • Set CasterLoc = (TempLoc offset by 110.00 towards 330.00 degrees)
  • Hero - Instantly revive unit3 at CasterLoc, Hide revival graphics
  • Unit - Move unit3 instantly to CasterLoc
  • Custom script: call RemoveLocation (udg_CasterLoc)
  • Custom script: call RemoveLocation (udg_TempLoc)

I have never had bugs with this before, except now sometimes triggers I have like this in my map will bug. Last time I tried this, unit1 moved exactly where he was supposed to, while unit2 and unit3 were moved to the center of the map? I don't understand.. Would replacing CasterLoc with 3 separate point variables fix it? or perhaps one local location? I can't see why this doesn't work .-.
 
Level 13
Joined
Oct 18, 2013
Messages
692
Very nasty solution, as I would then have to create like 30-40 more point variables :c

using locals wouldn't be the worst, it would still be a lot of re-scripting Dx
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
Very nasty solution, as I would then have to create like 30-40 more point variables :c

What...? You're temporarily using 2 UNIQUE location variables to see if there are any conflicting triggers. If the trigger works when using two different location variables, that means there are conflicting triggers elsewhere. If it still doesn't work, then I will need to see the whole trigger.
 
Level 13
Joined
Oct 18, 2013
Messages
692
what do you mean by unique location variables? I use them both as volatile variables, only using them to move stuff RIGHT after I set them to something, which I thought was fine.
 
Level 13
Joined
Oct 18, 2013
Messages
692
Yeah, I understand. But you have to understand that if I did this, i would have to spend like 3 hours just replacing all instances of temploc. Is using locals the only way to have volatile variables that I can set and use immediately without error?
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
Yeah, I understand. But you have to understand that if I did this, i would have to spend like 3 hours just replacing all instances of temploc. Is using locals the only way to have volatile variables that I can set and use immediately without error?

I am so confused. Why would it take 3 hours for you to test a few lines? You aren't changing ANYTHING, you're just replacing this trigger's TempLoc and CasterLoc with something else. More specifically, two NEW variables so that we know that you don't use it any other trigger other than this one. You are to NOT touch any other trigger other than the one you posted so that we can have 100% assurance of conflicting triggers.
 
Level 13
Joined
Oct 18, 2013
Messages
692
Ah, my bad then. :p I thought the implications of you telling me to do this is to replicate it across each other trig that also has this issue. sure, I can swap out casterloc and temploc in that trig and see if it still happens. I'm ASSUMING that changing it will. It almost has to be a trigger conflict. Only other thing would be that moving a unit can crash a trigger thread, or something silly like that. I'll edit this and get back to you with results.

edit: no bug with different vars. what now?
 
Last edited:
Level 13
Joined
Oct 18, 2013
Messages
692
If the issue is fixed from using unique variables, my guess is that TempLoc is being removed in some other trigger that runs simultaneously with this one, which explains why your units are being moved to the center of the map.

thats what im assuming the problem is too. Now what I need to know nre all the situations in which a trigger can run during another.
 
Level 13
Joined
Oct 18, 2013
Messages
692
LoL, you guys are hilarious. It took me 3 hours to read this. What? 3 hours to read one thread? Well, shit, I had to read it over like 300 so I could have a unique read variable. What would be unique about reading the same post again? Oh, my bad.

are you trolling, or just high? ;p

@KILLCIDE, 'systems' is pretty broad, but I'm not using anything I'd call a system that uses CasterLoc or TempLoc.
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
@KILLCIDE, 'systems' is pretty broad, but I'm not using anything I'd call a system that uses CasterLoc or TempLoc.
There are a handful of systems in the resource section that use variable names without a prefix. A system is also most likely to run simultaneously with another trigger due to their broad range of events, which is why i asked for systems.
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
variable names without a prefix? what do you mean by that? o_O

Let's say we triggered two spells: Earthquake & Far Sight. It's safe to assume that both of these spells will require a location variable, for now we can call it TempLoc (extremely generic name). Let's say they both miraculously ran simultaneously and had conflicting issues with TempLoc. An easy fix is to add a prefix: EQ_TempLoc (for Earthquake) and FS_TempLoc (for Far Sight).

I know a few of the systems I use have extremely generic names like: TempX, TempY, TempLoc, Caster, etc.
 
Level 13
Joined
Oct 18, 2013
Messages
692
Ah, kk. I understand what you mean.

That's one of my questions: Could both of those triggers run simultaneously? Wouldn't war3 run all actions of one spell trigger, then the 2nd?
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
Ah, kk. I understand what you mean.

That's one of my questions: Could both of those triggers run simultaneously? Wouldn't war3 run all actions of one spell trigger, then the 2nd?

For the two spells, no :p I was hoping you wouldn't notice that, I just used it as an example. However, a system such as a unit indexer can fire in the middle of both spells simply by creating a dummy unit. The unit entering the map will fire off the unit indexer, and any variables that are shared between the spell and said system will have different values than desired, thus throwing the spell off.
 
Level 13
Joined
Oct 18, 2013
Messages
692
Alright, I couldn't find a post on the list of triggers that can interrupt other triggers. Can you help me out with a list or something possibly? Then I would at least be able to narrow down how many instances of TempLoc I must switch out.. Idk though, I can't think of any triggers that would be interrupting the current one, so this problem is pretty odd.
 
Status
Not open for further replies.
Top