Page 1 of 1

Shooting

PostPosted: Mon Jul 03, 2006 11:33 pm
by SergeLo00001
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.

PostPosted: Tue Jul 04, 2006 10:24 am
by DilloDude
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.

PostPosted: Tue Jul 04, 2006 7:28 pm
by SergeLo00001
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?

PostPosted: Wed Jul 05, 2006 12:18 am
by DilloDude
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.