Help please!

For questions about using Classic.

Post » Fri Feb 03, 2012 5:09 pm

Hi. So I'm fairly new to programming and there's some concepts I can't quite seem to grasp yet. My project is at a very early stage. Here are my questions:
1- When a bullet hits my enemy, it plays a "hurt" animation. Right now, the enemy only plays the "hurt" animation when he's walking or attacking. And when it does, the enemy doesn't go back to "standing still" unless the player comes out of his reach.
2- I would like my enemy spawn box to create an enemy instance every 5 seconds or so, and only when the box is not on screen.

Some tips (and support) would be super appreciated. Here's my file:
http://dl.dropbox.com/u/59324793/4x2.cap

Here's the controls:
left + right arrows
Up = jump
Z = shoot

Thanks
2 x 4
B
2
Posts: 6
Reputation: 262

Post » Fri Feb 03, 2012 5:53 pm

your cap is a little long, so I'm just going to do a little guesswork about what might be wrong, if you want to meet in chat, either i or someone else might be able to provide specific suggestions to try out.

1-when you switch to "hurt" animation, make sure to do "play animation" afterward. it sounds like "standing still" might be a 1 frame animation(?) that isn't playing, and so animation is stopped.   Also you should have an event that when the animation is done playing to set the animation back to standing still.

2-
[INVERTED]EnemySpawnBox - Is On Screen
----System - Every 5 Seconds -
-----------EnemySpawnBox - Spawn Object - Enemy

Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Sat Feb 04, 2012 3:59 pm

Thanks Lucid!
Well...I thought that by "setting" the animation, I did not need to have it played after. And I thought that no matter how many frames the "animation" has, it was gonna loop as long as the loop box is checked, and play for as long as I want it... in that case, for as long as the "hurt" timer goes.
And for the spawn box, it's kinda funny. only a few enemies are spawning that are not able to move with the "walk" animation. they're just kind of hovering towards the player....
oh so many questions!
B
2
Posts: 6
Reputation: 262

Post » Sat Feb 04, 2012 4:02 pm

so did telling it to play the animation work?

also, make sure you're telling it to play the animation only once, if you do it in an event like 'always' that triggers every tick, your player will be stuck restarting and playing only the first frame over and over

edit: also, on a side note, try to name your topics more meaningfully. most people in the help forum need help :). if you specify the problem, like "animation stuck on first frame" or "several animation problems", people browsing the forum might recognize a problem they've solved before, and be more likely to click on your topic and respondlucid2012-02-04 16:05:01
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest