• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Worldeditor MAJOR PROBLEM pls help

Status
Not open for further replies.
Level 2
Joined
Jun 15, 2007
Messages
12
How do u solve this problem.
For example u have 2 heros, when u use spell 'X', it waits for 6 secs then it creates a unit.

The problem is:
Hero A uses spell "X"
2 seconds later, hero B uses a different spell [targets a unit spell]

4seconds later, SPELL X DOES NOT CREATE THE UNIT[the unit creation is triggered via create a unit trigger]
wtf?? I triggered spell x to create a unit but it didnt happen because hero B uses a targeted spell while HERO A was channeling

any solutions to this or is this some fking wc3 editor bug?

Since i dont have help to test for this, pls tell me if the bug is only such that it occurs if the PLAYER TRIGGERING THE SPELL CAST uses another unit to create a spell or does it trigger if an allie/enemy player cast a spell.
I really need to know, thank u.

If its such that the bug only occurs if the same player uses the spell, i can still fix it by using an unselect function. Pls respond ty
 
Level 2
Joined
May 31, 2007
Messages
20
Could you please post the exact trigger, so we can analyze it for the problem.
If you don't want to post it, i can only guess that the condition is incorrect or that it doesn't fire, meaning the event is inccorect.
 
Level 11
Joined
Jul 12, 2005
Messages
764
I guess both triggers use the same unit (or something else) variable, so change one of them. When hero A starts to channel, it is stored into a variable, and 6 seconds later, a unit is created. But if hero B casts the spell, the same variable is overwritten, so the channeling trigger can not finish properly.
 
Level 2
Joined
Jun 15, 2007
Messages
12
Firstly the base spell is dnd -so its a channeling spell
Its like this, its a nuclear spell.
I create it such that u cast dnd for 6 secs[dnd is a dummy spell], It creates a locust unit missle model of flying machine. The unit then attacks ground [this deals dmg and kill the model/unit instantly] but the prob is it gets overwritten before 6 secs even if i cast a simple spell like divine shield on another hero.

I tried creating the unit first, then hide it and pause it,then make unhide and make it move faster, but that didnt work even when the unit wasnt locust[made it invul]. If u make it move slow, it can only move slow once, and wont move faster later,same with pause.

@codex
I can make the unit appear first but i cant control its movements then.

@baskovich
this works for all channeling/non-channeling spells? Any solution to it and I am guessing it works for individual players right? it wont be such that Player Red uses HERO A ability to create a unit, then PLAYER Blue uses HERO B ability and player blue's spell overwrites player A's?

Pls answer this, it stores the value for individual players right? I use a divine shield spell on a paladin while i was channeling the nuke hero and it cancels the "create a unit trigger for the nuke"
This happened for both my spells, u try it and see.Both my spells were channeling though, 1 is base on shackle,the other on dnd.
 
Level 2
Joined
Jun 15, 2007
Messages
12
  • Events
    • Unit - A unit Begins casting an ability
  • Conditions
    • (Ability being cast) Equal to Nuclear
  • Actions
    • Special Effect - Create a special effect at (Target point of ability being cast) using war3mapImported\magicmissile test.mdx
    • Set missletestwhite = (Last created special effect)
    • Special Effect - Create a special effect at (Target point of ability being cast) using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
    • Set exlaimmark = (Last created special effect)
    • Sound - Play Nuke_cast <gen>
    • Game - Display to (All players) for 4.00 seconds the text: Nuclear Launch Dete...
    • Sound - Play nuclear <gen>
    • Wait 7.00 seconds
    • Special Effect - Destroy missletestwhite
    • Special Effect - Destroy exlaimmark

  • Events
    • Unit - A unit Begins casting an ability
  • Conditions
    • (Level of Nuclear for (Triggering unit)) Equal to 1
  • Actions
    • Wait 6.00 seconds
    • Unit - Create 1 strike for (Owner of (Triggering unit)) at (Target point of ability being cast) facing Default building facing degrees
    • Animation - Change nstrike's animation speed to 10.00% of its original speed
    • Unit - Order nstrike to Attack Ground (Target point of ability being cast)
    • Wait 3.25 seconds
    • Unit - Create 1 explosion for (Owner of (Triggering unit)) at (Target point of ability being cast) facing Default building facing degrees
    • Sound - Play Nuke2s <gen> at 100.00% volume, located at targetnuke[(Player number of (Triggering player))] with Z offset 0.00
    • Animation - Play (Last created unit)'s death animation



These are the 2 triggers. The problem is while casting the nuke ability, if i were to use another spell, [say divine shield on a paladin hero by the same player], the spell DOES NOT create the "strike unit" which is the flying machine missle that deals the dmg when it attacks ground.

I tried doing this. I used a seperate trigger to trigger the 2nd trigger.
In the first trigger, its all the same except i made a unit die, then I turn on a trigger that works when the unit dies,this is the trigger that works when the unit dies

  • Events
    • Unit - A unit Dies
  • Conditions
    • (Unit-type of (Triggering unit)) Equal to Nuke dumm1
  • Actions
    • Wait 6.00 seconds
    • Unit - Create 1 strike for (Owner of nukedumm2) at (Position of nukedumm2) facing Default building facing degrees
    • Animation - Change (Last created unit)'s animation speed to 10.00% of its original speed
    • Unit - Order (Last created unit) to Attack Ground (Position of nukedumm2)

For some reason, it does NOT change the animation speed to 10% of its original speed[the animation speed is like 100% or so cause it occurs real fast] at all but its considered a seperate trigger, cause when i cast divine shield while casting the nuke spell,the spell still works.

The strike unit has locust, has its height set to 1000 ,its considered a flying unit. it has the flying machine unit missles model
 
Last edited by a moderator:
Level 11
Joined
Jul 12, 2005
Messages
764
Wow, comlete mess!

You don't seem to store any of the units or locations into variables, but you use them... I see 'nstrike', 'targetnuke', 'nukedumm2' variables.

I don't get why you use two triggers.

Build it like this:
Event - UNIT STARTS THE EFFECT OF AN ABILITY!! (not begins casting - it is buggy)
Condition - Ability being cast == Nuclear
Actions:
1. Create the effect, play sound, display text, etc...
2. Wait 6 seconds
3. Create the dummy and do the actions with it
4. Wait 1 second
5. Destroy the effect

Also, your second trigger runs every time, when a unit that has Nuclear spell at level 1. - Wrong condition.
 
Level 2
Joined
Jun 15, 2007
Messages
12
begins the effect of an ability does the same thing. The triggers after the wait trigger will not work if u had casted another spell by another hero/unit.
I have 2 levels for the nuclear, level 1 and 2 but thats not important.

When i trigger it such that a unit dies, then create a trigger that happens hen a unit dies, it works as a seperate trigger but the animation slow trigger does not work.

Any1 know how to solve it?
 
Level 2
Joined
Jun 15, 2007
Messages
12
I already built it as u instructed in the previous post, the same problem still occurs. When u cast another spell, it will overwrite the trigger and the triggers after the wait 6 secs will not occur
 
Level 2
Joined
Jun 15, 2007
Messages
12
Maybe store (Target point of ability being cast), and use that in the future? I really don't know what the problem is.
Does this happen with all of your triggered spells or only with this one? (In which you have waits.)

Maybe you should post the map...

It happens with all triggers. I think i have found a way to solve it, although i have to change the spell for i cannot do certain things

the problem is this, as u said
I guess both triggers use the same unit (or something else) variable, so change one of them. When hero A starts to channel, it is stored into a variable, and 6 seconds later, a unit is created. But if hero B casts the spell, the same variable is overwritten, so the channeling trigger can not finish properly.

It doesnt have to be the same variable btw. It just have to be a spell, any spell.

Try this simple experiment. Create a spell that when casted[by casting/channelin/start effect of an ability,etc], it waits for 10 secs, then creates unit X . While the 10 secs is being waited, try just use another hero or unit and cast a simple spell like say, divine shield or abolish magic. Notice that your unit X will not be created via trigger
 
Status
Not open for further replies.
Top