Author Topic: how do i make a zombie defence game?  (Read 848 times)

I'm still somewhat new with VCE, but I believe it would be:

0 OnActivate | Self | VCE_ifVariable | <var:(target money is bound to):(name of money variable)> | >= | (Amount of money it costs) | 1 3
1 OnVariableTrue | (target money is bound to) | VCE_Modvariable | <var:(target money is bound to):(name of "money" variable)> | Subtract | (Amount of money it costs)

I'm sorry but, I don't get these substitutes for stuff. Please give an example for a gun costing 20$ and is going to the "zombie slayer"

I'm sorry but, I don't get these substitutes for stuff. Please give an example for a gun costing 20$ and is going to the "zombie slayer"

Ok. You kill a zombie. Events should be:

OnZombieDeath > Client > VCE_ModVariable > Points [ADD] 5

The player now has 5 Points. Now you need a brick that you'd click to purchase the gun. Say it was selling Gun for 20 Points.

The event would be like this:

OnActivate > Client > VCE_IfVariable > Points [ >= ] 20
OnVariableTrue > Player > AddItem > Gun
OnVariableTrue > Client > VCE_ModVariable > Points [SUBTRACT] 20
OnVariableTrue > Client > CenterPrint > [<color:ffff00>Total Points Left <color:ffffff>- <var:cl:Points>
OnVariableFalse > Client > CenterPrint > [INVALID AMOUNT OF POINTS - <var:cl:Points>/20]

If you have 20 points, It'd subtract the points and add the gun to your inventory. You need to download the Add Item event. Its very easy to find if you have RTB. The <var:cl:Points> will display the points you have. And if you have a problem with this, You either messed up on setting the Client or Player events.


Why wasn't that awesome guide around when I needed it?

Thank you so much. I found this very helpful. I have one more question. How do you save weapons? So if you die you can go to a point and get your weapons back.