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.
  • Varine Varine:
    How can you tell the difference between real traffic and indexing or AI generation bots?
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air
  • The Helper The Helper:
    New dessert added to recipes Southern Pecan Praline Cake https://www.thehelper.net/threads/recipe-southern-pecan-praline-cake.193555/
  • The Helper The Helper:
    Another bot invasion 493 members online most of them bots that do not show up on stats
  • Varine Varine:
    I'm looking at a solid 378 guests, but 3 members. Of which two are me and VSNES. The third is unlisted, which makes me think its a ghost.
    +1
  • The Helper The Helper:
    Some members choose invisibility mode
    +1
  • The Helper The Helper:
    I bitch about Xenforo sometimes but it really is full featured you just have to really know what you are doing to get the most out of it.
  • The Helper The Helper:
    It is just not easy to fix styles and customize but it definitely can be done
  • The Helper The Helper:
    I do know this - xenforo dropped the ball by not keeping the vbulletin reputation comments as a feature. The loss of the Reputation comments data when we switched to Xenforo really was the death knell for the site when it came to all the users that left. I know I missed it so much and I got way less interested in the site when that feature was gone and I run the site.
  • Blackveiled Blackveiled:
    People love rep, lol
    +1
  • The Helper The Helper:
    The recipe today is Sloppy Joe Casserole - one of my faves LOL https://www.thehelper.net/threads/sloppy-joe-casserole-with-manwich.193585/
  • The Helper The Helper:
    Decided to put up a healthier type recipe to mix it up - Honey Garlic Shrimp Stir-Fry https://www.thehelper.net/threads/recipe-honey-garlic-shrimp-stir-fry.193595/

      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