Variables not working

Need help with any SMBX game-related issues? Ask your questions here.
StardustSucker
Shy Guy
Shy Guy
Posts: 5
Joined: Sun Feb 24, 2019 8:31 pm
Chat Username: Stardust Sucker

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: 7116
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Current Project: Boom Boom Evolution
Chat Username: PixelPest
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
Chat Username: Stardust Sucker

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

User avatar
Cedur
Toad
Toad
Posts: 6489
Joined: Tue Jun 28, 2016 10:14 am

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?
Image
More Supports: show

Image
Image

Still using the legacy editor? Get SMBX2 and PGE, it will improve your experience significantly. Here's why. And remember, Yoshis are tools to be used and discarded.

ShadowStarX (06/14/18) wrote: South Korea is easy deal

StardustSucker
Shy Guy
Shy Guy
Posts: 5
Joined: Sun Feb 24, 2019 8:31 pm
Chat Username: Stardust Sucker

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

User avatar
Eri7
Banned
Posts: 1772
Joined: Sat Jan 28, 2017 4:48 pm
Flair: Good Foundation allows for strong Execution
Current Project: Producer of the Novaverse
Chat Username: Eri7
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
Chat Username: Stardust Sucker

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

User avatar
Eri7
Banned
Posts: 1772
Joined: Sat Jan 28, 2017 4:48 pm
Flair: Good Foundation allows for strong Execution
Current Project: Producer of the Novaverse
Chat Username: Eri7
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
Chat Username: Stardust Sucker

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 10 guests