Author Topic: What are the events to make a weapon buyable by clicking on a button?[READ MORE]  (Read 888 times)

What im talking about is I want it so whenever I get a kill I get lets say 10 points. Then I can buy a weapon by clicking a brick that requires 50 points and if you have 50 points it will add a weapon into you're inventory.

Thank you.
Leeevinnn

You can do this with VCE.

Get VCE (Link bellow the comment) and event a brick with those:


<0>OnActivate -> Client -> VCE_IfVariable / Score / >= / 50 / 1 4
<1>OnVariableTrue -> Client -> IncScore / -50
<2>OnVariableTrue -> Client -> Chatmessage / "You just bought a (weapon)"
<3>OnVariableTrue -> Player -> AddItem(Or set Item) / "The Item" (/ Slot)
<4>OnVariableFalse -> Client -> Chatmessage / "Your score is too low!"

This is a basic shop easily editable.. Have Fun :D

For more info on VCE: http://forum.blockland.us/index.php?topic=74148.0
« Last Edit: August 03, 2012, 03:59:02 AM by innocent »

Get that weapon shop addon

@innocent
I thought that but I already had tried that and it isn't working.

@mold
What addon? I seached it up on rtb and have no results.

VCE is short for "Variable Conditional Events". Search that on RTB.nvm i read stuff wrong

Also, why are you asking for eventing help in the coding help forum?
« Last Edit: August 03, 2012, 11:32:31 AM by Wheatley »

Also, why are you asking for eventing help in the coding help forum?
Anyhow, Leeevinnn, you may think that Innocent's events do not work because they might not check for a player's actual minigame score, but rather a variable you have to add with events to the player named "Score". Not sure if I'm correct or not, but if I am, there may be a variable replacer that can fix things for you. If this is the case, use Innocent's events he posted, with one modification:

Change
<0>OnActivate -> Client -> VCE_IfVariable / Score / >= / 50 / 1 4

To this:
<0>OnActivate -> Brick -> VCE_IfValue / <var:client:score> / >= / 50 / 1 4