• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Custom Spell Causes Crash

Status
Not open for further replies.
Level 4
Joined
Sep 25, 2015
Messages
53
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: 43
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,206
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
53
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