-
Weird alt value bug
Hey all,
okay so I am working on a game and I am having some trouble with my alt values I want it so that when the player colides with an object and the alt value a is greater than 0 it sets alt value b to 1 which causes one outcome to happen, and when alt value a is less or equal to 0 it sets alt value b to 2 which causes a different outcome now somtimes it works and sometimes it dosent now since this is a major gameplay bug I need it to be always working
-
Re: Weird alt value bug
Would you upload your coding for that so we can have a look at "the bug"?
Thanks,
Marv
-
Re: Weird alt value bug
Yeah without seeing your mfa we won't really be able to help much... This sounds like an easy fix otherwise.
-
Re: Weird alt value bug
Thanks guys, yeah that would help so heres a page I made off my website http://podunkstudioz.com/bwadao.html
-
Re: Weird alt value bug
Ah I found your problem. I'm guessing it has to do with LV5 since you didn't specify... It appears you want the dead body to be created when the player falls on the spikes, but sometimes it isn't creating.
Well a quick look at your first event and it explains why this is happening.
You are checking for the player object colliding with the spike object, and when that happens you're subtracting from a global value by 1.
This works fine if you only hit one spike ever... but if your player falls between two spikes, they are effectively colliding with two at the same time. Which means your event is subtracting 2 from your global value instantly, instead of just 1.
To fix this... you just put a "only one action when event loops" condition into your very first condition there. This will ensure that during that game loop, if the player collides with any number of spikes, that it performs the action only one time and not for as many times as spikes collided.
Problem solved. :)
-
Re: Weird alt value bug
Thanks Alot Kondias, :grin: :grin: :grin: you are awesome