A few issues on attack animation and enemy behaviour

Get help using Construct 2

Post » Wed Apr 09, 2014 5:13 am

Yeah I got to that same point when i was working with your project and i couldn't figure it out
I do not have any issues with it on the game I am working on but for some reason i can't get it to mirror right non yours lol
B
29
S
6
G
1
Posts: 93
Reputation: 3,020

Post » Wed Apr 09, 2014 6:48 am

ZeroBelow wrote:Yeah I got to that same point when i was working with your project and i couldn't figure it out
I do not have any issues with it on the game I am working on but for some reason i can't get it to mirror right non yours lol


@ZeroBelow Yeah. It's very weird right? I mean, if you have already set the collision box to the imagepoint and since it's already set to mirrored and non-mirrored when you push the left and right key. The collision box should position the same.

Is this a bug? Maybe the developers of Construct 2 can take a look at this?
B
11
S
2
Posts: 61
Reputation: 704

Post » Thu Apr 10, 2014 4:26 am

Bump for more pros to look at it :roll:
B
11
S
2
Posts: 61
Reputation: 704

Post » Thu Apr 10, 2014 7:07 am

Hi.

You do not need seperate imagepoints for mirrored or non mirrored.
It should work with just one imagepoint.

This is what i did. Keep in mind it looks a bit more complex than it should be, as its part of a combo attack.
Quick explanation of the steps.
1: If attack is pressed set the instance variable of the character.
2: If the variable is set, then only can it play the attack animation
3: If the attack animation is playing, then set the helper to the imagepoint of your character
4: If the animation is finished playing set the helper to position 0,0. (i also found if you destroy the helper its gone forever.) Then set animation to idle.

The bug you speak of of the imagepoint i think is related to the way you set up your events as i experience similar issues.
Try the above method using only 1 imagepoint. Only set the imagepoint while the animation is playing like i did.
Also make sure your sprite is scaled weird as this can cause issues when mirroring it.

Hope this helps
Image
B
8
S
2
Posts: 163
Reputation: 1,115

Post » Thu Apr 10, 2014 10:34 pm

HuaHero wrote:@Ldk Sorry i can't seem to solve this issue. Neither for the AI part. Been messing around the codes but seemed to be stuck.

Looks like it's easier to make a shooter game than a melee fighting game thou.


why are you using pathfiding instead of platform behaviour??
B
23
S
6
G
3
Posts: 316
Reputation: 3,461

Post » Fri Apr 11, 2014 9:00 am

@Ldk thanks for this, i will take a closer look when i'm free and post an update here again.

@Lunatrap it was suggested by another user here as i want the enemy to chase the player, the enemy has both platform and pathfinding behaviour in them. Do you have a better way to just use platform behaviour and have the enemy chase the player too?
B
11
S
2
Posts: 61
Reputation: 704

Post » Fri Apr 11, 2014 5:12 pm

HuaHero wrote:@Ldk thanks for this, i will take a closer look when i'm free and post an update here again.

@Lunatrap it was suggested by another user here as i want the enemy to chase the player, the enemy has both platform and pathfinding behaviour in them. Do you have a better way to just use platform behaviour and have the enemy chase the player too?


pathfinding is not neccesary, it will just take CPU power and it reacts very slowly...

here you go...very basic, i hope you can add more... like jump and more...
You do not have the required permissions to view the files attached to this post.
B
23
S
6
G
3
Posts: 316
Reputation: 3,461

Previous

Return to How do I....?

Who is online

Users browsing this forum: Baidu [Spider], brunopalermo, ratboy3, yolkgames and 32 guests