How to make an actor to shot

Non-platform specific questions.

How to make an actor to shot

Postby BabaRoga » Thu Jan 03, 2008 2:22 pm

How to make platform actor to shot on enemies, smotheing like ni SuperMario ???
BabaRoga
 
Posts: 19
Joined: Thu Nov 30, 2006 7:14 pm
Location: Presheva , Serbia
Score: 1 Give a positive score

Re: How to make an actor to shot

Postby Bee-Ant » Thu Jan 03, 2008 3:36 pm

Make a fire actor called "Shot", also a variable called "right"

Player>KeyDown>Left>ScriptEditor>
Code: Select all
right=0;
x-=3;

Player>KeyDown>Right>ScriptEditor>
Code: Select all
right=1;
x+=3;

Player>KeyDown>Shoot*>ScriptEditor>
Code: Select all
if(right==1)
{
    CreateActor("Shot","ShotAnimation",("none"),("none"),5,0,false);
}
if(right==0)
{
    CreateActor("Shot","ShotAnimation",("none"),("none"),-5,0,false);
}

Shot>CreateActor>ScriptEditor>
Code: Select all
if(right==1)
{
    xvelocity+=3;
}
if(right==0)
{
    xvelocity-=3;
}


Hope help... :D



*Shoot means whatever key you'll make it as shoot key
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

Re: How to make an actor to shot

Postby Kalladdolf » Thu Jan 03, 2008 4:48 pm

quick little example:

press left and right keys to move,
press up key to jump,
press space to shoot.

shoot.zip
(19.38 KiB) Downloaded 109 times
User avatar
Kalladdolf
 
Posts: 2427
Joined: Sat Sep 08, 2007 8:22 am
Location: Germany
Score: 120 Give a positive score

Re: How to make an actor to shot

Postby Bee-Ant » Thu Jan 03, 2008 5:07 pm

...
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

Re: How to make an actor to shot

Postby BabaRoga » Thu Jan 03, 2008 5:18 pm

thnx both of you :D
BabaRoga
 
Posts: 19
Joined: Thu Nov 30, 2006 7:14 pm
Location: Presheva , Serbia
Score: 1 Give a positive score

Re: How to make an actor to shot

Postby Bee-Ant » Thu Jan 03, 2008 6:01 pm

You're welcome... :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

Re: How to make an actor to shot

Postby Kalladdolf » Thu Jan 03, 2008 7:21 pm

no problem at all =D

PS: sorry, bee-ant, I didn't read your post before posting this demo, I was the first one to read this, started to reply and then left the computer...
I came back half and hour later and then posted the turtorial :roll:
User avatar
Kalladdolf
 
Posts: 2427
Joined: Sat Sep 08, 2007 8:22 am
Location: Germany
Score: 120 Give a positive score

Re: How to make an actor to shot

Postby Bee-Ant » Thu Jan 03, 2008 8:24 pm

Wait...my post after you always deleted...what's wrong?
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

Re: How to make an actor to shot

Postby Kalladdolf » Fri Jan 04, 2008 8:07 am

dunno, maybe because someone thought this post may content offensive material and then reported it? :|
User avatar
Kalladdolf
 
Posts: 2427
Joined: Sat Sep 08, 2007 8:22 am
Location: Germany
Score: 120 Give a positive score

Re: How to make an actor to shot

Postby Bee-Ant » Fri Jan 04, 2008 8:57 am

a bot i think...or makslane...or the server memory
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


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron