Blockland Forums > Help

[VCE] How do I create Hunger System the correct way?

Pages: (1/2) > >>

Crystalwarrior:

Hey guys, I have encountered a little problem.
You see, I am making a Survival server, where I want to add Hunger, Thirst, Temperature, Fatigue and a lot more.

Here's what my hunger looks like so far:



When events are executed, I get my health always sapped, and onVariableUpdate does not show the centerprint of both hunger and temperature.
I also noticed that while my health is being sapped, the Hunger variable is at 100!
And fyi, I tried naming ifVariables to <var:pl:Hunger>, and also, #4 is >= 10 because I tested if that's the problem.

Crystalwarrior:

Okay guys, I fixed the Hunger System substracting and all that... But since I changed onMinigameReset -> FireRelay to onPlayerTouch, when one player executes the system after the another one already did, the another player's hunger system stops working and passes on to the one player.
How do I do some schnizzy stuff so hunger system works individually for each player?

iBlox / (-Nick-):


--- Quote from: Crystalwarrior on April 22, 2012, 06:01:49 AM ---Okay guys, I fixed the Hunger System substracting and all that... But since I changed onMinigameReset -> FireRelay to onPlayerTouch, when one player executes the system after the another one already did, the another player's hunger system stops working and passes on to the one player.
How do I do some schnizzy stuff so hunger system works individually for each player?

--- End quote ---
It seems like relays only work for a player through one brick. So when another person triggers the same brick, it commits itself to the new player, taking away the relay from the original player. The player really never has the relay, the brick does, which is causing the problem. If someone could make an event for "PlayerFireRelay", this would work. Otherwise, you would need a ton more events and a brick for each player that joins. Unless, there is another way I am not aware of.

^^This is potentially all wrong^^

phflack:

try using print counts for your loop, it can handle multiple people
onvariableupdate is only called with the VCE links i think

Blocki:


--- Quote from: iBlox / (-Nick-) on April 22, 2012, 11:09:27 AM ---It seems like relays only work for a player through one brick. So when another person triggers the same brick, it commits itself to the new player, taking away the relay from the original player. The player really never has the relay, the brick does, which is causing the problem. If someone could make an event for "PlayerFireRelay", this would work. Otherwise, you would need a ton more events and a brick for each player that joins. Unless, there is another way I am not aware of.

^^This is potentially all wrong^^

--- End quote ---
It will ignore the second player and keep the first

Pages: (1/2) > >>

Go to full version