Game Crash!

Black_Fire

New Member
Reaction score
0
Help me fix this trigger:
Trigger:
  • Untitled Trigger 002
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Triggering unit) Equal to temp_unit[(Player number of (Owner of (Triggering unit)))]
          • (Ability being cast) Equal to Blood Rage
        • Then - Actions
          • Unit - Add Blood Rage(Dummy) to (Triggering unit)
          • Unit - Set level of Blood Rage(Dummy) for (Triggering unit) to Blood_Rage_Level[(Player number of (Owner of (Triggering unit)))]
          • Unit - Remove Blood Rage from (Triggering unit)
          • Unit - Order (Casting unit) to Human Mountain King - Activate Avatar
          • Wait 40.00 seconds
          • Unit - Remove Blood Rage(Dummy) from (Triggering unit)
          • Unit - Add Blood Rage to (Triggering unit)
        • Else - Actions
          • Do nothing


It keeps crashing the game.
 

TomTTT

New Member
Reaction score
44
well, I'm pretty sure the wait 40 seconds is causing this the crash. I can't see another reason. I suggest you maybe use indexing/hashtables. Lets say, make a unit group of all units with blood rage, that you add a unit when it starts using you add it to the group. Now save '40' as 1 of (Key(Triggering unit)), and make a periodic of every second, that will get the value and decrease it by 1, and re-save it into the hashtable. Then run a condition if the value is 0, and then remove blood rage.
 

Black_Fire

New Member
Reaction score
0
It crashes when I cast the skill.

And can you give me an example of that trigger. I'm not really good at hash tables.
 

TheOverWhelm

Member
Reaction score
16
Remove the Wait, see if it crashes
I don't understand the order you're doing thing.
You're adding a spell, setting it to a level, removing it, then telling the unit to cast something.
Also, remove that Do Nothing.
It does exactly that and has no real purpose other then closed GUI if/then/else actions.
Make sure the Blood Rage level is positive as well.
Also, just to be sure (you might've already done this I'm guessing) disable and make sure this -is- the trigger.
Also, don't use Casting Unit. Triggering Unit works just fine
 

inevit4ble

Well-Known Member
Reaction score
38
@OverWhelm: He's Adding a Dummy Skill and leveling it. then remove the Unit's skill and ordering the unit to cast the added dummy skill. then switching them back after 40sec.

And as OverWhelm says, remove the "do nothing", keep your triggering unit uniform or set the unit to a variable. If the unit is the only hero that can cast this ability the "wait" shouldnt be a problem. And try removing the unit's ability before give it the new one. Mayb that will work
 

vypur85

Hibernate
Reaction score
803
Avatar ability is quite sensitive with it being removed. Make sure it is done correctly. If it's removed before the duration is over, it's gonna get weird. Perhaps you might wanna share the background of the ability and dummies you used. What are they based off... etc.
 

TheOverWhelm

Member
Reaction score
16
Oh.. I get confused when people don't use brackets for their dummy stuff. I don't see it otherwise XD
And I believe just leveling it will add the dummy spell anyways, but that's an efficiency thing for when it works.

And do what ^ said.
 

Black_Fire

New Member
Reaction score
0
Here's the background:

The ability is based on Avatar.
I have 2 abilities, 1 is just for show, the other one does the rest.
Didn't use any dummies.
The ability has a level counter that is added by 1 for every ability cast.
Once the unit casts the ability for show(I didn't use starts an effect event otherwise the unit would cast it twice so this one fire before the effect), the trigger will swap it to the dummy one and then orders it to use the ability.
The 40 seconds wait is for the cooldown of the ability so that when it reaches zero, it will be swapped to the for show one.


Here are two other triggers related to it:
Trigger:
  • Blood Rage Leaderboard Create
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Blood Rage
    • Actions
      • Set temp_intger = (temp_intger + 1)
      • Leaderboard - Create a leaderboard for (All players matching ((Owner of (Triggering unit)) Equal to (Owner of (Triggering unit)))) titled Blood Rage Level
      • Leaderboard - Add (Owner of (Triggering unit)) to (Last created leaderboard) with label Level: and value 0
      • Set temp_unit[(Player number of (Owner of (Triggering unit)))] = (Learning Hero)
      • Set Leaderboard[(Player number of (Owner of (Triggering unit)))] = (Last created leaderboard)
      • Set Blood_Rage_Level[(Player number of (Owner of (Triggering unit)))] = 0

Trigger:
  • Blood Rage Level
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Triggering unit) Equal to temp_unit[(Player number of (Owner of (Triggering unit)))]
    • Actions
      • Set Blood_Rage_Level[(Player number of (Owner of (Triggering unit)))] = (Blood_Rage_Level[(Player number of (Owner of (Triggering unit)))] + 1)
      • Leaderboard - Change the value for (Owner of (Triggering unit)) in Leaderboard[(Player number of (Owner of (Triggering unit)))] to Blood_Rage_Level[(Player number of (Owner of (Triggering unit)))]



___________________________________________________________________________________________

Gonna try your suggestions.
 

vypur85

Hibernate
Reaction score
803
Your trigger in Post#1 only has a few lines of actions. It's quite easy to locate the source of crash.
Try disabling each action one by one and test the game. If it doesn't crash, and there you go...

From your description, if both abilities are based off Avatar, then the removal of the ability while it is active will cause problem. Regardless, try the above method to locate the source of problem first. Then you can work from there.
 

Black_Fire

New Member
Reaction score
0
Decided to just give the ability to a dummy unit and make it cast it.
Now the only problem now is... the effect isn't working for my hero, I mean the growth spurt worked and the avatar timer but the bonuses isn't showing up.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top