Shooting

Talk about making games.

Shooting

Postby SergeLo00001 » Mon Jul 03, 2006 11:33 pm

i made an actor shoot a gun and i got everything done and working except for that i can only clik on the guy to shoot the bullet. Could someone help me with this. I think you have to use filled wired region or something like that. Thanks ahead.
SergeLo00001
 
Posts: 46
Joined: Sun Jul 02, 2006 4:58 am
Score: 0 Give a positive score

Postby DilloDude » Tue Jul 04, 2006 10:24 am

You need to have another actor to receive the clicks. Either make an invisible actor that follows the mouse (like in the 1945 demo), use a background actor (abuse demo) or use a filled region that is parented to the view. Now thee are two things you can do: right click on the actor, say add activation event, mouse button down, and chose your player actor. The other thing is to add a mousebutton down event, script editor, and say
Code: Select all
SendActivationEvent("Player");
where Player is the name of your actor. On your player actor, add an event activation event, and put your script for shooting.
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Postby SergeLo00001 » Tue Jul 04, 2006 7:28 pm

ok, thanks. But what if i made an image in the size ofwhere i want the player to be allowed to shoot in(i called it shootingrange). So if i clik on it the player shoots and all, but what do i do to make it now appear in game mode, becaues when i make it have a parent of the player or the view it's z depth changes to same as its parent so it is always showing up. Is there anything i can do?
SergeLo00001
 
Posts: 46
Joined: Sun Jul 02, 2006 4:58 am
Score: 0 Give a positive score

Postby DilloDude » Wed Jul 05, 2006 12:18 am

On create actor, set
Code: Select all
VisibilityState("Event Actor", DONT_DRAW_ONLY;
or use the Visibility State action with don't draw, but allow events.
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