How do I do make a custom control skill?

Get help using Construct 2

Post » Tue Apr 03, 2012 1:53 am

how do I make a custom control skills?

for example, I press quickly the up key twice then the ship dodges upwards.

:(
B
123
S
19
G
16
Posts: 487
Reputation: 21,498

Post » Tue Apr 03, 2012 2:02 am

The custom movement behavior, then create an on keypress event. Don't know if double-tap is available, but can def set a single key for that.
B
5
Posts: 17
Reputation: 460

Post » Tue Apr 03, 2012 2:12 am

silverback, actually I'm having trouble creating timers .. my head is a knot

I did so, it works but it is not perfect.

+ When you press the up key
- Add 50 to variable UpSkill

Every 0.5 seconds +
+ When the variable UpSkill> 0
- Sub 50 of the variable UpSkill

+ When UpSkill variable> = 90
SPbar +> = 30
- Set team player to scale 3
- 30 from sub SPbar
- Set to True PowerDodge

+ Every 0.5 seconds
+ Is True PowerDodge
- Set to scale a team player
- Set to False powerDodge
- Set to 0 UpSill
B
123
S
19
G
16
Posts: 487
Reputation: 21,498

Post » Tue Apr 03, 2012 2:28 am

not sure I understand but are you trying to make the ship do something if the same key is pressed quick enough?
if so create a variable called 'UpKey' or something then:

+UpKey = 0
+Up is pressed
-UpKey +1

+UpKey = 1
+Up is pressed
-Ship (do something)
-UpKey +1

+Upkey = 1
+System wait 1 seconds
-Set Upkey to 0

+UpKey = 2
-Set UpKey to 0

that should make it so that if the player doesn't press Up twice within 1 second, they won't be able to do the speed manuver

hope that helps
B
16
S
3
G
4
Posts: 40
Reputation: 3,877

Post » Tue Apr 03, 2012 2:43 am

woooaah!!

that's it :D

thank you so much man, you saved my live o//
B
123
S
19
G
16
Posts: 487
Reputation: 21,498

Post » Tue Apr 03, 2012 3:23 am

Whew! Glad somone not new showed up!
B
5
Posts: 17
Reputation: 460


Return to How do I....?

Who is online

Users browsing this forum: Artpunk, DemantDigitalArt, Magistross and 27 guests