Simulate movement using Platformer Behaviour

For questions about using Classic.

Post » Mon Jun 11, 2012 10:27 pm

Heey guise!

When using the platformer behaviour, how would one make the Sprite with this behaviour walk left/right on it's own?
Want to make multiple enemies that share the platformer physics and just haven't been able to find a way to simulate left/right being pressed in the behaviour.

Thanks in advance!
B
45
S
19
G
10
Posts: 562
Reputation: 9,543

Post » Mon Jun 11, 2012 11:06 pm

wtf
B
10
S
6
G
3
Posts: 127
Reputation: 2,481

Post » Mon Jun 11, 2012 11:08 pm

really, what the
B
10
S
6
G
3
Posts: 127
Reputation: 2,481

Post » Mon Jun 11, 2012 11:29 pm

@Pecek
I think Jase00 is asking for platformer AI help as opposed to just "how can I make a player sprite move using the directional keys?" If that is the case then I understand from a Construct beginner programmer point of view. I cannot help as of yet as I have not tried my hand at moving AI's yet myself. Stationary turret AI's, yes; moving AI's, not yet especially on platformers, assuming it would be much more difficult than simply adjusting a sprite's angle and moving it towards player in a top-down game.
B
8
S
2
Posts: 40
Reputation: 2,136

Post » Mon Jun 11, 2012 11:58 pm

@Jase00
First you need to not move with the keyboard movement:
+ System: Start of layout
-> Sprite: Start ignoring user input

Second to make the sprite move on it's own you need to use the "set x component of motion" action of the platform behavior. Use positive values to move the enemy right, negative to move left.
B
79
S
24
G
54
Posts: 4,749
Reputation: 40,761

Post » Tue Jun 12, 2012 2:58 am

@Pecek
? D: I'm terrible at explaining, so I guess you misunderstood me. I know how AI works, platforming works, keyboard and controls and stuff works, BUT I was try to figure out how to make a behaviour with platform movement move on it's own (WITHOUT PLAYER INPUT). If I made a custom platformer movement, I wouldn't need to ask this question :P But I'm using platformer behaviour because it's collision detection is awesome (From what I'm experiencing :P)

@aznmonkeyboy
Sometimes it's pretty easy to make Platforming AI, but when it involves a lot of pathfinding, it can be really agrivating. >.< I suppose it's similar with top-down games in a way XD

@R0J0hound
Awesome, I'll try that out. Never touched that action, I'll fiddle with it :P Thank you!
B
45
S
19
G
10
Posts: 562
Reputation: 9,543


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests