how do you shoot people

Game Editor comments and discussion.

Re: how do you shoot people

Postby Bee-Ant » Wed Jul 16, 2008 9:09 am

I know what he meant.
Make a string actor variable called "right"
1. Player :
Keydown>Left>
Code: Select all
right=0;
x-=3;
ChangeAnimation("Event Actor", "PlayerWalkLeft",FORWARD);

Keydown>Right>
Code: Select all
right=1;
x+=3;
ChangeAnimation("Event Actor", "PlayerWalkRight",FORWARD);

Keyup>Left
Code: Select all
ChangeAnimation("Event Actor", "PlayerStopLeft",FORWARD);

Keyup>Right
Code: Select all
ChangeAnimation("Event Actor", "PlayerStopRight",FORWARD);

Keydown>Shoot
Code: Select all
if(right==0)
{
   ChangeAnimation("Event Actor","PlayerShootLeft",FORWARD);
}
if(right==1)
{
    ChangeAnimation("Event Actor","PlayerShootRight",FORWARD);
}
//CreateActor>Ammo

2. Ammo
CreateActor>
Code: Select all
if(Player.right==0)
{
   angle=180;
}
if(player.right==1)
{
    angle=0;
}
directional_velocity=15;

:D
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Previous

Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron