The Daily Click ::. Forums ::. Klik Coding Help ::. Menu Problem....
 

Post Reply  Post Oekaki 
 

Posted By Message

Chimp



Registered
  01/06/2003
Points
  114
26th June, 2003 at 11:35:06 -

This is a strange probelm that I'm having while trying to create a menu for my game. I have a marker next to the object that the player will select when they press "enter", and I have it so that these options are represented by Alterable Value A of my menu, which is an active object because I'm having it move in from off the screen (e.g. 0=off screen, 1=on screen/start, 2=load, 3=quit.) Then, I have an event telling the marker being put in a position when the Alterable Value is at a certain value. Then I have events saying when to change the value to suit the menu's needs (e.g. Alterable Value A of "Menu" is 1 and user presses "down-cursor" key, set Alterable Value A to "2", Alterable Value A of "Menu" is 2 and user presses "down-cursor" key, set Alterable Value A to "3", Alterable Value A of "Menu" is equal to 2 and user presses "up cursor" key, set Alterable Value A of "Menu" to 1, Alterable Value A of "Menu" is 3 and user presses up cursor key, set Alterable Value A of "Menu" to 2)

That all SEEMS well, but the problem is, whenever Alterable Value A of "menu" is 1, and I press down, it immediately sets itself to 3. Remember, I am not tellintg it to ADD 1 to the Alterable value, but to set it. I even put in a counter to check this out.

Could some one tell me what's wrong with this? Thanx.

 


Blackgaze

Possibly Insane

Registered
  01/11/2002
Points
  3161

VIP Member
26th June, 2003 at 11:46:44 -

Chimp you did what i did b4. Here is what i didi to soleve this:
EVENTS

when button DOWN is clicked
and value is 2 or lower add 1 to value A

when button UP is clicked
and value is 1 or higher subtract 1 from value A

If you are using a different menu try it opposite (e.t.c when button UP CLICKED and value is 2 or lower subtract/add 1 to/from value A)

 
Formerly known as "Spiderhead".

Returned after four years.
www.youtube.com/user/sevlech for more infomation

Cybermaze



Registered
  03/04/2003
Points
  853
26th June, 2003 at 11:47:25 -

Hehe, ok ... after reading it a few times I got it.

What happens is that when you press down value is 1. First it checks if the value i 1. It is so it set to 2. Then it checks if the value is 2, and it just got 2! So now its set to 3. The rest of the events are false. Now the screen is updated and whoop, the counter shows 3.

So, when you check for press down place the events the other way around. First check if its 2, then check if its 1.

And for the press up, first check if its 2 then 3.

Then it will work as you want it to.

 
If you knew, I would have to kill you...

Blackgaze

Possibly Insane

Registered
  01/11/2002
Points
  3161

VIP Member
26th June, 2003 at 11:54:53 -

opps mine didn't leave a gap between the event and action

 
Formerly known as "Spiderhead".

Returned after four years.
www.youtube.com/user/sevlech for more infomation

RapidFlash

Savior of the Universe

Registered
  14/05/2002
Points
  2712
26th June, 2003 at 12:15:42 -

Or you could have it so that you can only press down when Alterable Value of B = 0. Whenever you press down or up it changes the B Value to 1, and every xx hundreths of a second it sets B to 0. This should get rid of your problem.

 
http://www.klik-me.com

Chimp



Registered
  01/06/2003
Points
  114
26th June, 2003 at 13:35:06 -

Ok. I get it now. The strange thing is that this used to work when I did similar menus in TGF and KNP (with meters, but meh)

 

   

Post Reply



 



Advertisement

Worth A Click