Platform Example (Dectector, Animations and Music)

Post your own tutorials, guides and demos.

Post » Mon Jun 09, 2008 2:33 am

MEAGAMAN FTW! I'm a MegaMan freak LOLOL. You should see my Rockman figure collection... :oops:

Yes that is easily possible, you'd need the following animations:

Idle
Walk
Jump
Shoot Still
Shoot Walking
Shoot Jumping
Slide (if you want)

for setting the animations, you'd just put in the condition player pressing/not pressing 'firebutton'


Example: Walking Right and not shooting
MouseKeyboard: Key Right arrow is down
MousKeyboard: Key Control is down {INVERSE THIS CONDITION}
System: 0 MegaMan[Platform].VectorY Equal to 0
System: Trigger once
> MegaManSet animation to "Walk"
> MegaManPlay current animation
> MegaManSet angle to 0


Example: Walking Right and shooting
MouseKeyboard: Key Right arrow is down
MousKeyboard: Key Control is down
System: 0 MegaMan[Platform].VectorY Equal to 0
System: Trigger once
> MegaManSet animation to "WalkShoot"
>MegaManSet animation frame 1
> MegaManPlay current animation
> MegaManSet angle to 0

I'm sure you can understand how to differentiate jump and jumpshoot animations:


Example: Jumping and shooting
MegaMan Animation Jump Playing
MousKeyboard: Key Control is down
> MegaManSet animation to "Jumpshoot"


Example: Jumping and not shooting
MegaMan Animation Jump Playing
MousKeyboard: Key Control is down {INVERSE}
> MegaManSet animation to "Jumpshoot"
B
13
S
3
G
5
Posts: 286
Reputation: 3,193

Post » Mon Jun 09, 2008 11:37 pm

Thanks, i've been working on it, but i have a litte errors and buggs and don't know why -.-. can you check it o.o, is there someting wrong?

http://www.4shared.com/file/50718755/f4 ... nline.html
B
3
G
4
Posts: 13
Reputation: 1,101

Post » Tue Jun 10, 2008 4:34 am

:? Smack I was trying it out and can't figure out why there are problems with having him shoot still, walking, and jumping. Perhaps my coding isn't right. The base animations are all fine, it's the shooting ones that are messing up. :|

anyone have input?
B
13
S
3
G
5
Posts: 286
Reputation: 3,193

Post » Tue Jun 10, 2008 3:04 pm

there is a method to improve the coding with Flags ( like MMF) ,When Character is in the ground, Flag 1 is on and when is in the air Flag 1 Off, when shooting FLag 2 On/OFF, or it can be use with values?.

And the other think i was thinking is create a Delay ( is this expression correct?) when the Character is recibing damage using a kind of counter? o.o.

I think i can't do X shoot well because the variable Character[Platform].VectorY is blocking any animation change ( because it set the stand Idle animation) and it don't permit change to stand shoot or walk shoot.
B
3
G
4
Posts: 13
Reputation: 1,101

Post » Tue Jun 10, 2008 3:13 pm

AH good thought, using counters. Yes, having named variables is very nice in construct for these reasons! Sorry, last night I wasn't thinking too straight (just got off work).
You have the idea though:
while on ground and press control
>set groundshoot value = 1

While on ground and value groundshoot = 1
>Play Shoot animation

same for jumping

The only problem is that "when animation finished" is not working, so you can't just yet do:
Animation shoot over
>set groundshoot = 0
>set X animation to idle
>frame 1
>play

ect ect
B
13
S
3
G
5
Posts: 286
Reputation: 3,193

Post » Tue Jun 10, 2008 3:51 pm

Nice example! :D I love the animation. Construct really needs a 'is standing on ground' condition in the platform movement hey...or perhaps even some generally collision functions so instead of just 'is overlapping' we could have 'is touching above / below / left / right '.
B
4
S
2
G
5
Posts: 641
Reputation: 3,011

Post » Mon Jul 21, 2008 8:52 pm

[quote="David":2gntroyu]Nice example! :D I love the animation. Construct really needs a 'is standing on ground' condition in the platform movement hey...or perhaps even some generally collision functions so instead of just 'is overlapping' we could have 'is touching above / below / left / right '.[/quote:2gntroyu]
That's exactly what I meant in this thread viewtopic.php?f=3&t=1265. I guess it will be overlooked for now though. I'll just workaround this with some basic custom movement.
B
2
S
2
G
4
Posts: 259
Reputation: 1,968

Post » Mon Jul 21, 2008 10:27 pm

It's easy to do with detectors and just a few events, but sure, it would be nice, but i don't think it's high priority.

[size=20:2j4zeo16] Nothing is high priority right now eccept fixing the bugs that corrupts your .caps[/size:2j4zeo16]
B
8
S
2
G
5
Posts: 744
Reputation: 3,288

Post » Tue Jul 22, 2008 11:23 pm

i agree about project killing bugs. I can't even start on anything until I'm sure it won't destroy my years worth of work. And I agree that it's easy with custom movement, but with behaviors, not so much. It's actually much more complicated then it needs to be for a Z-depth platformer.
B
2
S
2
G
4
Posts: 259
Reputation: 1,968

Previous

Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 0 guests