How to move another actor when clicking on another

Game Editor comments and discussion.

How to move another actor when clicking on another

Postby Clokio » Sun Jun 19, 2011 10:11 pm

Making a simple iphone game. What script should I use to move the player?

I created a actor (button) and a script to it.

Code: Select all
Player x+=10;


Get a error: miss ; :?:
Clokio
 
Posts: 229
Joined: Tue May 17, 2011 2:18 pm
Score: 32 Give a positive score

Re: How to move another actor when clicking on another

Postby schnellboot » Sun Jun 19, 2011 10:18 pm

Player.x <-
schnellboot
 
Posts: 819
Joined: Sat Mar 31, 2007 1:35 pm
Location: Germany
Score: 102 Give a positive score

Re: How to move another actor when clicking on another

Postby Clokio » Sun Jun 19, 2011 11:32 pm

Thanks ok Player.x the x of the player.
Is there a way to simulate the finger presseing the icon for a couple of secs, and the player will move as long as I press the player go forward.

Something like the repeat of the keydown.

------------------
Also rotate I try this. Dose not work.
Player.angle +=180;

Thanks
Clokio
 
Posts: 229
Joined: Tue May 17, 2011 2:18 pm
Score: 32 Give a positive score

Re: How to move another actor when clicking on another

Postby lcl » Mon Jun 20, 2011 12:55 am

Clokio wrote:Also rotate I try this. Dose not work.
Player.angle +=180;

Angle is not the animations angle, so it won't rotate your actor. Angle is direction to move with directional_velocity. There is not built in function for rotating in current version of GE.
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

Re: How to move another actor when clicking on another

Postby Clokio » Mon Jun 20, 2011 12:58 am

Thanks

Is there a way to simulate the finger presseing (mouse down) the icon for a couple of secs, and the player will move as long as I press the player go forward.

:mrgreen:
Clokio
 
Posts: 229
Joined: Tue May 17, 2011 2:18 pm
Score: 32 Give a positive score

Re: How to move another actor when clicking on another

Postby again » Mon Jun 20, 2011 5:08 am

Hey clovio sorry I havent been around much . I made a tutorial a while back step by step how to make a simple iphone game under the name krenisis. Here

viewtopic.php?f=4&t=8450&p=58594

If there is anything you dont understand just PM me or post it here.
Free windows mobile games like doodle jump and super mario bros
http://krenisis.freeforums.org/
again
 
Posts: 258
Joined: Wed Jan 19, 2011 7:06 pm
Score: 33 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron