Page 1 of 1

How to make an actor to shot

PostPosted: Thu Jan 03, 2008 2:22 pm
by BabaRoga
How to make platform actor to shot on enemies, smotheing like ni SuperMario ???

Re: How to make an actor to shot

PostPosted: Thu Jan 03, 2008 3:36 pm
by Bee-Ant
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

Re: How to make an actor to shot

PostPosted: Thu Jan 03, 2008 4:48 pm
by Kalladdolf
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

Re: How to make an actor to shot

PostPosted: Thu Jan 03, 2008 5:07 pm
by Bee-Ant
...

Re: How to make an actor to shot

PostPosted: Thu Jan 03, 2008 5:18 pm
by BabaRoga
thnx both of you :D

Re: How to make an actor to shot

PostPosted: Thu Jan 03, 2008 6:01 pm
by Bee-Ant
You're welcome... :D

Re: How to make an actor to shot

PostPosted: Thu Jan 03, 2008 7:21 pm
by Kalladdolf
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:

Re: How to make an actor to shot

PostPosted: Thu Jan 03, 2008 8:24 pm
by Bee-Ant
Wait...my post after you always deleted...what's wrong?

Re: How to make an actor to shot

PostPosted: Fri Jan 04, 2008 8:07 am
by Kalladdolf
dunno, maybe because someone thought this post may content offensive material and then reported it? :|

Re: How to make an actor to shot

PostPosted: Fri Jan 04, 2008 8:57 am
by Bee-Ant
a bot i think...or makslane...or the server memory