Game Crash!

Black_Fire

New Member
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
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
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.
 
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
@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
 
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
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
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
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.
  • Varine Varine:
    What a fucking disaster. Are all of the Texas people okay? I see TH is, are we the only two?
  • Varine Varine:
    How have the other states held up? I just got power back so I have no idea what's going on, we didn't get warning
  • Varine Varine:
    Why the fuck didn't they fix this ten years ago when it happened?
  • Blackveiled Blackveiled:
    I'm in it with you and TH as well. My power has been in and out, and I have a ruptured pipe that I need to fix, shouldn't be too bad to fix myself.
  • Varine Varine:
    I hope you're staying warm! Apparently the supply is coming up so hopefully we can get back to normal power soon, mine has been on for six hours now.
  • M Mulciberxp:
    My power has been off most of the last 2 days. We had a generator installed 3 years ago though, so we're staying warm. Water is another issue...
  • The Helper The Helper:
    Where I live has a pool so we are using that to get water to flush the toilets. We have enough bottled water to drink and brush teeth and stuff but it has been a few days and no shower though....
  • Varine Varine:
    I had some water in gallon jugs, and got our water back on yesterday. We don't seem to have any leaks, but I haven't crawled down there to look yet.
  • The Helper The Helper:
    still no water I cannot remember when I last showered now I know how they felt in the old west lol
  • Varine Varine:
    My poor plants are happy, they aren
  • Varine Varine:
    aren't used to going this long without water or lights or normal heat. I think a couple of them froze, but they look like they'll make it
  • Varine Varine:
    Well one of them is pretty rough but I think it was sick to begin with, that one always had some problems.
  • jonas jonas:
  • jonas jonas:
    ???
  • Ghan Ghan:
    That is such a Texas thing to say lol
  • midnight8 midnight8:
    a positive could come out of this. So many people trapped at home could put a dent in the covid numbers in Texas
  • Varine Varine:
    That dude, Tom Boyd, is really upset about the backlash from his "it's your fault you're freezing" thing because he claims he resigned before saying it, so it wasn't like he said it in his official capacity or anything.
  • jonas jonas:
    Almost as if he was saying "screw you guys, I'm going home"
  • Varine Varine:
    I'm fairly new here still but that seems to be the analogous message by several of our politicians.
  • vypur85 vypur85:
    Nobody?
  • jonas jonas:
    Hi vypur85, long time no see
  • tom_mai78101 tom_mai78101:
    Hi vypur85, long time no see.
  • The Helper The Helper:
    We are all somebody
  • Varine Varine:
    I kinda like being nobody tho.
  • The Helper The Helper:
    Voting for the NUON Controller Contest is open in the NUON-Dome NUON forum

    Staff online

    Members online

    Affiliates

    Hive Workshop NUON Dome
    Top