need help with multiple sprites

For questions about using Classic.

Post » Thu Feb 19, 2009 2:46 am

Ok, I would know how to do this in Flash , but construct is a new toy and I'll need your help at this.

I'm making this game , Samurai Madness. A scrolling action adventure , where there'll be ample bloodshed and swordplay. I'll upload a link soon to my progress so far, feel free to use the resources.
Just help me out in the control part .

My problem so far :

The hero has 5 states for jumps, 5-6 states for attacks , 7 states for dying and so forth.
Now if I use the standard " KeyisDown-KeyisnotDown" while on the ground method, as in the platform tutorials, the guy won't do anything other than his "idle" anims , if he's on the ground. Get it ?

Sorry for no screens or anything , I've been at it 16 hours or so.
B
2
G
3
Posts: 29
Reputation: 908

Post » Thu Feb 19, 2009 6:56 am

What do you mean by "states?"

Also, post your .cap so someone can have a look at what's going wrong.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Thu Feb 19, 2009 12:39 pm

Here's the link

[url:gv6n4tep]http://rapidshare.com/files/199954516/samurai_madness.rar.html[/url:gv6n4tep]

By "states" I meant frames. The problem is that I've told the char sprite to set the "idle" anim when neither left nor right is pressed. And also if both are pressed. So why must he do anything except "idle" at all ? I thought maybe enabling , disabling groups of control events while jumping , attacking might work.

I really want it to work out between me and construct. It's just so "neat " a program. I'm tempted to move to actionscript, but maybe you could help me out.

Thanks , dreadeye.
B
2
G
3
Posts: 29
Reputation: 908

Post » Thu Feb 19, 2009 1:26 pm

[quote:3vwkugwd]the guy won't do anything other than his "idle" anims , if he's on the ground. Get it ? [/quote:3vwkugwd]
I'm not quite sure if I get it... I tried your cap and the animations seem to work. He runs when you're moving, jumping animation plays while jumping... and idle when standing still.

Maybe you shouldn't check for key presses though for idle. Just check if both vectors are 0, then set animation to idle.
B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445

Post » Thu Feb 19, 2009 1:33 pm

Have you tried the Platform School tutorial? It covers a lot of topics like animations.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Thu Feb 19, 2009 2:21 pm

Pixel , How do I "check if both vectors are 0". If I woulda known that earlier !

Thanks.
B
2
G
3
Posts: 29
Reputation: 908

Post » Thu Feb 19, 2009 2:36 pm

Use System -> Compare. There you select the player sprite, go to the platform tab. Choose get X(Y) component of motion.

You could even do it with one condition I guess if you compare player[Platform].Speed.
B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445

Post » Thu Feb 19, 2009 4:01 pm

Something that may make this less of a problem also are tagged animations.

http://apps.sourceforge.net/mediawiki/c ... Animations
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Fri Feb 20, 2009 3:17 pm

Okay , solved that. Thanks guys. Here's an update (the file keeps gettin' bigger) .
[url:o7m206ks]http://rapidshare.com/files/200391147/Samurai_Madness.rar.html[/url:o7m206ks]

I know it may look all crude , but I'm counting on you guys to help me optimize it all a bit. The real bitch is the setting of the hotspots to sync up the footwork etc.

It's taking so much time , because I'm also concurrently working on the same project , in AS3 . It's like a comp study..
B
2
G
3
Posts: 29
Reputation: 908

Post » Fri Feb 20, 2009 3:20 pm

And Special Thanks to PixelRebirth ! I made it a point to save the entire wiki and read through it. :idea:
B
2
G
3
Posts: 29
Reputation: 908

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 6 guests