Page 1 of 1

Variables not working

Posted: Sat Mar 09, 2019 12:21 pm
by StardustSucker
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?

Re: Variables not working

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

Re: Variables not working

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

Re: Variables not working

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

Second, why don't you upgrade to 1.4.4?

Re: Variables not working

Posted: Sat Mar 09, 2019 2:53 pm
by StardustSucker
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

Re: Variables not working

Posted: Sat Mar 09, 2019 3:12 pm
by Eri7
Try only f + 1 instead of f= f+1 and see if it works.

Re: Variables not working

Posted: Sat Mar 09, 2019 4:04 pm
by StardustSucker
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

Re: Variables not working

Posted: Sat Mar 09, 2019 4:08 pm
by Eri7
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.

Re: Variables not working

Posted: Sat Mar 09, 2019 4:45 pm
by StardustSucker
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!