Blockland Forums > Suggestions & Requests
Event Suggestion: VCE Sets
<< < (3/4) > >>
Evar678:
Er, i meant one & sign, my bad.
Basically, || = or, and & = and.
Gen. Hothauser:

--- Quote from: Evar678 on October 18, 2012, 10:30:43 PM ---Er, i meant one & sign, my bad.
Basically, || = or, and & = and.

--- End quote ---

Oh, I just realized you didn't quote me on that second event a while back.  I never realized there were or functions set in VCE.  This is what I get for just figuring out VCE and never looking at the manual.  Thanks, I know that now.  I assume & works invetween the variables like || does but for and instead of or.  But, do we have a way to check these:

For ifvariable with a single Variable and a Value set.


--- Code: ---[0] [Onactivate] [Client] [VCE_Ifvariable] [Hunger] [==] [{1, 5, 10, 25, 50, 75}] [1 1]
[1] [Onvariabletrue] [Client] [Centerprint] [Your hunger: <var:cl:Hunger>/100]

--- End code ---

For ifvariable with a Variable set and Value set

A magical bomb that requires all stats to be maxed out.

--- Code: ---[0] [Onactivate] [Client] [VCE_Ifvariable] [{Strength, [b]Mana[/b], Hunger, Thirst}] [==] [{100, 50, 100, 100}] [1 1]
[1] [Onvariabletrue] [Self] [Spawnexplosion] [Vehiclefinalexplosion] [------||-]

--- End code ---

In my OP, I accidentally removed mana, and didn't remove the value that corresponded to the mana variable.  Sorry for any confusion that may have occurred.

For Modvariable with variable set and value set.

A magic potion that makes you faster and stronger, but lessens your defense.

--- Code: ---[0] [Onactivate] [Client] [VCE_Modvariable] [{Speed, defense, attack}] [add] [{5, -5, 5}]

--- End code ---

If the number of variables in a set does not match the number of values a set, then the events will not work.

A rejuvenation potion that resets your conditional stats.

--- Code: ---[0] [Onactivate] [Client] [VCE_Modvariable] [{Hunger, Thirst, Energy}] [set] [{100, 100}]

--- End code ---
This won't work.

I updated some of the events and added descriptions as to what they can be used for.  I don't plan on using any of the example events in any build in the future, it was just easiest to come up with some classic MMORPG fantasy items in event form.

Also, in the examples you gave, you used braces when listing like {Hunger||Thirst||Energy}.  Are braces required, was it a typo, or is it a good organizational technique?
Evar678:

--- Quote from: Gen. Hothauser on October 18, 2012, 11:23:21 PM ---Also, in the examples you gave, you used braces when listing like {Hunger||Thirst||Energy}.  Are braces required, was it a typo, or is it a good organizational technique?

--- End quote ---
The two braces is the symbol for the 'or' logic, that wasn't for organization.


--- Quote from: Gen. Hothauser on October 18, 2012, 11:23:21 PM ---I assume & works invetween the variables like || does but for and instead of or.

--- End quote ---
Yes, and remember, its only one &, not two. Having 2 &'s was a mistake by me.


--- Quote from: Gen. Hothauser on October 18, 2012, 11:23:21 PM --- But, do we have a way to check these:

--- Code: ---[0] [Onactivate] [Client] [VCE_Ifvariable] [Hunger] [==] [{1, 5, 10, 25, 50, 75}] [1 1]
[1] [Onvariabletrue] [Client] [Centerprint] [Your hunger: <var:cl:Hunger>/100]

--- End code ---

--- End quote ---
Yes theres a way.

--- Code: ---[0] [0] [Onactivate] [client] [VCE_Ifvariable] [loop] [!=] [{1}] [1 1]
[1] [0] [OnVariableTrue] [client] [VCE_Ifvariable] [Hunger] [==] [{1}] [2 3]
[2] [0] [OnVariableTrue] [Client] [Centerprint] [Your hunger: <var:cl:hunger>/100]
[3] [0] [OnVariableFalse] [Client] [VCE_Ifvariable] [Hunger] [==] [{5}] [4 5]
[4] [0] [OnVariableTrue] [Client] [Centerprint] [Your hunger: <var:cl:hunger>/100]
[5] [0] [OnVariableFalse] [Client] [VCE_Ifvariable] [Hunger] [==] [{10}] [6 7]
[6] [0] [OnVariableTrue] [Client] [Centerprint] [Your hunger: <var:cl:hunger>/100]
[7] [0] [OnVariableFalse] [Client] [Vce_Ifvariable] [Hunger] [==] [{25}] [8 9]
[8] [0] [OnVariableTrue] [Client] [Centerprint] [Your hunger: <var:cl:hunger>/100]
[9] [0] [OnVariableFalse] [Client] [VCE_Ifvariable] [Hunger] [==] [{50}] [10 11]
[10] [0] [OnVariableTrue] [Client] [Centerprint] [Your hunger: <var:cl:hunger>/100]
[11] [0] [OnVariableFalse] [Client] [VCE_Ifvariable] [Hunger] [==] [{75}] [12 13]
[12] [0] [OnVariableTrue] [Client] [Centerprint] [Your hunger: <var:cl:hunger>/100]
[13] [0] [OnVariableFalse] [Client] [VCE_Ifvariable] [Hunger] [==] [{100}] [14 15]
[13] [0] [OnVariableTrue] [Client] [Centerprint] [Your hunger: <var:cl:hunger>/100]
[14] [0] [OnVariableFalse] [Client] [VCE_ModVariable] [loop] [set] [1]
[15] [0] [OnVariableFalse] [Client] [VCE_Ifvariable] [loop] [==] [1] [1 1]
[16] [500] [OnVariableTrue] [Client] [VCE_Ifvariable] [hunger] [==] [<var:pl:hunger>] [1 1]

--- End code ---
The above was typed at 3:30 am, apologies if theres mistakes.

Anyway, that's a very basic vce loop. It will infinitely check that variable until one of the conditions are met. It's a little bulky on events, but, its lightweight on your server, and it works.
Its basically a bare-boned 'for' loop.
More info on loops whenever i finish the advanced vce manual.
Gen. Hothauser:

--- Quote from: Evar678 on October 19, 2012, 03:27:24 AM ---The two braces is the symbol for the 'or' logic, that wasn't for organization.
Yes, and remember, its only one &, not two. Having 2 &'s was a mistake by me.
Yes theres a way.

--- Code: ---[0] [0] [Onactivate] [client] [VCE_Ifvariable] [loop] [!=] [{1}] [1 1]
[1] [0] [OnVariableTrue] [client] [VCE_Ifvariable] [Hunger] [==] [{1}] [2 3]
[2] [0] [OnVariableTrue] [Client] [Centerprint] [Your hunger: <var:cl:hunger>/100]
[3] [0] [OnVariableFalse] [Client] [VCE_Ifvariable] [Hunger] [==] [{5}] [4 5]
[4] [0] [OnVariableTrue] [Client] [Centerprint] [Your hunger: <var:cl:hunger>/100]
[5] [0] [OnVariableFalse] [Client] [VCE_Ifvariable] [Hunger] [==] [{10}] [6 7]
[6] [0] [OnVariableTrue] [Client] [Centerprint] [Your hunger: <var:cl:hunger>/100]
[7] [0] [OnVariableFalse] [Client] [Vce_Ifvariable] [Hunger] [==] [{25}] [8 9]
[8] [0] [OnVariableTrue] [Client] [Centerprint] [Your hunger: <var:cl:hunger>/100]
[9] [0] [OnVariableFalse] [Client] [VCE_Ifvariable] [Hunger] [==] [{50}] [10 11]
[10] [0] [OnVariableTrue] [Client] [Centerprint] [Your hunger: <var:cl:hunger>/100]
[11] [0] [OnVariableFalse] [Client] [VCE_Ifvariable] [Hunger] [==] [{75}] [12 13]
[12] [0] [OnVariableTrue] [Client] [Centerprint] [Your hunger: <var:cl:hunger>/100]
[13] [0] [OnVariableFalse] [Client] [VCE_Ifvariable] [Hunger] [==] [{100}] [14 15]
[13] [0] [OnVariableTrue] [Client] [Centerprint] [Your hunger: <var:cl:hunger>/100]
[14] [0] [OnVariableFalse] [Client] [VCE_ModVariable] [loop] [set] [1]
[15] [0] [OnVariableFalse] [Client] [VCE_Ifvariable] [loop] [==] [1] [1 1]
[16] [500] [OnVariableTrue] [Client] [VCE_Ifvariable] [hunger] [==] [<var:pl:hunger>] [1 1]

--- End code ---
The above was typed at 3:30 am, apologies if theres mistakes.

Anyway, that's a very basic vce loop. It will infinitely check that variable until one of the conditions are met. It's a little bulky on events, but, its lightweight on your server, and it works.
Its basically a bare-boned 'for' loop.
More info on loops whenever i finish the advanced vce manual.

--- End quote ---

Oh stuff, I should have been more specific.  Ya, I knew how to do what you typed out.  The reason for the Set extension is to reduce the number of events needed to do this, because I have run out of room for events many times.  So instead of using 17 lines of events, you'd only need to use 1.
Evar678:

--- Quote from: Gen. Hothauser on October 19, 2012, 06:45:07 AM ---Oh stuff, I should have been more specific.  Ya, I knew how to do what you typed out.  The reason for the Set extension is to reduce the number of events needed to do this, because I have run out of room for events many times.  So instead of using 17 lines of events, you'd only need to use 1.

--- End quote ---
I know, but sadly, until somebody makes this addon, this is basically the only way to test that.
You do know that you can just use multiple bricks, right?
Navigation
Message Index
Next page
Previous page

Go to full version