How do I set sprite position relative to mouse co-ordinates.

Get help using Construct 2

Post » Mon Sep 15, 2014 8:08 pm

For example:

I have a ninja, he's throwing stars at baddies. Baddies begin to overwhelm the little ninja and he uses his special power to teleport to the relative position of the mouse pointer, successfully avoiding danger and allowing him to continue his pillaging of the baddies.

If possible how would I accomplish this with a key-press? So I press the space bar and the ninja teleports to the mouse coordinates?

Thanks and sorry if it's a dumb question.
B
2
Posts: 2
Reputation: 154

Post » Mon Sep 15, 2014 8:35 pm

hi

first u need to create a keyboard and a mouse object.

then in the event sheet u create the event: keboard on space pressed -> ninja set postion to (mouse.x,mouse.y)

hope that helps :)
B
6
S
2
G
1
Posts: 7
Reputation: 1,007

Post » Mon Sep 15, 2014 8:46 pm

Thanks, I'll try it!
B
2
Posts: 2
Reputation: 154


Return to How do I....?

Who is online

Users browsing this forum: Malhog, plinkie, R0J0hound, RobertMKD, Syazanie Amirin and 8 guests