How do I get my player to orient to player angle.

Get help using Construct 2

Post » Tue Feb 05, 2013 2:39 am

I designed a simple non-platform game where a plane orients toward a monster and when you use a touch screen and touch a monster the plane properly orients toward the monster (Touch.X and Touch.Y) however when you release off the touch pad, the plain goes back to a weird fixed angle rather than staying at the last angle oriented toward when touching the screen?

2nd issue, I have an original iPad and the sounds do not work. I have uploaded it properly and both .ogg and .mp4 files are on the apache2 webserver on a linux server however it works on the PC but sound does not work on the iPad.

Here is the link to the source. Please help! Thanks!

http://kevintown.net/KevinWars1.0.capxkevinmthomas2013-02-05 02:40:38
B
5
S
1
Posts: 16
Reputation: 790

Post » Tue Feb 05, 2013 3:03 am

When you stop touching, Touch.X and Touch.Y become 0. Would be better to make global variables and store Touch.X and Touch.Y when the touch object fires the on any touch start event.
B
26
S
8
G
3
Posts: 210
Reputation: 5,973

Post » Tue Feb 05, 2013 3:10 am

Thanks but I am so new at this not sure how to do it. Did you see my code I attached? If you can perhaps tell me specifically how to do it. I can create a global variable its just a matter of how to make it work with the player object im lost.

In addition, I don't get sound on my iPad. I have uploaded the ogg and mp4 files as well.kevinmthomas2013-02-05 03:11:26
B
5
S
1
Posts: 16
Reputation: 790

Post » Tue Feb 05, 2013 4:36 am

Like this:



As for the iPad sound issue...I actually don't have any iOS devices, so I haven't do any development there. I'm sure someone else can help more with that.
B
26
S
8
G
3
Posts: 210
Reputation: 5,973

Post » Tue Feb 05, 2013 10:21 am

Thanks so much theubie! It worked! Yes all I need now is to figure out why sound does not work on the iPad and im golden!

I assume for a platform-style game a similar convention would be taken?
What specifically would I put so that a player on a platform moves to where i click on a touchpad?kevinmthomas2013-02-05 21:23:14
B
5
S
1
Posts: 16
Reputation: 790


Return to How do I....?

Who is online

Users browsing this forum: Baidu [Spider], HugeCube, imnotspecial, tomi71, totoe and 19 guests