• 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] [GUI] Why wont my stomp spell work?

Status
Not open for further replies.
Level 22
Joined
Nov 14, 2008
Messages
3,256
Heya

Well have been busy workin' on a map with my team for a time now. As I'm making some spells for some heroes and some systems I thought this would be easy as a piece of cake.

But now I suffered a big problem. I'm makin some kind of shadow stomp thing. And when I cast it when no units are near, the spell and special effects work. But when I stand close to some units the spell f*cks up (sorry for my language) . It wont work so now I'm asking you to help me. Thought there shouldnt be any leaks but tell me if you find some.

Using Paladons KB System, credits for that.

The spell arent supposed to be mpi nor mui so dont worry about that.

  • SOC Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Stomp Of Corruption
    • Actions
      • Set SOC_Caster = (Triggering unit)
      • Set SOC_CasterPoint = (Position of (Triggering unit))
      • Set SOC_Integer = 0
      • Set SOC_IntegerEnd = 15
      • Set SOC_AngleInteger = 0
      • For each (Integer A) from 1 to 32, do (Actions)
        • Loop - Actions
          • Set SOC_AngleInteger = (SOC_AngleInteger + 1)
          • Set SOC_Angle[(Integer A)] = (11.25 x (Real(SOC_AngleInteger)))
      • Trigger - Turn on SOC Loop <gen>
And the loop
  • SOC Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set SOC_Integer = (SOC_Integer + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SOC_Integer Not equal to SOC_IntegerEnd
        • Then - Actions
          • For each (Integer A) from 1 to 32, do (Actions)
            • Loop - Actions
              • Set SOC_TempPoint = (SOC_CasterPoint offset by (50.00 x (Real(SOC_Integer))) towards SOC_Angle[(Integer A)] degrees)
              • Set SOC_TempGroup = (Units within 100.00 of SOC_TempPoint matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of SO
              • Special Effect - Create a special effect at SOC_TempPoint using Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl
              • Special Effect - Destroy (Last created special effect)
              • Unit Group - Pick every unit in SOC_TempGroup and do (Actions)
                • Loop - Actions
                  • Unit - Create 1 Dummy for (Owner of SOC_Caster) at SOC_TempPoint facing Default building facing degrees
                  • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                  • Unit - Add SOC Armor Dummy to (Last created unit)
                  • Unit - Set level of SOC Armor Dummy for (Last created unit) to (Level of Stomp Of Corruption for SOC_Caster)
                  • Unit - Order (Last created unit) to Attack (Picked unit)
                  • Unit - Cause SOC_Caster to damage (Picked unit), dealing (1.20 x (Real((Strength of SOC_Caster (Exclude bonuses))))) damage of attack type Spells and damage type Normal
                  • -------- This is the caster of the knockback. --------
                  • -------- If you use spells, it´s mostly the 'triggering unit' or the 'casting unit'. --------
                  • Set KBA_Caster = SOC_Caster
                  • -------- --------
                  • -------- This is the unit knocked back. Set this variable to the unit which should receive the knockback. --------
                  • -------- Use for example 'Target unit of ability being cast' or 'picked unit', 'attacking unit', 'casting unit', 'triggering unit' or whatever. --------
                  • Set KBA_TargetUnit = (Picked unit)
                  • -------- --------
                  • -------- This is the location from where the unit should be knocked back. --------
                  • -------- Don´t set this location to the position of the unit which should be knocked back. --------
                  • Set KBA_StartingPosition = SOC_CasterPoint
                  • -------- --------
                  • -------- This saves the level of the spell. --------
                  • -------- If the level shouldn´t influence the knockback, set the variable to 1. --------
                  • Set KBA_Level = (Level of Stomp Of Corruption for SOC_Caster)
                  • -------- --------
                  • -------- This determines the speed of the knockback. --------
                  • -------- If you set the speed to 0, the unit won´t move. --------
                  • Set KBA_Speed = 7.00
                  • -------- --------
                  • -------- This determines the distance knockbacked per level of the spell. --------
                  • -------- If the level shouldn´t influence the knockback, simply set this variable to the distance you wish. --------
                  • Set KBA_DistancePerLevel = 100.00
                  • -------- --------
                  • -------- The following both variables store the path of the effects used. --------
                  • -------- Effect[1] is more often used than Effect[2]. --------
                  • Set KBA_SpecialEffects[1] = Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
                  • Set KBA_SpecialEffects[2] = Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl
                  • -------- --------
                  • -------- Set the following variable to 'false' to allow trees to survive a collision with a knocked unit. --------
                  • -------- Set the following variable to 'true' to kill trees upon collision with a knocked unit. --------
                  • Set KBA_DestroyTrees = True
                  • -------- --------
                  • -------- After setting the needed variables we start the knockback. --------
                  • Trigger - Run Cast A Knockback <gen> (checking conditions)
                  • -------- Done. The unit knockbacked if the trigger triggers. --------
                  • Custom script: call DestroyGroup (udg_SOC_TempGroup)
          • Custom script: call RemoveLocation (udg_SOC_TempPoint)
        • Else - Actions
          • Custom script: call RemoveLocation (udg_SOC_CasterPoint)
          • Trigger - Turn off (This trigger)
edit: attached the test map, it's big because of a skin we're using in my teams map, credits to Black_Stan for that skin

regards

baassee
 

Attachments

  • baassee SOC test map.w3x
    284.5 KB · Views: 51
Level 16
Joined
May 1, 2008
Messages
1,605
Seas =)

I download your map and change some stuff and it works now.

1) I increased the "Picking Range" - you take 100 - I take 250

2) From the casting trigger: Replace the
  • Trigger - Turn on SOC Loop <gen>
to
  • Trigger - Run SOC Loop <gen> (checking conditions)
3) From your loop trigger: Remove the event.

I tested it and the Ability picks every Unit in range, create the effect, deals damage and knockback all picked Units - hope this correct =)
 
Level 22
Joined
Nov 14, 2008
Messages
3,256
Thanks for the reply! :grin:

Well, liked your idea but it's not meant to look like that more like this:

socscreen.jpg


That is how it should look like but it only work when no units are around :S

edit

Anyone know if I can make impale like a special effect dummy and just make the damage total (instantly) instead?

Like sending 32 impale dummies with the sp, they cant hit any units so they wont fly away ;)

and just set unit group around the thing and deal damage and knockback ?

better or worse`?
 
Level 8
Joined
Feb 15, 2009
Messages
463
2. If u say there are no leaks you fail:
Handles(in your case locs) have to be nulled too ,to finally have a memory usage of 0
and care effects will never come to 0 also if u null em

also the dummy thing is not good coz it will create great leaks(32 unit , and 32 loc where the dummys stand[or 1 if they r all on the same loc],
my tip learn jass and start using Coordinates
 
Last edited:
Level 22
Joined
Nov 14, 2008
Messages
3,256
2. If u say there are no leaks you fail:
Handles(in your case locs) have to be nulled too ,to finally have a memory usage of 0
and care effects will never come to 0 also if u null em

also the dummy thing is not good coz it will create great leaks(32 unit , and 32 loc where the dummys stand[or 1 if they r all on the same loc],
my tip learn jass and start using Coordinates

ever heard of

  • Custom script: call RemoveLocation (udg_SOC_TempPoint)
 
Level 8
Joined
Feb 15, 2009
Messages
463
I swear u if u remove a handle (so all except real , integer and boolean ) it will minor leak further if you are not setting it to null
If you understand german i show you the leaktest thread from the german mappingcommunity and you will see that it leaks on
furthermore also nulled effects will still have a minor leak and leak the most of all handles
 
Level 22
Joined
Nov 14, 2008
Messages
3,256
I swear u if u remove a handle (so all except real , integer and boolean ) it will minor leak further if you are not setting it to null
If you understand german i show you the leaktest thread from the german mappingcommunity and you will see that it leaks on
furthermore also nulled effects will still have a minor leak and leak the most of all handles

Well dunno what to say really but I'm just curious why no mighty gui creator never use cs to null locs. I know that you know locals and such but ... speechless...

Maybe thats why like 44% of everything in gui leaks, jass a little less and like 3% in vJass

http://www.hiveworkshop.com/forums/f269/things-leak-35124/

Very useful, doesnt say anything about it there
 
Level 8
Joined
Feb 15, 2009
Messages
463
I'm just telling you nso that you learn :spell_breaker:

also they maybe dont null a global if they dont destroy it coz this is (in fact) useless

again also the staying leak without nulling is acceptable(like 2 byte except effects) I think


and between jass and vjass is no leak difference its all about the coding

again my tip to start learning jass voz its so much faster then GUI(for example nearly every GUI-function has a faster Jass pendant
e.g.
JASS:
function CosBJ takes real degrees returns real
    return Cos(degrees * bj_DEGTORAD)
endfunction
U see that CosBJ is just calling the Jass native Cos = (Blizzard = cool / their BJ = weird )

nearly all wc3 functions and all programming languages work with radians
so already working with them gives more performance =D


Just right clearly they do =DThing that leak post 552
 
Level 22
Joined
Nov 14, 2008
Messages
3,256
I'm just telling you nso that you learn :spell_breaker:

also they maybe dont null a global if they dont destroy it coz this is (in fact) useless

again also the staying leak without nulling is acceptable(like 2 byte except effects) I think


and between jass and vjass is no leak difference its all about the coding

again my tip to start learning jass voz its so much faster then GUI(for example nearly every GUI-function has a faster Jass pendant
e.g.
JASS:
function CosBJ takes real degrees returns real
    return Cos(degrees * bj_DEGTORAD)
endfunction
U see that CosBJ is just calling the Jass native Cos = (Blizzard = cool / their BJ = weird )

nearly all wc3 functions and all programming languages work with radians
so already working with them gives more performance =D

Wells have been learning vJass for a while but stopped recently cause of school and such but still I wonder why other people say that it's leakfree if you just remove the loc if it's like you say
 
Status
Not open for further replies.
Top