Page 1 of 1

Mouse follow

PostPosted: Mon Feb 13, 2006 8:33 pm
by Griffin Endurance
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?

PostPosted: Tue Feb 14, 2006 12:56 am
by makslane
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

PostPosted: Mon Feb 20, 2006 7:09 am
by Griffin Endurance
Thanks that worked.

PostPosted: Wed Feb 22, 2006 6:44 am
by Griffin Endurance
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

PostPosted: Wed Feb 22, 2006 10:26 am
by Troodon
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

PostPosted: Wed Feb 22, 2006 8:21 pm
by Griffin Endurance
Thanks im quite new to this so im not sure how i would make a variable. Could you give me an example?

PostPosted: Thu Feb 23, 2006 7:54 am
by Troodon
You can make variable whereever when you are in script editor window.
There is information in
http://game-editor.com/docs -> script