Mouse follow

Talk about making games.

Mouse follow

Postby Griffin Endurance » Mon Feb 13, 2006 8:33 pm

Hey

A simple question I would guess. I would like a button on the screen that when I click it, it creates an actor that then follows the mouse. Then I would like it so when you click on the screen the actor is left in that possition. I would also like it so you can "create" multiple of these. How would i go about doing this?
Griffin Endurance
 
Posts: 10
Joined: Mon Dec 19, 2005 8:20 pm
Score: 0 Give a positive score

Postby makslane » Tue Feb 14, 2006 12:56 am

1) Create a actor to follow the mouse
2) In the Create Actor event, add the Follow Mouse action
3) Now, create an actor that will create the follow actor (followCreator)
4) In the Mouse Button Down event of followCreator actor, add the action Create Actor and select the follow actor
Game Editor is an open source game creator software that's wants to pay it's developers to keep evolving.
If you like Game Editor, make a review!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby Griffin Endurance » Mon Feb 20, 2006 7:09 am

Thanks that worked.
Griffin Endurance
 
Posts: 10
Joined: Mon Dec 19, 2005 8:20 pm
Score: 0 Give a positive score

Postby Griffin Endurance » Wed Feb 22, 2006 6:44 am

now i would like it so that when you click on the button it takes say 10 points from a counter "top right of screen" and then when the counter is empty you cant create the actor anymore
Griffin Endurance
 
Posts: 10
Joined: Mon Dec 19, 2005 8:20 pm
Score: 0 Give a positive score

Postby Troodon » Wed Feb 22, 2006 10:26 am

You can do it in 2 ways:
actor count
You can make variable wich reads actor count from the points in the upscreen. (If there is 10 points, actor count is 10 and variable is 10. When there is 3 points, actor count is 3 and the variable is 3. When the variable is <= 0, disable the event wich makes points.
variable
Make just variable wich is 10 in create actor. When you click the variable is variable - 1; then make that when the variable is 0 or under, you can't click. (make points)
I hope this helped
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby Griffin Endurance » Wed Feb 22, 2006 8:21 pm

Thanks im quite new to this so im not sure how i would make a variable. Could you give me an example?
Griffin Endurance
 
Posts: 10
Joined: Mon Dec 19, 2005 8:20 pm
Score: 0 Give a positive score

Postby Troodon » Thu Feb 23, 2006 7:54 am

You can make variable whereever when you are in script editor window.
There is information in
http://game-editor.com/docs -> script
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest