Blockland Forums > Help

Relay Pain Events

Pages: (1/5) > >>

Audax:

Ok so I want to make a survivalRP (since a mod hasn't been made yet) and want to make heat events.Now what I want to do is make the spawn point No Rending or Ray casting but collision.Now what I want to do is onPlayerTouch>player>fireRelay.Then on the next event a delay of like 3 minutes and onRelay>player>addHealth>-10.On next event delay 3minutes onRelay>client>centerPrint>You're body temperature lowered.So that it's as if you got cold and then a fire which adds health when you get near it there are invisible bricks that "warm you up"But there is no fireRelay for the player object. How can I get around this?

phflack:

relays are to the brick, not player, so i would try something like this:
make a spawn point with rendering off, when a player touches it, if they have the variable nothing happens, if they don't they get the variable, and a brick is decrement print counted 9 and 1, which then loops for every half minute, adding -5 health or so

Audax:

Ok I couldn't really understand that very clear but how would it look evnt wise like: (delay)_____>_____>_____>(message) [optional] etc. and so forth down?

Snaily:

Well, relays can call to check a variable, which would apply to the player.

You shouldn't use relays though, since relays will only apply for the last person that touched it. Instead, use onPrintCountUnderflow (like phflack said); it applies to multiple people. Here's how you make a loop:


onPlayerTouch > self > decrementPrintCount > 9
onPlayerTouch > self > decrementPrintCount > 1
onPrintCountUnderflow > player > VCEifVariable > heattick != 999 4 4
onVariableTrue > player > addHealth > -10
onPrintCountUnderflow > self > decrementPrintCount > 9
onPrintCountUnderflow > self > decrementPrintCount > 1


I can't guarantee that will work. Though underflows apply to multiple people, variables may not in this case.

phflack:

hmm... or snaily, maybe a projectile for each person? i think it would be better to use variables because then you can make sure the player only has one loop going, or you could do a more complex system i thought of but it would require the same amount of named bricks as the server limit of players
it would be a row of 2 bricks high, the top row named and firing a relay to the brick below it which would be the looping brick, and when that happens it toggles to firing a relay to the rest of the chain, when the brick stops having a relay it could make the brick above it toggle back, but this has flaws (thought of it before i figured out printcounts)
flaws are that a person can have multiple relays on multiple bricks, and that you can't use player events unless you spawn a projectile from it to a brick nearby

Pages: (1/5) > >>

Go to full version