Author Topic: Exp System with vce?  (Read 442 times)

What are the events for a exp gain and a leveling up system?

Very difficult and long process to type out.

There are also many tangents you can go on depending on how you want your game to be set up.

But good for you for using VCE for exp and leveling functions instead of some mod.

You'll need relay bricks.
Lots of HUD-displaying relay bricks.


HUDrelay (One per player, or use PrintHUD mod and stray from VCE a little)
Code: [Select]
33 onActivate -> Self -> fireRelay
0  onActivate -> Client -> vce_modVariable(DisplayHUD, equals, 1)
0  onRelay -> Self -> vce_ifVariable(client, DisplayHUD, equals, 1)
0  onVariableTrue -> Client -> bottomPrint(EXP|<var:cl:EXP>,LEV|<var:cl:level>,HP|<var:pl:health>/<var:pl:maxhealth>)
33 onRelay -> Self -> fireRelay
PrintHUD should just be
Code: [Select]
EXP|<var:cl:EXP>,LEV|<var:cl:level>,HP|<var:pl:health>/<var:pl:maxhealth>

To give a player EXP:
Code: [Select]
0 (trigger in some way) -> Client -> vce_modVariable(EXP, add, X) //X is the amount of EXP to add
0 (same trigger) -> Client -> vce_ifVariable(EXP, greater than, X) //X is the amount of EXP for a level up
0 onVariableTrue -> Client -> vce_modVariable(EXP, set, 0)
0 onVariableTrue -> Client -> vce_modVariable(level, add, 1)