• 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] Custom Spell Causes Crash

Status
Not open for further replies.
Level 4
Joined
Sep 25, 2015
Messages
56
First of all, Im not very active on hive and this takes away my first post virginity.
Secondly, my trigger knowledge is very limited, so pls give simple answers.

Main Problem - The game crashes when I cast 2 specific spells at the same time.

wEXoesqVQo6_-8C58FgLXw.png


Other Problem (not important) - Spell lasts longer than given in trigger.

Spells - The first one is a morph spell called Lightning Orb that transforms the caster into a Lightning Orb for 5 sec with a custom Phoenix Fire spell (since its impossible to set lighting effects as missile for phoenix fire, I had to trigger the whole spell). The problem here is the duration of the effect is much longer than the one set in the trigger (it doesnt crash here). I think the cause has something to do with the Metamorph spell cuz when I change the base spell (Metamorphosis) to Storm Bolt the duration is good.

ck6iEqq.png


The second spell is a target point summon, with some triggers giving it buffs and special effects, the spell works fine and has nothing to do with the first spell.

R21x8dB.png


Is it leaks? I tried my best to fix them.

Any response is appreciated.

Thanx in advance.

EDIT: made triggers slightly more efficient
 

Attachments

  • Arena [reborn] [test-2] [hive].w3x
    456 KB · Views: 49
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,285
The way the trigger logic is structured means it is possible to destroy a non-existent lighting object, or a lightning object that has already been destroyed. Possibly the native lacks safety checks for this case and so does some really bad and undesirable stuff that can lead to a crash. One could prevent this by testing if the lightning variable is null, and only if not then destroying the lightning and nulling the variable (as destroying something does not automatically null all variables it was assigned to).
 
Level 4
Joined
Sep 25, 2015
Messages
56
The way the trigger logic is structured means it is possible to destroy a non-existent lighting object, or a lightning object that has already been destroyed. Possibly the native lacks safety checks for this case and so does some really bad and undesirable stuff that can lead to a crash. One could prevent this by testing if the lightning variable is null, and only if not then destroying the lightning and nulling the variable (as destroying something does not automatically null all variables it was assigned to).
Tried that, now Im using a repeating timer that kills the lighting effect, but still crashes. :(
Thank you for your suggestion anyway, any other possible ideas in mind guys? Cuz I totally have no clue what to do..
 
Status
Not open for further replies.
Top