Tutorial make your actor shoot and the enemy shoot

Learn how to make certain types of games and use gameEditor.

Tutorial make your actor shoot and the enemy shoot

Postby krenisis » Sat Jul 10, 2010 11:33 pm

Ok to make your actor shoot 1st we need 2 actors
your player
bullet

Now we going to make the bullet go up the screen.
Ok click on the bullet/ click add/click draw actor/click add action/ click script editor/put this code/

yvelocity=-10;

click add immediate action action


Ok now click on your player//click add // click button down// hit spacebar and (disable repeat ) //click add action // click create actor//

On the small window for create actor choose your bullet actor then click add immediate action.
Thas it we are done with your actor now you can shoot bullets when you press space key.


Now for your enemy we need 2 actors
enemy
enemy bullet

Ok 1st click the enemy bullet actor
Click on add// click on draw actor // click on script editor //
yvelocity=+10;

that make the enemy shoot down at you!!!!

Ok now click on the enemy
click on add // click on create actor // click on create timer
a small windows pops up after you give it a name on the line below it type 250 . Now the go down to the line below that and erase the * symbol type 500. Now click on and go out of that.

Now for the last part click on the enemy again
click on add // click on timer // choose the timer you just made //
now add action // create actor // choose the enemy bullet and click ok

Now run you game and the enemies will be firing at you!!! enjoy

any question please ask and someone will assist you.
Tutorial Database for all beginners click this link
viewtopic.php?f=4&t=8680
krenisis
 
Posts: 607
Joined: Sat Jul 25, 2009 3:27 pm
Score: 50 Give a positive score

Re: Tutorial make your actor shoot and the enemy shoot

Postby felix7991 » Thu Jul 22, 2010 3:20 am

Hello,

Thanx for the tutorial!

I was wondering if you know how to make the bullets to target your main actor?I've looked at some other peoples projects (GEForever), but am having trouble deciphering their methods and also being inexperienced with GE. Any pointers on how to implement an aimed bullet?

Cheers,
Felix
felix7991
 
Posts: 2
Joined: Thu Jul 22, 2010 3:15 am
Score: 0 Give a positive score

Re: Tutorial make your actor shoot and the enemy shoot

Postby jimmynewguy » Thu Jul 22, 2010 3:30 am

bullet->create actor->script editor
Code: Select all
angle=direction(x,y,player.x,player.y);//change player to the name of your main actor
directional_velocity=5;//5 is the speed of the bullet
Working on a probably too ambitious project! Wild-west-adventure-RPG-shooter-thing.
User avatar
jimmynewguy
 
Posts: 1138
Joined: Sat Mar 31, 2007 6:27 pm
Score: 88 Give a positive score

Re: Tutorial make your actor shoot and the enemy shoot

Postby felix7991 » Fri Jul 23, 2010 11:37 pm

Works great! Thanks for the help!
felix7991
 
Posts: 2
Joined: Thu Jul 22, 2010 3:15 am
Score: 0 Give a positive score

Re: Tutorial make your actor shoot and the enemy shoot

Postby krenisis » Sat Jul 24, 2010 3:57 pm

Thanks jimmy I was alseep whent this question was asked. Iam glad it helped you felix , welcome to the game editor. Make sure to check out all my tutorials, they help you get a solid foot on the ground.
Tutorial Database for all beginners click this link
viewtopic.php?f=4&t=8680
krenisis
 
Posts: 607
Joined: Sat Jul 25, 2009 3:27 pm
Score: 50 Give a positive score

Re: Tutorial make your actor shoot and the enemy shoot

Postby zxcvbnm » Fri Sep 03, 2010 5:23 am

Any more questions
Check out Momo AlienStarcatcher , featured in apples new and noteworthy and has 5 star reviews!!!
http://itunes.apple.com/us/app/momo-ali ... 61779?mt=8
zxcvbnm
 
Posts: 254
Joined: Sun Aug 22, 2010 7:57 pm
Score: 10 Give a positive score


Return to Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest