08-09-2008, 11:08 AM
lol crazy background. this thingy is interesting ^^ (actually i used the JA for fights but never thought of it as something new =o (that u can exploit it for dash thingy)). works with certain other stuff as well.
programming logic (why it works):
pseudocode:
(
press button
onButtonPress{
if getButton is true
buttonIsPressed = true
getButton = false
end if
}
onButtonRelease{
buttonIsPressed = false
}
gameRun{
if game has passed 2 time units since button is pressed (so it's on the 3rd TU now)
..if buttonIsPressed == true
....buttonIsPressed = false
..end if
..getButton = true
end if
if game has passed 10 time units since button is pressed
..buttonIsPressed = false
end if
}
)
that's some crazy pseudocode (of course the actual code won't follow that - there's other ways of checking 2 TU or sth). that's y u need a wait: 2 at least if u want a D>AAAA... move if the A charges the thing up for next frame.
the reason y state: 4 and 5 work with input holding is
state: 4
getButton = true
state: 5
getButton = true
~where Button == Attack (that's y it doesn't work for Jump)
Azriel~
programming logic (why it works):
pseudocode:
(
press button
onButtonPress{
if getButton is true
buttonIsPressed = true
getButton = false
end if
}
onButtonRelease{
buttonIsPressed = false
}
gameRun{
if game has passed 2 time units since button is pressed (so it's on the 3rd TU now)
..if buttonIsPressed == true
....buttonIsPressed = false
..end if
..getButton = true
end if
if game has passed 10 time units since button is pressed
..buttonIsPressed = false
end if
}
)
that's some crazy pseudocode (of course the actual code won't follow that - there's other ways of checking 2 TU or sth). that's y u need a wait: 2 at least if u want a D>AAAA... move if the A charges the thing up for next frame.
the reason y state: 4 and 5 work with input holding is
state: 4
getButton = true
state: 5
getButton = true
~where Button == Attack (that's y it doesn't work for Jump)
Azriel~