Problem with on map variable

Started by MetalZelda, October 07, 2014, 08:12:51 am

Previous topic - Next topic

MetalZelda

October 07, 2014, 08:12:51 am Last Edit: October 07, 2014, 08:36:17 am by MetalZelda
Hello everyone

Today I've managed to make a map that act list a Zelda Lost woods, it is managed with variables.
But I have a great and unexplained problem coming along with this.

Here is the map.



The test sign display the current value of variable 61 that handle the process.
The starting value I set for the variable is 8 and decrease if the player take the good path.
If the player take the wrong path it increase to 8 and only this work.

the 1st path works well, 6-6 = 2 times left but when I go up where the variable should decrease to 5 it doesn't work, it's stuck at 6

This is the faulty event, though I just CTRLC CTRL V and modified the value from the event on the right.

Teh event



Thanks in advance :)

KK20

This is what the logic of the event looks like to me:

if variable has value of 6, 4, or 1
 if variable has value of 1
   teleport player
 end
  decrease variable by 1
else
 set variable to 8
end

Which basically means if your variable has the values of 2, 3, 5, 7, or 8, it will be reset to hold a value of 8 every time.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

MetalZelda

Quote from: KK20 on October 07, 2014, 10:10:37 am
This is what the logic of the event looks like to me:

if variable has value of 6, 4, or 1
 if variable has value of 1
   teleport player
 end
  decrease variable by 1
else
 set variable to 8
end

Which basically means if your variable has the values of 2, 3, 5, 7, or 8, it will be reset to hold a value of 8 every time.


Hmmm, I see what you mean, but the weirdest thing is that it doesn't work on this certain event, the 1st event computing 8-1 and 7-1 works, but when I use another event which have the same formula, it doesn't work (6-1 doesn't set the variable to 5)
That's weird, but that's maybe my organisation ^^

KK20

So what does the working event look like?

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

MetalZelda

Oh well it was solved because I do a thing that didn't compute well 6-1 ... In fact it doesn't exist at all ... Crappy event copy paste
Thanks for the contribution though ^^