How do i do this? lol

Talk about making games.

How do i do this? lol

Postby The achievement » Wed Apr 05, 2006 9:34 pm

Is there a way i can click and i can make my guy shoot?

and can i move the actor around when i move with the mouse?
User avatar
The achievement
 
Posts: 220
Joined: Sun Feb 12, 2006 11:01 pm
Location: United States,Massachusetts
Score: 0 Give a positive score

Postby DilloDude » Thu Apr 06, 2006 12:09 am

To move an actor with the mouse, you can use follow mouse on create actor. Add a mouse button down on a following actor (if your cursor actor has lots of clear bits it may be best to have a filled-region parented to it and use the region to catch clicks) and send activation event to the actor you want to shoot. You can right click and add an activation event but I prefer the function because you can send it to all clones. In the actor that recieves the event, add activation event->filled-region->create actor->shot. If you want to use different mouse buttons, before you send the activation event, set a variable (ie. 0 for leftclick, 1 for rightclick, 2 for middle) and have the recieving actor say
Code: Select all
if(mouseSignal==0)
{
    //code for left button;
}
else if(mouseSignal==1)
...
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest