• Advertisement
Sign in to follow this  

Game Input - Fighting game

This topic is 3856 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi i am trying to make a input similar to the one found in fighting games what i done is basically wrapped every button, diagonal presses into a buffer, and this buffer is comapred to a predefined combo buffer, this is what i done for every press, must be every one press, the combo is being compared to the previous input, if it is correct, it performs the combo, i am having problem with this technqiue if i use the below method, if i try doing diagonal presses i.e UP_LEFT, it hardly registers, at the moment i am using one timer for performing the move i.e how long u have.

if(m_ReadType == BUFFERED)
		{
			if(presses == 1)
			{
				if(moveBuffer == CurrentMoveQueue())
				{
					m_MoveStatus++;

					if(m_MoveStatus == GetMoveSize())
					{
						wprintf("\n\nName:%s -     COMBO\n\n", GetMoveName().c_str());
						m_MoveRegistered=true;
						m_MoveStatus=0;
						m_MoveTime[0]=0;
						m_Timer=false;
					}
				}
				else
					m_MoveStatus=0;
			}
		}


it seems the only way to register diagonal presses like UP_LEFT is to get rid of the pressed function and also the else m_MoveStatus=0; otherwise it won't register.

Share this post


Link to post
Share on other sites
Advertisement
I think the reason noone has answered your post is because they can't really make sense of it. You might try asking your question again in a simpler way.

Share this post


Link to post
Share on other sites
Theoretically, This is what you are saying:

You want your fighting game to have button press combos.
You want to know how to detect when the player has pressed the correct combo.

Is that what you want to do? I have some suggestions.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement