• 🏆 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] Special effect problem (makes no sense)

Status
Not open for further replies.
Level 3
Joined
Mar 22, 2009
Messages
35
This is my special effects trigger that I am experiencing problems with:
  • Events
  • Unit - A unit Dies
  • Conditions
    • (Unit-type of (Dying unit)) Equal to Heldan
  • Actions
    • Wait 1.00 seconds
    • Special Effect - Create a special effect attached to the overheadd of Heldan 0256 <gen> using Abilities\Spells\Human\Resurrect\ResurrectCaster.mdl
    • Wait 1.00 seconds
    • Special Effect - Create a special effect at ((Position of Heldan 0256 <gen>) offset by (0.00, 200.00)) using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
    • Wait 0.20 seconds
    • Special Effect - Create a special effect at ((Position of Heldan 0256 <gen>) offset by (100.00, 100.00)) using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
    • Wait 0.20 seconds
    • Special Effect - Create a special effect at ((Position of Heldan 0256 <gen>) offset by (200.00, 0.00)) using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
    • Wait 0.20 seconds
    • Special Effect - Create a special effect at ((Position of Heldan 0256 <gen>) offset by (100.00, -100.00)) using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
    • Wait 0.20 seconds
    • Special Effect - Create a special effect at ((Position of Heldan 0256 <gen>) offset by (0.00, -200.00)) using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
    • Wait 0.20 seconds
    • Special Effect - Create a special effect at ((Position of Heldan 0256 <gen>) offset by (-100.00, -100.00)) using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
    • Wait 0.20 seconds
    • Special Effect - Create a special effect at ((Position of Heldan 0256 <gen>) offset by (-200.00, 0.00)) using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
    • Wait 0.20 seconds
    • Special Effect - Create a special effect at ((Position of Heldan 0256 <gen>) offset by (-100.00, 100.00)) using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
    • Wait 0.20 seconds
    • Special Effect - Create a special effect at ((Position of Heldan 0256 <gen>) offset by (0.00, 200.00)) using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
    • Wait 0.20 seconds
    • Special Effect - Create a special effect at ((Position of Heldan 0256 <gen>) offset by (0.00, 0.00)) using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
    • Wait 0.40 seconds
    • Special Effect - Create a special effect at (Position of Heldan 0256 <gen>) using Abilities\Spells\Undead\RaiseSkeletonWarrior\RaiseSkeleton.mdl
    • Wait 0.20 seconds
    • Unit - Create 1 Skeletal Heldan for Neutral Hostile at (Position of Heldan 0256 <gen>) facing Default building facing degrees
    • Game - Display to (All players) for 20.00 seconds the text: |c00FF1A1AHeldan wa...
    • Unit - Order (Last created unit) to Attack-Move To (Center of WizardGoal <gen>)
Only the four first special effects shows and the rest of the actions except the display text action gets skipped. The funny thing is that this worked perfectly before I changed the unit it would affect. Now with the new unit it will only show the four first effects and I can make no sense of it. Please help me!
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,178
Heldan 0256 dies, and decays.
Position of Heldan 0256 <gen> returns the location of Heldan.
Heldan has died and decyed so no longer exists (if a unit) or has been moved from visability (if hero).
Thus Position of Heldan 0256 <gen> = middle of map or the edge of map out of visable range.

On top of that logical flaw, this trigger also leaks.

I would advise storingly to use his position in a local location or x / y reals and then using them as the point to make the effects and spawn the unit. This would not be subject to problems caused by time (him decying), leak less if not at all and also will be more efficent.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
That trigger can be improved, as Dr Super Good already said: you must remove the leaks.

What also could be a good idea is to do something like this (no time for the correct trigger-commands, sorry):

  • Your trigger
  • Actions
    • Set TempLoc[1] = Position of Dying unit
    • Set X = -200
    • Set TempInteger = 0
    • For every integer A between 1 and 4 (I don't know exactly)
      • Set Y = -200
      • Set X = X + 100
      • For every Integer B between 1 and 4 (same as A)
        • Set TempLoc[2] = TempLoc[1], offset by X, Y
        • Set TempInteger = TempInteger + 1
        • Special Effect - Create a special effect at (TempLoc[1]), your Special Effect
        • Set TempSE[TempInteger] = (Last Created SE)
        • Custom Script: call RemoveLocation(udg_TempLoc[2])
        • Wait 0.20 Seconds
    • For every Integer Between 1 and (amount of Special Effects...)
      • Special Effect - Destroy TempSE[Integer A]
    • Custom Script: call RemoveLocation(udg_TempLoc[1])
I'm not sure if this is how the special effect should look like, but at a first glance at your trigger it's something like this.
If it isn't: you can probably create it like this, it's easier to remove the leaks
 
Level 3
Joined
Mar 22, 2009
Messages
35
I am a noob at triggering so I dont know how to do that X and Y thing and I am not even sure what I leak is, how to fix leaks and what that is so bad about it. And variables confuses me. I want to be a pro! :cry:
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Leaks Are...

Leaks are temporary files warcraft stores in it's memory ("for later use").
Example: You want to place a unit at a location, let's say the center of the playable map area, warcraft stores the location "center of the playable map".

If leaks like this example aren't fixed, warcraft needs to remember too much (in a TD/maul with 50 levels and 20 units per spawn that's 1000 leaks/player).
That can cause lag.

At the end of the game, warcraft removes all those leaks, which causes the black screen at the end (the time between the chatroom and the overview).
How to fix leaks: Things that leak

The X and Y thing are Variables
Both of them are Integer Variables (without an array).

First:
Create the variable (there is a green "X" in your trigger editor, click it to set variables).
Then use the trigger "Set Variable" (in category "All", it's somewhere in the top).

Variables in the trigger:

X, Y, TempInteger
  • "Integer" Variable
  • No Array
TempLoc
  • "Point" Variable
  • Array = "3" (you won't need more than 3)
TempSE
  • "Special Effect" Variable
  • Array = 100 (to be sure).
If you need more information, feel free to ask.
 
Level 3
Joined
Mar 22, 2009
Messages
35
Ok, thanks for the info. Now my trigger looks like this:

  • Events
    • Unit - A unit Dies
  • Conditions
    • (Unit-type of (Dying unit)) Equal to Heldan
  • Actions
    • Set TempLoc[1] = (Position of (Dying unit))
    • Set X = -200
    • Set TempInteger = 0
    • For each (Integer A) from 1 to 4, do (Actions)
      • Loop - Actions
        • Set Y = -200
        • Set X = (X + 100)
        • For each (Integer B) from 1 to 10, do (Actions)
          • Loop - Actions
            • Set TempLoc[2] = (TempLoc[1] offset by (-200.00, -200.00))
            • Set TempInteger = (TempInteger + 1)
            • Special Effect - Create a special effect at TempLoc[1] using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
            • Set TempSE[TempInteger] = (Last created special effect)
            • Custom script: call RemoveLocation(udg_TempLoc[2])
            • Wait 0.20 seconds
        • For each (Integer B) from 1 to 12, do (Actions)
          • Loop - Actions
            • Special Effect - Destroy TempSE[(Integer A)]
        • Custom script: call RemoveLocation(udg_TempLoc[1])
What now? Now ten special effects spawn at his corpse with 0.20 seconds interval. But how do I get them to pop up in the right locations?
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Ok, thanks for the info. Now my trigger looks like this:

  • Events
    • Unit - A unit Dies
  • Conditions
    • (Unit-type of (Dying unit)) Equal to Heldan
  • Actions
    • Set TempLoc[1] = (Position of (Dying unit))
    • Set X = -200
    • Set TempInteger = 0
    • For each (Integer A) from 1 to 4, do (Actions)
      • Loop - Actions
        • Set Y = -200
        • Set X = (X + 100)
        • For each (Integer B) from 1 to 10, do (Actions)
          • Loop - Actions
            • Set TempLoc[2] = (TempLoc[1] offset by (-200.00, -200.00))
            • Set TempInteger = (TempInteger + 1)
            • Special Effect - Create a special effect at TempLoc[1] using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
            • Set TempSE[TempInteger] = (Last created special effect)
            • Custom script: call RemoveLocation(udg_TempLoc[2])
            • Wait 0.20 seconds
        • For each (Integer B) from 1 to 12, do (Actions)
          • Loop - Actions
            • Special Effect - Destroy TempSE[(Integer A)]
        • Custom script: call RemoveLocation(udg_TempLoc[1])
What now? Now ten special effects spawn at his corpse with 0.20 seconds interval. But how do I get them to pop up in the right locations?

You need to set TempLoc[2] = TempLoc[1], offset by X, Y (the variables).
Then show the special effect at TempLoc[2] (not 1)
The variables will change and therefore TempLoc[2] will change and the position of the Special Effect will also change.
 
Level 3
Joined
Mar 22, 2009
Messages
35
I cant set TempLoc[2] = TempLoc[1], offset by X, Y. I cant select any variables, it just says "No variables of this type defined". Integer variables are not valid for selection. :sad:
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
I cant set TempLoc[2] = TempLoc[1], offset by X, Y. I cant select any variables, it just says "No variables of this type defined". Integer variables are not valid for selection. :sad:

Convert Real to Integer...
(The variables are Integers, but locations are reals, since there are no real variables, you will need to convert the real to an integer).
 
Level 3
Joined
Mar 22, 2009
Messages
35
Ok, I changed X and Y to Reals and my trigger now looks like this:

  • Events
    • Unit - A unit Dies
  • Conditions
    • (Unit-type of (Dying unit)) Equal to Heldan
  • Actions
    • Set TempLoc[1] = (Position of (Dying unit))
    • Set X = -200.00
    • Set TempInteger = 0
    • For each (Integer A) from 1 to 4, do (Actions)
      • Loop - Actions
        • Set Y = -200.00
        • Set X = (X + 100.00)
        • For each (Integer B) from 1 to 10, do (Actions)
          • Loop - Actions
            • Set TempLoc[2] = (TempLoc[1] offset by (X, Y))
            • Set TempInteger = (TempInteger + 1)
            • Special Effect - Create a special effect at TempLoc[2] using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
            • Set TempSE[TempInteger] = (Last created special effect)
            • Custom script: call RemoveLocation(udg_TempLoc[2])
            • Wait 1.00 seconds
        • For each (Integer B) from 1 to 12, do (Actions)
          • Loop - Actions
            • Special Effect - Destroy TempSE[(Integer A)]
        • Custom script: call RemoveLocation(udg_TempLoc[1])
I probably did something wrong because it's the same thing as before except that the animations show at his corpse offset by -200, -200. Sorry for not getting it right :p
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Ah, I see...
You know what? Just tell me how it should look like and I will create it ^^
Probably, you should use "polar offset" (so it becomes a circle), but I will create some examples...


This is the easier example, a few simple circles around the dying unit...
  • Set TempLoc[1] = (Position of Dying Unit)
  • Set X = 256.00
  • Set TempInteger = 0
  • For each (Integer A) from 1 to 4, do (Actions)
    • Loop - Actions
      • Wait 0.10 seconds
      • Set Y = 0.00
      • Set X = (X - 64.00)
      • For each (Integer B) from 1 to 6, do (Actions)
        • Loop - Actions
          • Set TempLoc[2] = (TempLoc[1] offset by X towards Y degrees)
          • Set TempInteger = (TempInteger + 1)
          • Special Effect - Create a special effect at TempLoc[2] using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
          • Set TempSE[TempInteger] = (Last created special effect)
          • Set Y = (Y + 60.00)
          • Custom script: call RemoveLocation(udg_TempLoc[2])
  • For each (Integer A) from 1 to 24, do (Actions)
    • Loop - Actions
      • Special Effect - Destroy TempSE[(Integer A)]
  • Custom script: call RemoveLocation(udg_TempLoc[1])
Special Effect: (It's a bit massed, but you can reduce the amount of effects, don't forget to reduce the "DestroySpecial effect" and "Set Y = Y + ???")
se1j.jpg




This creates 2 types of special effects
  • Set TempLoc[1] = (Position of Dying Unit)
  • Set X = 256.00
  • Set TempInteger = 0
  • For each (Integer A) from 1 to 4, do (Actions)
    • Loop - Actions
      • Wait 0.10 seconds
      • Set Y = 0.00
      • Set X = (X + 128.00)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Integer A) mod 2) Equal to 1
        • Then - Actions
          • For each (Integer B) from 1 to 6, do (Actions)
            • Loop - Actions
              • Set TempLoc[2] = (TempLoc[1] offset by X towards Y degrees)
              • Set TempInteger = (TempInteger + 1)
              • Special Effect - Create a special effect at TempLoc[2] using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
              • Set TempSE[TempInteger] = (Last created special effect)
              • Set Y = (Y + 60.00)
              • Custom script: call RemoveLocation(udg_TempLoc[2])
        • Else - Actions
          • For each (Integer B) from 1 to 8, do (Actions)
            • Loop - Actions
              • Set TempLoc[2] = (TempLoc[1] offset by X towards Y degrees)
              • Set TempInteger = (TempInteger + 1)
              • Special Effect - Create a special effect at TempLoc[2] using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
              • Set TempSE[TempInteger] = (Last created special effect)
              • Set Y = (Y + 45.00)
              • Custom script: call RemoveLocation(udg_TempLoc[2])
  • For each (Integer A) from 1 to 28, do (Actions)
    • Loop - Actions
      • Special Effect - Destroy TempSE[(Integer A)]
  • Custom script: call RemoveLocation(udg_TempLoc[1])
Special Effect: (You can change the special effects)
se2.jpg




This 'bends' the effect slightly, so it looks different
  • Set TempLoc[1] = (Position of Dying Unit)
  • Set X = 256.00
  • Set TempInteger = 0
  • For each (Integer A) from 1 to 4, do (Actions)
    • Loop - Actions
      • Wait 0.10 seconds
      • Set Y = 0.00
      • Set X = (X + 64.00)
      • For each (Integer B) from 1 to (4 + (1 x (Integer A))), do (Actions)
        • Loop - Actions
          • Set TempLoc[2] = (TempLoc[1] offset by X towards Y degrees)
          • Set TempInteger = (TempInteger + 1)
          • Special Effect - Create a special effect at TempLoc[2] using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
          • Set TempSE[TempInteger] = (Last created special effect)
          • Set Y = (Y + (360.00 / (4.00 + (1.00 x (Real((Integer A)))))))
          • Custom script: call RemoveLocation(udg_TempLoc[2])
  • For each (Integer A) from 1 to 26, do (Actions)
    • Loop - Actions
      • Special Effect - Destroy TempSE[(Integer A)]
  • Custom script: call RemoveLocation(udg_TempLoc[1])
Special Effect: (You can change anything you want, the "1.00 x Real((int)" is so you can modify it easily)
se3.jpg



As you can see: the base of a special effect is... math :D
Lucky me, since I'm goot at it -.-

Your problem is actually that you don't change the Y (it stays the same in your trigger).
+ You didn't remove the leaks, since you use TempSE(Integer A), while it should be Integer B ^^

Don't forget to calculate how many special effects you've used, so you are sure you've removed all leaks.
A simple trick to 'calculate' it, is to show a game-message that shows "TempInteger" at the end of the trigger, which equals the amount of special effects ^^
 
Level 3
Joined
Mar 22, 2009
Messages
35
This is my special effect. It starts with a angel coming down (the ressurection spell effect) and then this:
It isn't a circle, it's like in the second picture. Hope you understand all this XD
 

Attachments

  • Bra.jpg
    Bra.jpg
    42.1 KB · Views: 79
  • BRAA.jpg
    BRAA.jpg
    31.3 KB · Views: 123
Last edited:
Level 28
Joined
Jan 26, 2007
Messages
4,789
Hahaha, I love your drawings :D
Well, it makes sense ^^ first I thought you wanted to create the 'illusion' of a circle with a square set of special effects ^^

Be sure to read everything, at the end of the trigger is something strange... but it's for a reason :p

I've got my own drawing of it, with some math on it, but I'll explain it to you of course ^^
I know it's a bit messy, but we'll need the data on it :p
It isn't as hard as it looks (but maybe that's because I've got 6-8 hours of math a week)
Notes

  • A, B, C, D = Special effects at the corner.
  • E, F, G, H = Special effects in the middle of a line
  • x = Distance between position of dying unit (X) and special effect at the corners (A, B, C, D)
  • y = Distance between 2 special effects at the corner
So, what do we need:
  • The distance between X and A-D (let's say it's 256...)
  • The distance between X and E-H
  • The amount of degrees we need to move for each special effects
Now, that isn't hard to calculate...
x = 256 => y² = x² + x² => y² = 2x² => y² = 2 * (256²) => y = 362

We only need half of it, so the distance between A and F (and so on) is 181.
The distance between F and X is then 181 (hurray)

Now, how many degrees do we need to turn for each special effect?
360°/8 = 45°

But we need to change between Distance = 256 and Distance = 181
That's why we use the modulo (Integer A divided by 2)

If the rest is 0, Integer A = 2, 4, 6, 8 or 10 (since you can divide that by 2).
Otherwise (rest = 1), Integer A = 1, 3, 5, 7 or 9

That's it... now, let's pour that into a little trigger :D

Let's see... these are the variables we need (+ the reason)
  • "TempReal" (real variable, array = at least 2) - we need it to set the distance/Degrees of the SE
  • "TempLoc" (Point variable, array = at least 2) - we need it to remove the leaks
  • "TempInteger" (Integer variable, array doesn't matter) - Again, to remove the leaks
  • "TempSE" (Special Effect variable, array = at least 20) - To remove leaks

This is how the trigger should look like:
  • Hero Dies
  • Events
    • Unit - A unit Dies
  • Conditions
    • ((Dying unit) is A Hero) Equal to True
  • Actions
    • Set TempLoc[1] = (Position of (Dying unit))
    • Set TempInteger = 0
    • Set TempReal[2] = 405.00
    • For each (Integer A) from 1 to 10, do (Actions)
      • Loop - Actions
        • Wait 0.20 seconds
        • Set TempInteger = (TempInteger + 1)
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Integer A) Greater than 1
          • Then - Actions
            • Set TempReal[2] = (TempReal[2] - 45.00)
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • ((Integer A) mod 2) Equal to 0
              • Then - Actions
                • Set TempReal[1] = 256.00
                • Set TempLoc[2] = (TempLoc[1] offset by TempReal[1] towards TempReal[2] degrees)
                • Special Effect - Create a special effect at TempLoc[2] using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
                • Set TempSE[TempInteger] = (Last created special effect)
                • Custom script: call RemoveLocation(udg_TempLoc[2])
              • Else - Actions
                • Set TempReal[1] = 181.02
                • Set TempLoc[2] = (TempLoc[1] offset by TempReal[1] towards TempReal[2] degrees)
                • Special Effect - Create a special effect at TempLoc[2] using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
                • Set TempSE[TempInteger] = (Last created special effect)
                • Custom script: call RemoveLocation(udg_TempLoc[2])
          • Else - Actions
            • Special Effect - Create a special effect at TempLoc[1] using Abilities\Spells\Human\Resurrect\ResurrectCaster.mdl
            • Set TempSE[TempInteger] = (Last created special effect)
    • For each (Integer A) from 1 to 10, do (Actions)
      • Loop - Actions
        • Special Effect - Destroy TempSE[(Integer A)]
    • Custom script: call RemoveLocation(udg_TempLoc[1])
    • Set TempLoc[1] = (Position of (Triggering unit))
    • Hero - Instantly revive (Triggering unit) at TempLoc[1], Hide revival graphics
    • Custom script: call RemoveLocation(udg_TempLoc[1])
  • The first loop is clear, that's the amount of special effects you want.
  • The first If - Then - Else is to define which special effect, since the 10th is an exception
  • The second If - Then - Else is to define the distance (TempReal[1]) of the special effect (changes every SE).
  • The second loop is to clear the leaks
  • Then I reset TempLoc[1], in the case that multiple heroes die at the same time (check added map for that), otherwise the hero would ressurect at the spot of the hero that died last.
  • And then, finally, revive the hero at the place of his death.

There might be an easier way to do it, but well... that's how I do it ^^
I think this is a pretty good trigger, the bad side is that you'll need some math...



I've added a test-map, so it's easier for you to copy
I hope you understand all this... otherwise, just create a special effect in a circle, that's easier ^^

Hehh... I might create a tutorial for this stuff -.-'
 

Attachments

  • Drawing.jpg
    Drawing.jpg
    48.3 KB · Views: 103
  • SE.w3x
    28.5 KB · Views: 68
Last edited:
Level 3
Joined
Mar 22, 2009
Messages
35
Argh, things like "x = 256 => y² = x² + x² => y² = 2x² => y² = 2 * (256²) => y = 362" just melts my brain. Maybe it's because my math lessons are all the same. The teacher comes in and says "work" and then everyone just talk away the lesson instead because we are too lazy to work in the book. Anyway, I may not get a shit of how to actually create the trigger, but I looked at the final results (the map) and it is almost as I want it. I know this is more detailed and contains things not said before. I am really thankful for what you have done so far. However, here's the differences between what I want and what you did:

More drawings! :p
 

Attachments

  • My effect.jpg
    My effect.jpg
    109.2 KB · Views: 97
  • Raise dead effect.jpg
    Raise dead effect.jpg
    101.8 KB · Views: 113
  • Your effect.jpg
    Your effect.jpg
    74.5 KB · Views: 68
Last edited:
Level 28
Joined
Jan 26, 2007
Messages
4,789
What? :O lols
That's Pythagoras, one of the basics of math :p
a² = b² + c²
The long side ² = small side ² + other small side ²


That's sad xD

Do you understand the rest of the trigger?
Why I have used modulo (and how it works), why the if - then - else thingies are there and things like that?
However, I've updated the map in the previous post :p

Credits go to... ap0calypse_DaM (= me) for the 1337-icon :) (yeah, I didn't have anything better to do... the icon sucks anyway :p)
 
Level 7
Joined
Apr 7, 2009
Messages
241
What? :O lols
That's Pythagoras, one of the basics of math :p
a² = b² + c²
The long side ² = small side ² + other small side ²


That's sad xD

Do you understand the rest of the trigger?
Why I have used modulo (and how it works), why the if - then - else thingies are there and things like that?
However, I've updated the map in the previous post :p

Credits go to... ap0calypse_DaM (= me) for the 1337-icon :) (yeah, I didn't have anything better to do... the icon sucks anyway :p)

Nope, I do not understand the trigger :p
You missed a few things from the previous drawings, but otherwise it's cool.
But when I imported the triggers to my map, then the "create unit at blablabla" triger stopped working, so there's no skeleton now :(
Thanks for taking time trying to solve my shitty problem btw :thumbs_up:
You will get credit in my sucky map :D
 
Last edited:
Level 7
Joined
Apr 7, 2009
Messages
241
*Confused*
You're Maiskolven and I-am-murloc? :p

Anyway, set the unit in "Unit - create unit" to the correct unit, it should work...

Oh sorry, this is my real user :grin:
Anyway, this is how it looks now:
  • Events
    • Unit - A unit Dies
  • Conditions
    • (Dying unit) Equal to Heldan 0256 <gen>
  • Actions
    • Set TempLoc[1] = (Position of (Dying unit))
    • Set TempInteger = 0
    • Set TempReal[2] = 405.00
    • For each (Integer A) from 1 to 10, do (Actions)
      • Loop - Actions
        • Wait 0.20 seconds
        • Set TempInteger = (TempInteger + 1)
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Integer A) Greater than 1
          • Then - Actions
            • Set TempReal[2] = (TempReal[2] - 45.00)
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • ((Integer A) mod 2) Equal to 0
              • Then - Actions
                • Set TempReal[1] = 256.00
                • Set TempLoc[2] = (TempLoc[1] offset by TempReal[1] towards TempReal[2] degrees)
                • Special Effect - Create a special effect at TempLoc[2] using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
                • Set TempSE[TempInteger] = (Last created special effect)
                • Custom script: call RemoveLocation(udg_TempLoc[2])
              • Else - Actions
                • Set TempReal[1] = 181.02
                • Set TempLoc[2] = (TempLoc[1] offset by TempReal[1] towards TempReal[2] degrees)
                • Special Effect - Create a special effect at TempLoc[2] using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
                • Set TempSE[TempInteger] = (Last created special effect)
                • Custom script: call RemoveLocation(udg_TempLoc[2])
          • Else - Actions
            • Special Effect - Create a special effect at TempLoc[1] using Abilities\Spells\Human\Resurrect\ResurrectCaster.mdl
            • Wait 0.80 seconds
            • Set TempSE[TempInteger] = (Last created special effect)
    • For each (Integer A) from 1 to 10, do (Actions)
      • Loop - Actions
        • Special Effect - Destroy TempSE[(Integer A)]
    • Custom script: call RemoveLocation(udg_TempLoc[1])
    • Set TempLoc[1] = (Position of (Triggering unit))
    • Special Effect - Create a special effect at TempLoc[1] using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
    • Unit - Create 1 Skeletal Heldan for Neutral Hostile at TempLoc[1] facing Default building facing degrees
    • Special Effect - Destroy (Last created special effect)
    • Custom script: call RemoveLocation(udg_TempLoc[1])
I dont remember changing anything except the unit to be created when I took it from your map (and there it worked perfectly). Why must there always be problems? :p
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Erm, wow...
The only thing I can see, is that the unit is created for neutral hostile instead of the owner of the dying unit, but it should still spawn :p

Maybe... the vision of the dying unit (heldan) is gone, because he is dead and... you're looking at the fog of war and that's why you can't see the skeleton has been spawned? xD
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
Why would you use integer variables for the coordinates? They are calculated by WC3 as reals, and are used as reals, so no use making an integer variable for them,,

EDIT: Damn, didnt see the next page -_-'
 
Status
Not open for further replies.
Top