Blockland Forums > Help

Event Halp

Pages: (1/3) > >>

Elphie:

Ok im trying to help with an rp but i dont know how to make it so... hmm lets say you click a brick 5 times then it gives you the logs,ore,exp,ect,ect PLZZ HALP

Cody574:

Variable events.

Elphie:


--- Quote from: Sonicfan574 on October 08, 2009, 08:57:16 PM ---Variable events.

--- End quote ---
Whata do you mean i know how to make the logs,ore,exp,ect,ect in variables. im talking like you click a brick 5 times then it gives you the logs,ore,exp,ect,ect.

Cody574:


--- Quote from: lost477 on October 08, 2009, 09:21:07 PM ---Whata do you mean i know how to make the logs,ore,exp,ect,ect in variables. im talking like you click a brick 5 times then it gives you the logs,ore,exp,ect,ect.

--- End quote ---
Assuming you have the addon...

onActivate -> addVariable -> Player or Client -> logs -> (number of logs)

Orthone:

For ex:


--- Code: ---onActivate > self > addVariable > brick > chops > 1
onActivate > self > ifVariable > brick > chops > greaterEquals > 5
onVariableTrue > self > setVariable > brick > chops > 0
onVariableTrue > client > addVariable > Logs > 1
onVariableTrue > client > centerPrint > You chop down the tree!
onVariableTrue > self dissapear > 10
onVariableFalse > client > centerPrint > You chop at the tree!
--- End code ---

What this would do is, every time that tree is clicked it adds its own 'Chops' variable. When that variable reaches 5 or greater it would set its own chops to 0, give you a variable, dissapear, and tell you you chopped down the tree. If you click the tree and it HASN'T reached 5 or greater then it would say 'You chop at the tree!'

Pages: (1/3) > >>

Go to full version