• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Trigger makes my game crash?

Status
Not open for further replies.
Level 11
Joined
Jun 26, 2014
Messages
497
  • Fire Bounce
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Fire Bounce [Q]
    • Actions
      • Set Caster_FireBounce = (Triggering unit)
      • Set temp_point1_FireBounce = (Position of Caster_FireBounce)
      • Unit - Create 1 Dummy Fire Bounce lvl1 for (Owner of Caster_FireBounce) at temp_point1_FireBounce facing Default building facing degrees
      • Set Dummy_FireBounce = (Last created unit)
      • Unit - Order Dummy_FireBounce to Attack Once (Target unit of ability being cast)
      • Unit - Remove Dummy_FireBounce from the game
      • Custom script: call RemoveLocation(udg_temp_point1_FireBounce)
First cast ... everthing is ok. But when I cast it again the game crashes. No errors no nothing just closes. Why?
 
Level 25
Joined
May 11, 2007
Messages
4,651
Change the attacking dummy to have timed life instead. If you just want it to deal one attack, set it's attack animation to 0.0 and it's attack cooldown to 200. It'll attack once and then wait 200 seconds until it attacks again.

And you don't need temp_point1_FireBounce variables for your trigger, just rename them to tempPoint1, tempPoint2, etc and use them for all triggers :p
 
Level 11
Joined
Jun 26, 2014
Messages
497
Change the attacking dummy to have timed life instead. If you just want it to deal one attack, set it's attack animation to 0.0 and it's attack cooldown to 200. It'll attack once and then wait 200 seconds until it attacks again.

And you don't need temp_point1_FireBounce variables for your trigger, just rename them to tempPoint1, tempPoint2, etc and use them for all triggers :p

But if I cast miltipule spells with that variable won't it bug out?
 

Cokemonkey11

Code Reviewer
Level 29
Joined
May 9, 2006
Messages
3,522
But if I cast miltipule spells with that variable won't it bug out?

In this case it won't bug out because this spell is instantaneous (warcraft 3 doesn't have parallel execution)

Regardless, the optimization is futile and worthless.

I don't see any actual error in your trigger, but try the timed life + attack cooldown thing.
 
Status
Not open for further replies.
Top