I'm making an rpg,And theres some things i want to know.Would be nice if someone would help.
1.
I would like to know how to make a system that can increase your health (I'm trying to get it so that armor with increase your HP.)Or if theres a way i can actually make armor reduce damage,Either way i wanna know.
2.
I kinda want to know how i can make ores,blocks etc have HP.
Not much to explain here,But ive seen alot made like that.
3.
I would like to know how i can make a item that requires you to have more then 1 items (Etc,Hook+Rope,Bent stick+String..)
First off, get the lastest version of VCE. What you're asking is impossible without VCE v7 and up.
Here's the events you need:
1)
[X] 0 [0] onActivate -> Self -> VCE_stateFunction -> [<var:cl:bl_id>] [ ]
[X] 1 [0] onActivate -> Self -> VCE_callFunction -> [<var:cl:bl_id>] [ ]
[X] 2 [33] onVariableFunction -> Self -> VCE_callFunction -> [<var:cl:bl_id>] [ ]
[X] 4 [0] onActivate -> Player -> VCE_modVariable -> [MaxShield] Set [100]
[X] 3 [0] onActivate -> Player -> VCE_modVariable -> [Shield] Set [<var:pl:maxShield>]
[X] 5 [0] onActivate -> Client -> CenterPrint -> [<color:FFFF00>You have picked up body armor!] [3]
[X] 6 [0] onVariableFunction -> Self -> VCE_ifValue -> [<var:pl:health>] < [<var:pl:maxHealth>] [7 7]
[X] 7 [0] onVariableTrue -> Self -> VCE_ifValue -> [<var:pl:shield>] > [0] [8 9]
[X] 8 [0] onVariableTrue -> Player -> AddHealth -> [1]
[X] 9 [0] onVariableTrue -> Player -> VCE_modVariable -> [Shield] Subtract [1]
[X] 10 [0] onVariableFunction -> Self -> VCE_ifValue -> [<var:pl:shield>] < [0] [11 12]
[X] 11 [0] onVariableTrue -> Player -> VCE_modVariable -> [Shield] Set [0]
[X] 12 [0] onVariableFalse -> Self -> VCE_ifValue -> [<var:pl:shield>] > [<var:pl:maxShield>] [13 13]
[X] 13 [0] onVariableTrue -> Player -> VCE_modVariable -> [Shield] Set [<var:pl:maxShield>]
[X] 14 [0] onVariableFunction -> Player -> VCE_modVariable [HP] Set [<color:66FF66><var:pl:health>]
[X] 15 [0] onVariableFunction -> Player -> VCE_modVariable [HP] Ceil [ ]
[X] 16 [0] onVariableFunction -> Player -> VCE_modVariable [SHLD] Set [<color:66FFFF><var:pl:shield>]
[X] 17 [0] onVariableFunction -> Player -> VCE_modVariable [ALL] Set [<var:pl:HP> <color:FFFFFF>/ <var:pl:SHLD>]
[X] 18 [33] onVariableFunction -> Client -> BottomPrint -> [<color:FFFF00>Health<color:FFFFFF>: <var:pl:ALL>] [3]
The last five events are for the display. You can toggle these off if you don't want it.
You can also change the MaxShield player variable to any number you want. You may also use other bricks that recover your shield. It will not exceed the MaxShield variable.
2)
This can range between tons of different scenarios, so I'll give you a generic one.
[X] 0 [0] onActivate -> Self -> VCE_modVariable -> Brick [MaxHits] Set [25]
[X] 1 [0] onActivate -> Self -> VCE_modVariable -> Brick [Resource] Set [Iron]
[X] 2 [0] onActivate -> Self -> VCE_modVariable -> Brick [ResourceType] Set [Ore]
[X] 3 [0] onActivate -> Self -> VCE_modVariable -> Brick [Amount] Set [1]
[X] 4 [0] onActivate -> Self -> VCE_modVariable -> Brick [RequiredItem] Set [ ]
[X] 5 [0] onActivate -> Self -> VCE_modVariable -> Brick [RespawnTime] Set [15]
[X] 6 [0] onActivate -> Self -> VCE_ifValue -> [<var:br:requiredItem>] == [ ] [8 12]
[X] 7 [0] onProjectileHit -> Self -> VCE_ifValue -> [<var:pl:currentItem>] == [<var:br:requiredItem>] [8 14]
[X] 8 [0] onVariableTrue -> Player -> VCE_modVariable -> [DisplayName] Set [<color:FF00FF><var:br:resource> <var:br:resourceType> <var:br:datablock><color:FFFFFF>:]
[X] 9 [0] onVariableTrue -> Player -> VCE_modVariable -> [DisplayHits] Set [<var:br:hits> / <var:br:maxHits>]
[X] 10 [33] onVariableTrue -> Client -> CenterPrint -> [<var:pl:displayName> <var:pl:displayHits>]
[X] 11 [0] onVariableTrue -> Player -> VCE_modVariable -> [VariableName] Set [<color:FFFF00><var:br:resource> <var:br:resourceType><color:FFFFFF>:]
[X] 12 [0] onVariableTrue -> Player -> VCE_modVariable -> [ResourceAmount] Set [<var:pl:VCE_<var:br:resource<var:br:resourceType>>]
[X] 13 [33] onVariableTrue -> Client -> BottomPrint -> [<var:pl:variableName> <var:pl:resourceAmount>]
[X] 14 [0] onVariableTrue -> Self -> VCE_ifValue -> [<var:br:hits>] < [<var:br:maxHits>] [15 23]
[X] 15 [0] onVariableFalse -> Client -> CenterPrint -> [<color:FFFFFF>Please use the proper tool to harvest this resource] [3]
[X] 16 [0] onVariableTrue -> Self -> VCE_modVariable -> Brick [Hits] Subtract [1]
[X] 17 [0] onVariableFalse -> Client -> VCE_modVariable -> [VCE_<var:br:resource<var:br:resourceType>>] Add [<var:br:amount>]
[X] 18 [0] onVariableFalse -> Self -> VCE_saveVariable -> Client [VCE_<var:br:resource<var:br:resourceType>>]
[X] 19 [0] onVariableFalse -> Self -> VCE_modVariable -> Brick [Hits] Set [<var:br:maxHits>]
[X] 20 [0] onVariableFalse -> Self -> VCE_stateFunction -> [Respawn] [ ]
[X] 21 [1000] onVariableFalse -> Self -> VCE_callFunction -> [Respawn] [ ]
[X] 22 [0] onVariableFalse -> Self -> VCE_modVariable -> Brick [R] set [0]
[X] 23 [0] onVariableFalse -> Self -> disappear -> [-1]
[X] 24 [0] onVariableFunction -> Self -> VCE_ifValue -> [<var:br:R>] >= [<var:br:respawnTime>] [25 27]
[X] 25 [0] onVariableFalse -> Self -> VCE_modVariable -> Brick [R] add [1]
[X] 26 [1000] onVariableFalse -> Self -> VCE_callFunction -> [Respawn]
[X] 27 [0] onVariableTrue -> Self -> disappear -> [0]
The first 6 variable are what you should change:
MaxHits: The number of hits the brick takes to harvest
Resource: What resource the brick is (Iron, Silver, Gold, Diamond, Maple, Oak, etc.)
Resource Type: What the resource type is (Ore, Wood, Fish, etc.)
Amount: How much the resource produces (1, 2, 3, 4...)
RequiredItem: The UI Name of the item required to harvest this resource (Pickaxe, Axe, Shovel, etc. Leave blank for bare hands.)
RespawnTime: How long the brick takes until it respawns (In seconds [1, 2, 3, 4...])
3) I'm not quite sure what you're asking here. This is borderline VCE, meaning some things will only be achievable via script. Depending on what you want, I may be able to provide you the VCE events that you require.
Anyways, all of things should theoretically work. I hope this helps.