Author Topic: Why are variables being bitchy?  (Read 1507 times)

I know how to use VCE quite well. But is it just me, am I doing something wrong, or is there something iffy here.

Why can't I test a variable and have 3 events for VariableTrue? If I do:

ifValue > <var:nb_brick:variable> = 1 > 1 2
onvariabletrue > Lol
onvariabletrue > lol2

^^ that works fine, but if I go

ifValue > <var:nb_brick:variable> = 1 > 1 2 3
onvariabletrue > Lol
onvariabletrue > lol2
onvariabletrue > lol3

^^ that only does the first two

I don't see why its incapable of having more than one action occur if true. Furthermore, if I have this..

ifValue > <var:nb_brick:variable> = 1 > 1 2
onvariabletrue > Lol
onvariabletrue > lol2
ifValue > <var:nb_brick2:variable2> = 1 > 1 2
onvariabletrue > ohai
onvariabletrue > ohai2

The variables don't work at all.

Is VCE really this stubborn or what. I'm sick of having to work around this.

That last box is a range, not a list. 1 3 would activate events 1, 2, and 3. I'm not sure what you're asking for the second part. I could look at it in-game if you would like.

That last box is a range, not a list. 1 3 would activate events 1, 2, and 3.

forget me, that could be the problem. Thanks so much, I'll give it a shot. <3

EDIT: Yep, thats whats breaking the other variables, thanks for clearing that up! ^_^
« Last Edit: March 01, 2011, 10:56:49 PM by Sheath »

Your second problem is the last values at the end of the line are the range for the line numbers. Try the one thing on the bottom again but change the event numbers to 4 and 5 so it looks like this.

ifValue > <var:nb_brick2:variable2> = 1 > 4 5

Your second problem is the last values at the end of the line are the range for the line numbers.

Ah thanks but that was just a typo in the post. :P

how could you of done all of your awesome events so far without knowing that the last box is a range :c?

how could you of done all of your awesome events so far without knowing that the last box is a range :c?

Thats the nicest thing you've ever said to me. ;_;
I was very hacky with it, adding more events than needed... no wonder why it was so loving HARD. D:

I'm working on the best event build I have ever made. Its so massive event wise I've had to use a text editor to do most of it... so far its at 11,000 events (hence I had to ask about this stupid range thing, since I need to be really careful how much more I add) I'll explain later... lol.
« Last Edit: March 02, 2011, 01:40:07 AM by Sheath »

Ooh do want to see it.

I'm not good whatsoever with VCE :( It saddens me to be clueless to how people are doing this amazing things... today I played Battleship on Blockland. Had no clue How the heck it was made D:

I spent ages avoiding variables in programming, my creations were mighty stuff as a result.
Its just simple math.

ifValue > <var:nb_brick:variable> = 1 > 1 3
onvariabletrue > Lol
onvariabletrue > lol2
onvariabletrue > lol3

in simple terms, it means this...

If the variable named "variable" stored on brick named "brick" is equal to one, do functions 1 to 3.
If the above is true, lol
If the above is true, lol2
If the above is true, lol3

yeah, so you can't skip over variables which sucks.

I get the concept of variables in this sense, but as far as calling upon variables... how do you put data into a variable, so that it knows like "if the above is true, do variable 'lol2' and [/b]variable 'lol2' will make this brick red[/b]" Where is this part in VCE, and in scripting? This is the one major problem I have with scripting D:

Like in a script, it'll just say "these variables are in this function". And then during the function, it calls the variables during certain commands and whatever. But nowhere in scripts do I see people giving the variables anything more than a number value, and I never see the number value being treated as making a GUI pop up or something...

I hope I didn't go too far off topic... sorry about this. Just this is a real problem I'm having with understanding such things.
« Last Edit: March 02, 2011, 07:32:16 PM by Wesley Williams »

Inn scripting?

$variable1 = 5
$variable2 = 10
$variable3=15

    if(variable1 + variable2 == variable3)
{
    echo("hey boys, looks like "SPC $variable1 @" plus "SPC $variable2 @" equals "SPC $variable3 @"!");

    else
    echo("hey boys, looks like  "SPC $variable1 @" plus "SPC $variable2 @" doesn't equal "SPC $variable3 @"!");
}

at least i think, i'm a terrible scripter.

$variable1 = 5;
$variable2 = 10;
$variable3=15;

    if((variable1 + variable2) == variable3)
{
    echo("hey boys, looks like"SPC $variable1 @" plus"SPC $variable2 @" equals "SPC $variable3 @"!");

    else
    echo("hey boys, looks like "SPC $variable1 @" plus"SPC $variable2 @" doesn't equal "SPC $variable3 @"!");
}

at least i think, i'm a terrible scripter.


Code: [Select]
$variable1 = 5;
$variable2 = 10;
$variable3=15;

if((variable1 + variable2) == variable3)
{
    echo("hey boys, looks like"SPC $variable1 @" plus"SPC $variable2 @" equals "SPC $variable3 @"!");
}
else
{
    echo("hey boys, looks like "SPC $variable1 @" plus"SPC $variable2 @" doesn't equal "SPC $variable3 @"!");
}

or even

Code: [Select]
$variable1 = 5
$variable2 = 10
$variable3=15

if(variable1 + variable2 == variable3)
    echo("hey boys, looks like "SPC $variable1 @" plus "SPC $variable2 @" equals "SPC $variable3 @"!");
else
    echo("hey boys, looks like  "SPC $variable1 @" plus "SPC $variable2 @" doesn't equal "SPC $variable3 @"!");

Mmk well this is sliding off the tracks, my question was answered. Thanks.