Fatal Error -_-

0WN3D

New Member
Reaction score
15
Hey all Helpers^^ Heres the story... today after I implemented a Hero and tried to cast its spell... A fatal error occured..... The thing i remembered is Illegal Instruction...
Heres the trigger i jus implemented.... But even though i remove it, it still bugs....
PS:I base the skill off tranquility...

Trigger:
  • Time Stop
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Time Stop
    • Actions
      • Set TimeStopAttacked = False
      • Set TimeStopCaster = (Casting unit)
      • Countdown Timer - Start TimeStopTimer as a One-shot timer that will expire in 5.00 seconds
      • Trigger - Turn on TimeStopCancel <gen>
      • Trigger - Turn on TimeStopCancel 2 <gen>


Trigger:
  • TimeStopCancel
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • TimeStopAttacked Equal to False
          • (Attacked unit) Equal to TimeStopCaster
    • Actions
      • Unit - Order TimeStopCaster to Stop
      • Trigger - Turn off (This trigger)


Trigger:
  • TimeStopCancel 2
    • Events
      • Unit - A unit Stops casting an ability
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • TimeStopAttacked Equal to False
          • (Triggering unit) Equal to TimeStopCaster
    • Actions
      • Set TimeStopAttacked = True
      • Trigger - Turn off (This trigger)


Trigger:
  • Time Stop Pause
    • Events
      • Time - TimeStopTimer expires
    • Conditions
      • TimeStopAttacked Equal to False
    • Actions
      • Set TempInteger = 0
      • Set Temp_Point = (Position of TimeStopCaster)
      • Set Temp_Rect = (Playable map area)
      • Set TimePauseGroup = (Units in Temp_Rect matching (((Matching unit) Not equal to TimeStopCaster) and (((Matching unit) is dead) Equal to False)))
      • Unit Group - Pick every unit in TimePauseGroup and do (Actions)
        • Loop - Actions
          • Set TempInteger = (TempInteger + 1)
          • Unit - Pause (Picked unit)
          • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Human\Banish\BanishTarget.mdl
          • Set SpecialEffectTimePause[TempInteger] = (Last created special effect)
      • Trigger - Turn off TimeStopCancel <gen>
      • Trigger - Turn off TimeStopCancel 2 <gen>
      • Unit - Create 1 TimePauseBlue for Player 1 (Red) at Temp_Point facing Default building facing degrees
      • Unit - Add a (4.00 + (Real((Level of Time Stop for TimeStopCaster)))) second Generic expiration timer to (Last created unit)
      • Wait (4.00 + (Real((Level of Time Stop for TimeStopCaster)))) seconds
      • Unit Group - Pick every unit in TimePauseGroup and do (Actions)
        • Loop - Actions
          • Unit - Unpause (Picked unit)
      • For each (Integer A) from 1 to 8192, do (Actions)
        • Loop - Actions
          • Special Effect - Destroy SpecialEffectTimePause[(Integer A)]
      • Custom script: call RemoveRect(udg_Temp_Rect)
      • Custom script: call RemoveLocation(udg_Temp_Point)
      • Custom script: call DestroyGroup(udg_TimePauseGroup)
 

Azlier

Old World Ghost
Reaction score
461
You have a number of bad practices here that are no doubt going to cause all sorts of problems.

First, never destroy (Playable map area). It's a constant object and destroying it will get rid of it forever, so you can't use it anymore. It doesn't leak. (Entire map), on the other hand, does leak and does need destroying.

Also, begins spell effect is much more useful than begins casting, as it takes place after the spell is actually cast. Begins casting triggers before the unit even spends the mana to cast the spell.

Oh, this isn't MUI, so you can only have one caster on the map with the ability at a time. Just so you know, but this isn't the source of your error.

I'm pretty sure that in the second trigger you want to set TimeStopAttacked to true. It's just going to lead directly to the third trigger anyway, so cut the stop trigger shenanigans and set it to true directly in the second trigger. Then you can delete the third trigger.

You shouldn't iterate from 1 to 8192 to destroy effects. It's the height of inefficiency, and you the maximum number should only be the number of units in the group. Besides, you might hit the operation limit and it'll just shut down your trigger early because the game is fed up with counting.

That's pretty much every terrible practice I found, besides using GUI in the first place. The one with destroying the playable map area seems to be the big one, but if it only crashes when you're casting the first time then that shouldn't be it.
 

0WN3D

New Member
Reaction score
15
Okay i will try some of the things...
Ps:....... Mui is not what i am aiming for... 2 : i cannot destroy the 3rd trigger as i want to see if the unit is attack during casting or stops casting....... Hope u dun find me flaming ^^
Edit:DOOOOOD..... Weirdness has increased....... the error is fix when i set the buff and effect to defualt..... wtf? anyway thx for correcting a lot of my stuff ^^
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top