Alternative controls for 8-way animated character

Get help using Construct 2

Post » Thu Jun 27, 2013 9:02 pm



I made the Keyboard event into "Or" blocks and added WASD and IJKL controls, but when I tested it out, the player doesn't move.
B
11
S
4
G
3
Posts: 210
Reputation: 5,318

Post » Fri Jun 28, 2013 12:12 pm

Hey @nickkname
you need to do simulate constrol aswel.
like this
mrPeanut2013-06-28 12:12:59
B
9
S
3
G
3
Posts: 70
Reputation: 1,990

Post » Fri Jun 28, 2013 8:25 pm

[QUOTE=mrPeanut] Hey @nickkname
you need to do simulate constrol aswel.
like this
[/QUOTE]

I made a new event with simulated controls. My character goes to new animation frames - when I press W for Up, he becomes the WalkUp frame - but I can't move my character.

So I made the simulated controls a subevent under the keyboard controls, but my character could neither change frames or move.

B
11
S
4
G
3
Posts: 210
Reputation: 5,318

Post » Fri Jun 28, 2013 10:10 pm

Make sure the object's properties, the "Default Controls" is set to "NO"
B
21
S
8
G
6
Posts: 346
Reputation: 4,891

Post » Sat Jun 29, 2013 8:07 am

[QUOTE=Thndr] Make sure the object's properties, the "Default Controls" is set to "NO"[/QUOTE]

I set default controls to No. I tried the alternative controls again - new keyboard events instead of subevents. My character moves, but doesn't change animation frames.
B
11
S
4
G
3
Posts: 210
Reputation: 5,318

Post » Sat Jun 29, 2013 8:04 pm

//Example 1//

Key Down "Up" >
Simulate Up
Set Animation to "up"

//Example 2//

Key Down "Up" >
Simulate up
Set direction "up"

if direction="up">
Set animation "up"

-----

If that doesn't work then you have something wrong and need to post a CAPX for us to see what exactly is messing up
B
21
S
8
G
6
Posts: 346
Reputation: 4,891

Post » Sat Jun 29, 2013 9:30 pm

[QUOTE=Thndr] //Example 1//

Key Down "Up" >
Simulate Up
Set Animation to "up"

//Example 2//

Key Down "Up" >
Simulate up
Set direction "up"

if direction="up">
Set animation "up"

-----

If that doesn't work then you have something wrong and need to post a CAPX for us to see what exactly is messing up[/QUOTE]

That worked, thanks everyone :)

B
11
S
4
G
3
Posts: 210
Reputation: 5,318


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot] and 51 guests