(In words: For every tick (0.20 seconds) you are on Stone Bricks a clientMessage will post 1, 2, 3, 4, 5 and so on.)
If you need to have it only activate when the player step on the block, not when the player is already on a block:
- Every tick, compare player's location, rounded down to the nearest block (use Math.floor) with player's location from the last tick, also rounded
- If they differ, then the player stepped on a new block
- If the new block is the one you want, increment the counter
- Save the current location
Is that possible?
I'm not shure if this works but here
Counter = 0; function modTick() { if(getTile(getPlayerX(), getPlayerY()-1, getPlayerZ())==95) { Counter++; { clientMessage(parseInt(Counter)); } } }Lead developer of Dragonet!
Check out my game, Adventuria!
Dev of (IMO the best server ever) TwilightGamez!
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumIf you need to have it only activate when the player step on the block, not when the player is already on a block:
- Every tick, compare player's location, rounded down to the nearest block (use Math.floor) with player's location from the last tick, also rounded
- If they differ, then the player stepped on a new block
- If the new block is the one you want, increment the counter
- Save the current location
Yes this works, but how would I add a word to it? So it would say round every time round 1 round 2....
I tried a few things but couldn't figure it out
Here:
Counter = 0;
function modTick()
{
if(getTile(getPlayerX(), getPlayerY()-1, getPlayerZ())==95)
{
Counter++;
{
clientMessage("Round " + parseInt(Counter));
}
}
}
Lead developer of Dragonet!
Check out my game, Adventuria!
Dev of (IMO the best server ever) TwilightGamez!
If(blockId == 1){
clientMessage("1 2 3 4 5..."); i guess.