Hunger System NEW

OMGOMGOMG

UMBWGMG (Unidentified Human Being.)
Reaction score
28
OK, so I'm creating a new hunger system that doesn't use the "Food" as anything, so the "Food used" can be used for units.

But the problem is when I try getting it to work for 1 player nothing happens. (One of them actually + 2 to the hunger)
OK, heres the triggers:

Trigger:
  • MBP1
    • Events
      • Time - Elapsed game time is 5.00 seconds
    • Conditions
      • (Player 1 (Red) controller) Equal to User
    • Actions
      • Custom script: if ( GetLocalPlayer() == Player(0) ) then
      • Multiboard - Create a multiboard with 1 columns and 2 rows, titled Your Hunger Level
      • Set Multiboard[1] = (Last created multiboard)
      • Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to Your Hunger Level i...
      • Multiboard - Set the text for (Last created multiboard) item in column 1, row 2 to 0
      • Multiboard - Set the width for (Last created multiboard) item in column 1, row 1 to 10.00% of the total screen width
      • Multiboard - Set the width for (Last created multiboard) item in column 1, row 2 to 10.00% of the total screen width
      • Multiboard - Set the display style for (Last created multiboard) item in column 1, row 1 to Show text and Hide icons
      • Multiboard - Set the display style for (Last created multiboard) item in column 1, row 2 to Show text and Hide icons
      • Custom script: endif

Useless, but needed!
Trigger:
  • Player Eats
    • Events
      • Unit - A unit Uses an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Item-type of (Item being manipulated)) Equal to Cooked fish (Small)
        • Then - Actions
          • Multiboard - Set the text for Multiboard[1] item in column 1, row 2 to (String((Food[1] - 2)))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Item-type of (Item being manipulated)) Equal to Meat
        • Then - Actions
          • Multiboard - Set the text for Multiboard[1] item in column 1, row 2 to (String((Food[1] - 6)))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Item-type of (Item being manipulated)) Equal to cooked fish (Large)
        • Then - Actions
          • Multiboard - Set the text for Multiboard[1] item in column 1, row 2 to (String((Food[1] - 8)))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Item-type of (Item being manipulated)) Equal to cooked fish (Medium)
        • Then - Actions
          • Multiboard - Set the text for Multiboard[1] item in column 1, row 2 to (String((Food[1] - 7)))
        • Else - Actions

Trigger that doesn't work
Trigger:
  • Deal Player Hitpoints 2
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Food[1] Equal to 100
        • Then - Actions
          • Trigger - Run Deal Player HitPoints 3 <gen> (ignoring conditions)
        • Else - Actions

This triggers the next trigger if Food[1] gets to 100
Trigger:
  • Deal Player HitPoints 3
    • Events
    • Conditions
    • Actions
      • Wait 15.00 seconds
      • Hero - Modify unspent skill points of (Triggering unit): Add 1 points
      • Hero - Learn skill for (Triggering unit): Your Hungry!

What this trigger does is if your food[1] gets to 100 then you get an ability.
Trigger:
  • Deal Player Histpoints REMOVE
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Food[1] Less than or equal to 99
        • Then - Actions
          • Unit - Remove Your Hungry! from (Triggering unit)
        • Else - Actions

Can someone tell me why these don't work so I can fix them.

I have a feeling its cause I haven't
Trigger:
  • set Food[1] = Food[1] - #

in
Trigger:
  • Player Eats
    • Events
      • Unit - A unit Uses an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Item-type of (Item being manipulated)) Equal to Cooked fish (Small)
        • Then - Actions
          • Multiboard - Set the text for Multiboard[1] item in column 1, row 2 to (String((Food[1] - 2)))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Item-type of (Item being manipulated)) Equal to Meat
        • Then - Actions
          • Multiboard - Set the text for Multiboard[1] item in column 1, row 2 to (String((Food[1] - 6)))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Item-type of (Item being manipulated)) Equal to cooked fish (Large)
        • Then - Actions
          • Multiboard - Set the text for Multiboard[1] item in column 1, row 2 to (String((Food[1] - 8)))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Item-type of (Item being manipulated)) Equal to cooked fish (Medium)
        • Then - Actions
          • Multiboard - Set the text for Multiboard[1] item in column 1, row 2 to (String((Food[1] - 7)))
        • Else - Actions

but if its not, tell me why, I'll fix it in the morning, just wanna know what it is. (if any other triggers from that trigger doesn't work then tell me.) thanks in advance. EDIT:Yes it was cause I didn't "Set" the food variable. But I may have another problem.

Ok, I edited most the trigger to:
Trigger:
  • Change nmbr every game time hour
    • Events
      • Time - Every 40.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Food[1] Equal to 100
        • Then - Actions
          • Set Food[1] = (Food[1] + 0)
          • Trigger - Run Deal Player Hitpoints 2 <gen> (ignoring conditions)
          • Trigger - Run Deal Player Hitpoints 2 Copy <gen> (ignoring conditions)
          • Trigger - Run Deal Player Hitpoints 2 Copy 2 <gen> (ignoring conditions)
          • Trigger - Run Deal Player Hitpoints 2 Copy 3 <gen> (ignoring conditions)
          • Trigger - Run Deal Player Hitpoints 2 Copy 4 <gen> (ignoring conditions)
          • Trigger - Run Deal Player Hitpoints 2 Copy 5 <gen> (ignoring conditions)
          • Trigger - Run Deal Player Hitpoints 2 Copy 6 <gen> (ignoring conditions)
          • Trigger - Run Deal Player Hitpoints 2 Copy 7 <gen> (ignoring conditions)
          • Trigger - Run Deal Player Hitpoints 2 Copy 8 <gen> (ignoring conditions)
          • Trigger - Run Deal Player Hitpoints 2 Copy 9 <gen> (ignoring conditions)
          • Trigger - Run Deal Player Hitpoints 2 Copy 10 <gen> (ignoring conditions)
        • Else - Action
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Food[1] Less than or equal to 99
            • Then - Actions
              • Set Food[1] = (Food[1] + 10)
              • Multiboard - Set the text for Multiboard[1] item in column 1, row 2 to (String(Food[1]))
              • Multiboard - Set the text for Multiboard[2] item in column 1, row 2 to (String(Food[1]))
              • Multiboard - Set the text for Multiboard[3] item in column 1, row 2 to (String(Food[1]))
              • Multiboard - Set the text for Multiboard[4] item in column 1, row 2 to (String(Food[1]))
              • Multiboard - Set the text for Multiboard[5] item in column 1, row 2 to (String(Food[1]))
              • Multiboard - Set the text for Multiboard[6] item in column 1, row 2 to (String(Food[1]))
              • Multiboard - Set the text for Multiboard[7] item in column 1, row 2 to (String(Food[1]))
              • Multiboard - Set the text for Multiboard[8] item in column 1, row 2 to (String(Food[1]))
              • Multiboard - Set the text for Multiboard[9] item in column 1, row 2 to (String(Food[1]))
              • Multiboard - Set the text for Multiboard[10] item in column 1, row 2 to (String(Food[1]))
              • Multiboard - Set the text for Multiboard[11] item in column 1, row 2 to (String(Food[1]))
            • Else - Actions

Trigger:
  • Deal Player Hitpoints 2
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Food[1] Equal to 100
        • Then - Actions
          • Trigger - Run Deal Player HitPoints 3 <gen> (ignoring conditions)
        • Else - Actions

Trigger:
  • Deal Player HitPoints 3
    • Events
    • Conditions
    • Actions
      • Wait 15.00 seconds
      • Unit - Add Your Hungry! to RedHero

Trigger:
  • Deal Player Histpoints REMOVE
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Food[1] Less than or equal to 99
        • Then - Actions
          • Unit - Remove Your Hungry! from RedHero
        • Else - Actions


RedHero is a unit variable set like this:
Trigger:
  • Deal Player Histpoints REMOVE
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Food[1] Less than or equal to 99
        • Then - Actions
          • Unit - Remove Your Hungry! from RedHero
        • Else - Actions

Trigger:
  • Male Str Copy
    • Events
      • Dialog - A dialog button is clicked for _HeroSelect
    • Conditions
      • _HeroBttns[5] Equal to (Clicked dialog button)
      • (Triggering player) Equal to Player 1 (Red)
    • Actions
      • Unit - Create 1 Male for (Triggering player) at ((Triggering player) start location) facing Default building facing degrees
      • Set RedHero = (Last created unit)

Trigger:
  • Male Str Copy
    • Events
      • Dialog - A dialog button is clicked for _HeroSelect
    • Conditions
      • _HeroBttns[5] Equal to (Clicked dialog button)
      • (Triggering player) Equal to Player 1 (Red)
    • Actions
      • Unit - Create 1 Male for (Triggering player) at ((Triggering player) start location) facing Default building facing degrees
      • Set RedHero = (Last created unit)

Trigger:
  • Male Agi Copy
    • Events
      • Dialog - A dialog button is clicked for _HeroSelect
    • Conditions
      • _HeroBttns[6] Equal to (Clicked dialog button)
      • (Triggering player) Equal to Player 1 (Red)
    • Actions
      • Unit - Create 1 Male for (Triggering player) at ((Triggering player) start location) facing Default building facing degrees
      • Set RedHero = (Last created unit)

Trigger:
  • Female Str Copy
    • Events
      • Dialog - A dialog button is clicked for _HeroSelect
    • Conditions
      • _HeroBttns[2] Equal to (Clicked dialog button)
      • (Triggering player) Equal to Player 1 (Red)
    • Actions
      • Unit - Create 1 Female for (Triggering player) at ((Triggering player) start location) facing Default building facing degrees
      • Set RedHero = (Last created unit)

Trigger:
  • Female Agi Copy
    • Events
      • Dialog - A dialog button is clicked for _HeroSelect
    • Conditions
      • _HeroBttns[3] Equal to (Clicked dialog button)
      • (Triggering player) Equal to Player 1 (Red)
    • Actions
      • Unit - Create 1 Female for (Triggering player) at ((Triggering player) start location) facing Default building facing degrees
      • Set RedHero = (Last created unit)

Trigger:
  • Female Agi Copy
    • Events
      • Dialog - A dialog button is clicked for _HeroSelect
    • Conditions
      • _HeroBttns[3] Equal to (Clicked dialog button)
      • (Triggering player) Equal to Player 1 (Red)
    • Actions
      • Unit - Create 1 Female for (Triggering player) at ((Triggering player) start location) facing Default building facing degrees
      • Set RedHero = (Last created unit)

Trigger:
  • Female Agi Copy
    • Events
      • Dialog - A dialog button is clicked for _HeroSelect
    • Conditions
      • _HeroBttns[3] Equal to (Clicked dialog button)
      • (Triggering player) Equal to Player 1 (Red)
    • Actions
      • Unit - Create 1 Female for (Triggering player) at ((Triggering player) start location) facing Default building facing degrees
      • Set RedHero = (Last created unit)

(I did this for all players!) when food reaches 100, nothing happens. I am going to test where it all goes wrong by adding in
Trigger:
  • Game - Display to all players the text TEST!


It doesn't show the first test
The second test it does
the third test doesn't
the fouth test doesn't
the fifth test doesn't
the sixth test doesn't

I'm going through all of these triggers, double checking that they are A-OK

Any tips?

EDIT: YES, the "FOOD" Variable DOES go up 10 each time the "0 (AKA #/##)" in the multiboard does.

If you tell me how to fix the thing so it runs, I have a pretty good feeling that I should've used Turn on - Trigger instead of Run - Trigger

EDIT 2: I just fixed it, it works fine now.

Thanks TheHelper.net for nothing :) (Couldn't even post a reply suggesting what it may be) you guys can work it out for your selfs whats wrong if you want it.
 
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

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top