HELP PLEASE!! I can't figure it out!

Game Editor comments and discussion.

HELP PLEASE!! I can't figure it out!

Postby A » Fri Jul 23, 2004 7:13 pm

:? :? Well you see, I want my actor to shoot in the direction he is facing.

If i assign the actor to shoot how to i tell it to shoot in the direction he is facing. (The view is from the top so how the actor can face north, south east or west).

How can i make his shoot without assigning a different shoot button for every direction?? :? :?
A
 
Posts: 1
Joined: Fri Jul 23, 2004 7:05 pm
Score: 0 Give a positive score

Postby ingsan » Sat Jul 24, 2004 11:14 am

Hi A :) Welcome to the ForuM !!!

You could create 4 variables ( shootNorth, shootSouth, shootEast, shootWest ) to each direction.

For keyDown[UP] use variable shootNorth. When this variable = 1, shooting goes upwards.
For keyDown[DOWN] use variable shootSouth. When this variable = 1, shooting goes downwards.
For keyDown[LEFT] use variable shootWest. When this variable = 1, shooting goes Left.
For keyDown[RIGHT] use variable shootEast. When this variable = 1, shooting goes Right.

Maybe there is another solution :?
User avatar
ingsan
 
Posts: 580
Joined: Mon Nov 17, 2003 4:02 pm
Location: Maurician LADY in FRANCE
Score: 6 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron