• 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] Help with fixing a leak

Status
Not open for further replies.
Level 9
Joined
Nov 28, 2008
Messages
704
Edit: Nope XD.

If I msay suggest to save yourself a little bit of length of code.. in the Rendan trigger, you have two ifs that could easily be combined into one If/Then/Else. You check if the unit has the buff Rasengan, if it doesnt, then you do something. Then you check if it DOESNT have something. Just put the code from one into the Else part of the other.

At least, looking at your trigger, Im assuming that you could do that. It seems like you check if the unit has the buff Rasengan = true, and in another if = false, but whatever. :p

Nice spell by the way. Even if I hate Naruto, it does look neat.
 
Level 11
Joined
Dec 31, 2007
Messages
780
  • Rasengan Effect Start
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • ((Attacking unit) has buff Rasengan ) Equal to True
          • (Attacking unit) Equal to RasenganCaster
    • Actions
      • Set RasenganTarget = (Attacked unit)
      • Trigger - Add to Rasengan Effect Finish <gen> the event (Unit - (Attacked unit) Takes damage)
here is the leak... DSG means that everytime a unit is attacked you add that unit to the trigger event... no matter if the unit is already in that event, you are adding the same unit again and again... you can use a unit group, check if the attacked unit is in the group... if it is NOT in the group, add it to the event and add it to the group... else do nothing

EDIT: btw... if you have removed the naruto model then add some model into the rendan spell coz those are only shadows (or is it supposed to be like that?)

EDIT2: and the crash is not made by the leak... your crash is an infinite loop somewhere in the code... i think that it is caused because you are using a 1 second cooldown in the spell and a 3 seconds wait in the trigger

EDIT3: btw... plz remove caster's shadows ... it is not nice to see those things :p
 
Level 9
Joined
Nov 24, 2007
Messages
229
  • Rasengan Effect Start
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • ((Attacking unit) has buff Rasengan ) Equal to True
          • (Attacking unit) Equal to RasenganCaster
    • Actions
      • Set RasenganTarget = (Attacked unit)
      • Trigger - Add to Rasengan Effect Finish <gen> the event (Unit - (Attacked unit) Takes damage)
here is the leak... DSG means that everytime a unit is attacked you add that unit to the trigger event... no matter if the unit is already in that event, you are adding the same unit again and again... you can use a unit group, check if the attacked unit is in the group... if it is NOT in the group, add it to the event and add it to the group... else do nothing

EDIT: btw... if you have removed the naruto model then add some model into the rendan spell coz those are only shadows (or is it supposed to be like that?)

EDIT2: and the crash is not made by the leak... your crash is an infinite loop somewhere in the code... i think that it is caused because you are using a 1 second cooldown in the spell and a 3 seconds wait in the trigger

EDIT3: btw... plz remove caster's shadows ... it is not nice to see those things :p

hahaha damn thanks for the help!!!!
 
Status
Not open for further replies.
Top