Thread Rating:
  • 2 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
my very first tut^^ a.k.a. input joking
#1
OK, I've played a bit with the data of some characters, and this is the result:

[Image: 8505looping2.gif]

This looping is NOT made with any hit_?-tags, the solution is much easier...
That technique also enables me to do this:

[Image: 3761kick.gif]

These are not the run_attack-frames...

And now the explanation:
Open your character-data and look into the bmp-part...

Code:
<bmp_begin>
name: Maskman
head: sprite\maskman\maskman_f.png
small: sprite\maskman\maskman_s.png
file(0-69): sprite\maskman\maskman_0.png w: 79 h: 79 row: 10 col: 7
file(70-139): sprite\maskman\maskman_1.png w: 79 h: 79 row: 10 col: 7
file(140-142): sprite\maskman\maskman_2.png w: 159 h: 79 row: 3 col: 1
file(143-145): sprite\maskman\maskman_3.png w: 99 h: 99 row: 3 col: 1
file(146-149): sprite\maskman\maskman_4.png w: 99 h: 79 row: 4 col: 1
walking_frame_rate 3
walking_speed 5.000000
walking_speedz 3.000000
running_frame_rate 3
running_speed 18.000000
running_speedz 2.300000
heavy_walking_speed 4.000000
heavy_walking_speedz 2.500000
heavy_running_speed 9.000000
heavy_running_speedz 1.800000
jump_height -16.299999
jump_distance 10.000000
jump_distancez 5.000000
dash_height -0.000000
dash_distance 25.000000
dash_distancez 5.750000
rowing_height -16.000000
rowing_distance 25.000000
<bmp_end>

As you can see, the character would have a huge problem, when the dash-frames are displayed - the character would simply fall down...
Really, if you press the jump key like usual to execute the dash, your character would go immediately to the falling-frames. But when you press the jump-key a bit longer, the character will execute the rowing-frames. And these frames contain, as you hopefully know, the looping sprites.
For the second graphic, I pressed the jump- and the attack-button at the same time, so this is how the dash_attack-frames are displayed.

There is nothing more behind it, so, have fun
Silverthorn / Blue Phoenix
~ Breaking LFE since 2008 ~

"Freeze, you're under vrest!" - Mark, probably.

» Gallery | » Sprites | » DeviantArt
Reply
Thanks given by:
#2
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~
Reply
Thanks given by:




Users browsing this thread: 3 Guest(s)