Multi Flamestrike Removal

Dregonx

TH.net Regular
Reaction score
21
If say you create like 10 Flamestrikes at the same time using triggers, how would you remove them?

Because Flamestrike has animations it's not like a normal special effect, so if you used Destroy last created special effect it'll literally destroy it before it even goes off.

I need all of them to go off at the same time, and still removing them afterwords to prevent lag.

Thanks in advanced.

-Dregonx
 

Faust

You can change this now in User CP.
Reaction score
123
Store them into variable(s), wait till their animation is over, remove them.
 

Dregonx

TH.net Regular
Reaction score
21
Store them into variable(s), wait till their animation is over, remove them.
Edit: Well, I meant was like, ok say you have 10 flamestrikes, then you have lightning effects going off at the same time, how would I have a wait timer to remove them? I'm just really confused.

Edit 2: Oh yeah, and they are in a loop action as well.
 

Dregonx

TH.net Regular
Reaction score
21
Make a function in the 'map's custom script' section something like this
JASS:
function RemoveEffect takes real time returns nothing
local effect e = GetLastCreatedEffectBJ()
call PolledWait(time)
call DestroyEffectBJ(e)
endfunction

and use
CustomScript: "call RemoveEffect(1.0)" in your trigger
I'll do it, but can you explain in detail what that does, I'm interested in learning more about JASS. So I can edit it if need be as well.

Edit: I know a pretty good amount of JASS so far.
 
Reaction score
43
Alternatively, you can
1.) make a dummy Flame strike ability so don't bother with it
or
2.) ya, make the effect removals.
Something like... set
FS_remove[A] = last created special effect
COunt[A] = 10

then decrease the count every second and destroy da effects after it reched 0.
(GUI ver, im a n00b in JASS)
 

Dregonx

TH.net Regular
Reaction score
21
It stores the last created special effect in a local, waits X seconds (where X is the value you pass to the function) and then destroys the effect

(although it leaks twice, one from PolledWait, and another because 'e' wasn't nulled)
Are the leaks anything to worry about or is it fine not removing the leaks?

Edit: Gave rep to everyone. =) And thanks.
 

Dregonx

TH.net Regular
Reaction score
21
Just tried it out on my map, it gave the spell a delay, every loop it just created everything once in one direction then the next direction, then the next, it's not supposed to go in the directions one at a time but instead all at once.

However, the lag did disappear. =)
 

Flare

Stops copies me!
Staff member
Reaction score
662
They are minor (in comparison to location/group/special effect leaks), but it'd be better if you could get rid of them

For the PolledWait leak, you will need to remake the PolledWait code, and null the timer that is created (look around the Tutorials & Resources section, I think someone posted the non-leaking code)

For the handle leak, just add
JASS:
set e = null

at the very end of the function
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    Happy Sunday!
    +1
  • The Helper The Helper:
    I will be out of town until Sunday evening
    +1
  • The Helper The Helper:
    I am back! Did you miss me LOL
    +1
  • jonas jonas:
    where did you go?
  • The Helper The Helper:
    Jefferson TX on a Paranormal Investigation of a haunted bed and breakfast - I got some friends that are paranormal investigators and they have an RV and do YouTubes
    +1
  • The Helper The Helper:
    It was a lot of fun. The RV was bad ass
  • jonas jonas:
    That sounds like fun!
    +1
  • The Helper The Helper:
    it was a blast!
  • The Helper The Helper:
    I am going to post the Youtube of the investigation in the forums when it is ready
    +1
  • jonas jonas:
    cool!
  • vypur85 vypur85:
    Sounds cool TH.
  • tom_mai78101 tom_mai78101:
    I was on a Legend of Zelda marathon...
  • tom_mai78101 tom_mai78101:
    Am still doing it now
    +1
  • jonas jonas:
    which one(s) are you playing?
  • jonas jonas:
    I played a little bit of the switch title two weeks ago and found it quite boring
  • The Helper The Helper:
    just got back from San Antonio this weekend had the best Buffalo Chicken Cheesesteak sandwhich in Universal City, TX - place was called Yous Guys freaking awesome! Hope everyone had a fantastic weekend!
    +1
  • The Helper The Helper:
    Happy Tuesday!
  • The Helper The Helper:
    We have been getting crazy numbers reported by the forum of people online the bots are going crazy on us I think it is AI training bots going at it at least that is what it looks like to me.
  • The Helper The Helper:
    Most legit traffic is tracked on multiple Analytics and we have Cloud Flare setup to block a ton of stuff but still there is large amount of bots that seem to escape detection and show up in the user list of the forum. I have been watching this bullshit for a year and still cannot figure it out it is drving me crazy lol.
    +1
  • Ghan Ghan:
    Beep boop
    +1
  • The Helper The Helper:
    hears robot sounds while 250 bots are on the forum lol
  • The Helper The Helper:
    Happy Saturday!
    +1
  • The Helper The Helper:
    and then it was Thursday...
    +2

    The Helper Discord

    Staff online

    Members online

    Affiliates

    Hive Workshop NUON Dome World Editor Tutorials

    Network Sponsors

    Apex Steel Pipe - Buys and sells Steel Pipe.
    Top