Variable/Conditional Events
By Chrono and Destiny
Introduction
This is a massive mod which allows you to increment, decrement etc players variables and call upon ifVariable and other input events before acting a event command. This mod is the end of all those bad RPGs, now all you need is this to make a your own currency system, banking system, everything that in the past you had to script.
Input Events
VariableTrue - This is called if the output event "ifVariable" and its children return true.
VariableFalse - This is called if the output event "ifVariable" and its children return false.
Output Events
Player & Client & Bricks - addVariable - The first text box is the variable you want to increase or descrease and the second is by how much.
Player & Client Bricks - setVariable - The first text box is the variable you want to set and the second is what you want to set it too.
Player & Client Bricks - multiplyVariable - The first text box is the variable you want to set and the second is what you want to multiply it by.
Player & Client Bricks - divideVariable - The first text box is the variable you want to set and the second is what you want to divide it by.
Player & Client Bricks - ifVarToVar - Allows you to check if one variable equals another variable.
Player & Client Bricks - addVarToVar - Allows you to add one variable to another.
Player & Client Bricks - subVarToVar - Allows you to subtract one variable with another.
Player & Client Bricks - displayVar - You can choose either to chat message. center print, bottom print or messageboxok and it displays the value of a variable.
fxDTSBrick - ifVariable - You use this to check if a variable equals a certain number. The 1st textbox is the variable and second is the number you want to check.
fxDTSBrick - ifBrickNameEquals - You use this to check if a brick name equals are string.
fxDTSBrick - ifPlayerNameEquals - You use this to check if the player who is doing the event's name equals a string.
fxDTSBrick - ifAdmin - You use this to check if the player who is doing the event is an admin.
fxDTSBrick - ifRandomDice - This rolls a virtual die. The first textbox is amount of sides on the die.
fxDTSBrick - ifRandom - This randomly chooses a number, First box is the minimum number it can be and the second is the highest number it can be.
fxDTSBrick - ifPrintCount - If bricks print count equals certain logic. (Must have been incremented or decremented by events first)
fxDTSBrick - ifPlayerID - If the players blockland ID equals a certain logic.
fxDTSBrick - ifPlayerScore - If the players score equals a certain logic.
fxDTSBrick - ifPlayerDamage - If the players damage equals a certain logic. (Opposite of health)
fxDTSBrick - ifPlayerEnergy - If the players energy equals a certain logic.
fxDTSBrick - ifPlayerSpeed - If the players speed equals a certain logic on a certain axis.
fxDTSBrick - ifLastPlayerMsg - If the last message the player said in the chat equals something. (Best used with onPlayerTalk input event)
Client - saveVariable - REQUIRES TRUCE's SAVING VARIABLES [SEE DOWN]
Client - loadVariable - REQUIRES TRUCE's SAVING VARIABLES [SEE DOWN]
How does it work?
Its relatively easy to use. To call the if output events, you just do the output event, then do the next line of event VariableTrue, which means if it succeeds, or Variable False. It's best to play around with it a bit to get how to use it.
Installation & Download
Mirror 1:
Destiny's PageMirror 2:
MediaFireClick Here to view this file on the RTB Download ManagerJust place it straight into your add-ons folder. (And tick it on the start mission menu)
Change Log
Version 2:
- ifVarToVar
- addVarToVar
- subVarToVar
- displayVariable
- setVarToVar
Version 3:
- ifAdmin
- ifBrickNameEquals
- ifPlayerNameEquals
- ifRandomDice
- ifRandom
Version 4:
- ifPrintCount
- ifPlayerID
- ifPlayerScore
- ifPlayerDamage
- ifPlayerEnergy
- ifPlayerSpeed
- ifLastPlayerMsg
- Saving Variables by Truce [SEE DOWN]
Tutorials
Multiple Variable Checks in One Brick - by Truce
V/CE Mods that have been Approved to be Safe and Useful:
ifItemInSlot/ifItemInHand Event - by Truce
ifProjectile - by Truce
Saving Variables - by Truce [HIGHLY SUGGESTED]