• 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.

Casting Problem

Status
Not open for further replies.
Level 24
Joined
Nov 9, 2006
Messages
2,561
My brain is just not working today.
The problem is that i cant make the second push here, only the first.
Every time i use the spell the second dummy throwes the crate a way long other place for some reason.
I'd also like to know how i can select all units in an area without using pick unit group triggers...
  • Static Field
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Static Field
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in (Units within (((Real((Level of Static Field for (Triggering unit)))) x 10.00) + 240.00) of (Target point of ability being cast) matching ((((Matching unit) is alive) Equal to True) and ((Unit-type of (Matching unit)) Equal to Levitated C Greater than 0
        • Then - Actions
          • Unit Group - Pick every unit in (Units within (((Real((Level of Static Field for (Triggering unit)))) x 10.00) + 240.00) of (Target point of ability being cast) matching ((((Matching unit) is alive) Equal to True) and ((Unit-type of (Matching unit)) Equal to Levitated Crate))) and do (Unit Group - Add (Picked unit) to StaticFieldGroup)
          • -------- --------
          • Set StaticFieldTarget = (Random unit from StaticFieldGroup)
          • Unit Group - Remove StaticFieldTarget from StaticFieldGroup
          • Unit Group - Remove StaticFieldTarget from MaximumFloatingObjects
          • Special Effect - Create a special effect at (Position of StaticFieldTarget) using Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • -------- --------
          • Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at (Target point of ability being cast) facing (Position of StaticFieldTarget)
          • Set FacingAngleVariable = (Facing of (Last created unit))
          • Unit - Remove (Last created unit) from the game
          • -------- --------
          • Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at ((Target point of ability being cast) offset by ((Distance between (Position of StaticFieldTarget) and (Target point of ability being cast)) x 4.00) towards FacingAngleVariable degrees) facing (Target point of ability being cast)
          • Set StaticFieldPoint = (Position of (Last created unit))
          • Unit - Remove (Last created unit) from the game
          • -------- --------
          • Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at (Position of StaticFieldTarget) facing StaticFieldPoint
          • Unit - Add Throw Object (Mados) to (Last created unit)
          • Unit - Order (Last created unit) to Neutral Pandaren Brewmaster - Breath Of Fire StaticFieldPoint
          • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
          • Unit - Remove StaticFieldTarget from the game
          • Custom script: call RemoveLocation(udg_StaticFieldPoint)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in StaticFieldGroup) Greater than 0
            • Then - Actions
              • Set StaticFieldTarget = (Random unit from StaticFieldGroup)
              • Unit Group - Remove StaticFieldTarget from StaticFieldGroup
              • Unit Group - Remove StaticFieldTarget from MaximumFloatingObjects
              • Special Effect - Create a special effect at (Position of StaticFieldTarget) using Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
              • Special Effect - Destroy (Last created special effect)
              • -------- --------
              • Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at (Target point of ability being cast) facing (Position of StaticFieldTarget)
              • Set FacingAngleVariable = (Facing of (Last created unit))
              • Unit - Remove (Last created unit) from the game
              • -------- --------
              • Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at ((Target point of ability being cast) offset by ((Distance between (Position of StaticFieldTarget) and (Target point of ability being cast)) x 4.00) towards FacingAngleVariable degrees) facing (Target point of ability being cast)
              • Set StaticFieldPoint = (Position of (Last created unit))
              • Unit - Remove (Last created unit) from the game
              • -------- --------
              • Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at (Position of StaticFieldTarget) facing StaticFieldPoint
              • Unit - Add Throw Object (Mados) to (Last created unit)
              • Unit - Order (Last created unit) to Neutral Pandaren Brewmaster - Breath Of Fire StaticFieldPoint
              • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
              • Unit - Remove StaticFieldTarget from the game
              • Custom script: call RemoveLocation(udg_StaticFieldPoint)
              • Unit Group - Pick every unit in StaticFieldGroup and do (Unit Group - Remove (Picked unit) from StaticFieldGroup)
            • Else - Actions
        • Else - Actions
          • Game - Display to (Player group((Owner of (Triggering unit)))) the text: Select an area with...
 
Level 24
Joined
Nov 9, 2006
Messages
2,561
That trigger leaks a lot, I recommend viewing the Things That Leak thread, if not, you'll see lag increasing as you use that spell.
Ty alot, always wondered where i could find such place for leak removing.

Spell-related threads go on the Spells and Systems forum, by the way.
~Thread Moved
Hive seem to have a section for absolutely everything! :p

This still doesnt help me why it doesnt work the second time when casting it.
 
Level 2
Joined
Aug 11, 2007
Messages
12
I'm not sure why it doesn't work a second time. But.

"((Unit-type of (Matching unit)) Equal to Levitated C Greater than 0"

Levitated C Greater than 0? What got cut off? O-o
 
Level 24
Joined
Nov 9, 2006
Messages
2,561
Its just to make the spell check if there is any units inside the aoe at all.

edit:
ok i tried to fix all leaks now as best as i could, but i still cant figure out why in the second part it throwes away the other crate many meters away...
  • Static Field
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Static Field
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in (Units within (((Real((Level of Static Field for (Triggering unit)))) x 10.00) + 240.00) of (Target point of ability being cast) matching ((((Matching unit) is alive) Equal to True) and ((Unit-type of (Matching unit)) Equal to Levitated C Greater than 0
        • Then - Actions
          • Set TempPoint = (Target point of ability being cast)
          • Special Effect - Create a special effect at TempPoint using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
          • Special Effect - Destroy (Last created special effect)
          • Set TempGroup = (Units within (((Real((Level of Static Field for (Triggering unit)))) x 10.00) + 240.00) of TempPoint matching ((((Matching unit) is alive) Equal to True) and ((Unit-type of (Matching unit)) Equal to Levitated Crate)))
          • Unit Group - Pick every unit in TempGroup and do (Unit Group - Add (Picked unit) to StaticFieldGroup)
          • Custom script: call DestroyGroup(udg_TempGroup)
          • Custom script: call RemoveLocation(udg_TempPoint)
          • -------- --------
          • Set StaticFieldTarget = (Random unit from StaticFieldGroup)
          • Unit Group - Remove StaticFieldTarget from StaticFieldGroup
          • Unit Group - Remove StaticFieldTarget from MaximumFloatingObjects
          • Set TempPoint = (Position of StaticFieldTarget)
          • Special Effect - Create a special effect at (Position of StaticFieldTarget) using Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation(udg_TempPoint)
          • -------- --------
          • Set TempPoint = (Target point of ability being cast)
          • Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at TempPoint facing (Position of StaticFieldTarget)
          • Set FacingAngleVariable = (Facing of (Last created unit))
          • Unit - Remove (Last created unit) from the game
          • -------- --------
          • Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at (TempPoint offset by ((Distance between (Position of StaticFieldTarget) and (Target point of ability being cast)) x 4.00) towards FacingAngleVariable degrees) facing (Target point of ability being cast)
          • Set StaticFieldPoint = (Position of (Last created unit))
          • Unit - Remove (Last created unit) from the game
          • Custom script: call RemoveLocation(udg_TempPoint)
          • -------- --------
          • Set TempPoint = (Position of StaticFieldTarget)
          • Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at TempPoint facing StaticFieldPoint
          • Custom script: call RemoveLocation(udg_TempPoint)
          • Unit - Add Throw Object (Mados) to (Last created unit)
          • Unit - Order (Last created unit) to Neutral Pandaren Brewmaster - Breath Of Fire StaticFieldPoint
          • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
          • Unit - Remove StaticFieldTarget from the game
          • Custom script: call RemoveLocation(udg_StaticFieldPoint)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in StaticFieldGroup) Greater than 0
            • Then - Actions
              • Set StaticFieldTarget = (Random unit from StaticFieldGroup)
              • Unit Group - Remove StaticFieldTarget from StaticFieldGroup
              • Unit Group - Remove StaticFieldTarget from MaximumFloatingObjects
              • Set TempPoint = (Position of StaticFieldTarget)
              • Special Effect - Create a special effect at (Position of StaticFieldTarget) using Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
              • Special Effect - Destroy (Last created special effect)
              • Custom script: call RemoveLocation(udg_TempPoint)
              • -------- --------
              • Set TempPoint = (Target point of ability being cast)
              • Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at TempPoint facing (Position of StaticFieldTarget)
              • Set FacingAngleVariable = (Facing of (Last created unit))
              • Unit - Remove (Last created unit) from the game
              • -------- --------
              • Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at (TempPoint offset by ((Distance between (Position of StaticFieldTarget) and (Target point of ability being cast)) x 4.00) towards FacingAngleVariable degrees) facing (Target point of ability being cast)
              • Set StaticFieldPoint = (Position of (Last created unit))
              • Unit - Remove (Last created unit) from the game
              • Custom script: call RemoveLocation(udg_TempPoint)
              • -------- --------
              • Set TempPoint = (Position of StaticFieldTarget)
              • Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at TempPoint facing StaticFieldPoint
              • Custom script: call RemoveLocation(udg_TempPoint)
              • Unit - Add Throw Object (Mados) to (Last created unit)
              • Unit - Order (Last created unit) to Neutral Pandaren Brewmaster - Breath Of Fire StaticFieldPoint
              • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
              • Unit - Remove StaticFieldTarget from the game
              • Custom script: call RemoveLocation(udg_StaticFieldPoint)
            • Else - Actions
              • Custom script: call RemoveLocation(udg_TempPoint)
        • Else - Actions
          • Game - Display to (Player group((Owner of (Triggering unit)))) the text: Select an area with...
 
Last edited:
Level 29
Joined
Jul 29, 2007
Messages
5,174
1.
I'd also like to know how i can select all units in an area without using pick unit group triggers...

Can't.

2. "((Unit-type of (Matching unit)) Equal to Levitated C Greater than 0"

A unit can't be equal to a number, do you agree with me ?
It should be:
"((Unit-type of (Matching unit)) Equal to Levitated C"

3.
  • (Number of units in (Units within (((Real((Level of Static Field for (Triggering unit)))) x 10.00) + 240.00) of (Target point of ability being cast) matching ((((Matching unit) is alive) Equal to True) and ((Unit-type of (Matching unit)) Equal to Levitated C Greater than 0
  • Set TempGroup = (Units within (((Real((Level of Static Field for (Triggering unit)))) x 10.00) + 240.00) of TempPoint matching ((((Matching unit) is alive) Equal to True) and ((Unit-type of (Matching unit)) Equal to Levitated Crate)))

Why not set them to temp group from the start ? less work for the game.

4.
The problem is that i cant make the second push here, only the first.


Maybe explain what is the porpuse of the spell and what is actualy happening ?
I for one didn't get anything from that line.
 
Level 24
Joined
Nov 9, 2006
Messages
2,561
@Ghostwolf
1. Oke
2. That is an integer condition which checks if theres absolutely any units the selected aoe, so its kind of requires yes cus i'l make an error message for it later.
3. Good point! :)
4. Sure:

Under here you can see before im about to cast the spell and after i haved casted it.
What it will basicly do is to make a dummy caster on top of the levitated crates, remove the crates and make it look like its the crates being blew away from the targeted point (Opposite direction of the targeted point x2, so it goes double the distance between the levitated crate and the point).

edit: ops forgot the screenies:
Before:
10408486qw9.jpg

After:
11933523or3.jpg
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
That is an integer condition which checks if theres absolutely any units the selected aoe, so its kind of requires yes cus i'l make an error message for it later.

You are skipping a action. It equals to this sentence:

"Pick every unit matching - matching unit is equal to 3"

You need to first pick them, and then check if there are units within the group like this
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Number of units in someGroup Equal to 0
    • Then - Actions
      • Unit - Kill all humans
    • Else - Actions
      • Unit - Kill all humans
 
Status
Not open for further replies.
Top