Variables not working

Need help with any SMBX game-related issues? Ask your questions here.

Moderator: Userbase Moderators

StardustSucker
Shy Guy
Shy Guy
Posts: 5
Joined: Sun Feb 24, 2019 8:31 pm

Variables not working

Postby StardustSucker » Sat Mar 09, 2019 12:21 pm

On my level I have a variable called "f", and whenever a specific goomba dies I have it's death triggered to an event that would make f=f+1 but it doesnt work. I feel like the solution is really simple & that im just not using the program correctly. Does anyone know what the right mathematical expression to do this is or is it impossible?

PixelPest
Link
Link
Posts: 7111
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Contact:

Re: Variables not working

Postby PixelPest » Sat Mar 09, 2019 12:40 pm

What engine are you using? SMBX2 or 38A/1.4?

StardustSucker
Shy Guy
Shy Guy
Posts: 5
Joined: Sun Feb 24, 2019 8:31 pm

Re: Variables not working

Postby StardustSucker » Sat Mar 09, 2019 1:42 pm

PixelPest wrote:
Sat Mar 09, 2019 12:40 pm
What engine are you using? SMBX2 or 38A/1.4?
1.4.3

Cedur
Link
Link
Posts: 7073
Joined: Tue Jun 28, 2016 10:14 am
Flair: I'm gone, for chess and minesweeper
Pronouns: he/him

Re: Variables not working

Postby Cedur » Sat Mar 09, 2019 2:28 pm

First, could you screenshot your Variables window?

Second, why don't you upgrade to 1.4.4?

StardustSucker
Shy Guy
Shy Guy
Posts: 5
Joined: Sun Feb 24, 2019 8:31 pm

Re: Variables not working

Postby StardustSucker » Sat Mar 09, 2019 2:53 pm

Cedur wrote:
Sat Mar 09, 2019 2:28 pm
First, could you screenshot your Variables window?

Second, why don't you upgrade to 1.4.4?

Image

Eri7
Banned
Posts: 1770
Joined: Sat Jan 28, 2017 4:48 pm
Flair: Good Foundation allows for strong Execution
Contact:

Re: Variables not working

Postby Eri7 » Sat Mar 09, 2019 3:12 pm

Try only f + 1 instead of f= f+1 and see if it works.

StardustSucker
Shy Guy
Shy Guy
Posts: 5
Joined: Sun Feb 24, 2019 8:31 pm

Re: Variables not working

Postby StardustSucker » Sat Mar 09, 2019 4:04 pm

Eri7 wrote:
Sat Mar 09, 2019 3:12 pm
Try only f + 1 instead of f= f+1 and see if it works.
already tried b4hand and it still goes to 0

https://www.youtube.com/watch?v=TPBVghz ... e=youtu.be

Eri7
Banned
Posts: 1770
Joined: Sat Jan 28, 2017 4:48 pm
Flair: Good Foundation allows for strong Execution
Contact:

Re: Variables not working

Postby Eri7 » Sat Mar 09, 2019 4:08 pm

Then you will need to change the variable through scripts, create a script with "val(f) = val(f) + 1" and make the goomba's death trigger it.

StardustSucker
Shy Guy
Shy Guy
Posts: 5
Joined: Sun Feb 24, 2019 8:31 pm

Re: Variables not working

Postby StardustSucker » Sat Mar 09, 2019 4:45 pm

Eri7 wrote:
Sat Mar 09, 2019 4:08 pm
Then you will need to change the variable through scripts, create a script with "val(f) = val(f) + 1" and make the goomba's death trigger it.
it worked. thanks!


Return to “Help and Support”

Who is online

Users browsing this forum: No registered users and 1 guest

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari