Page 1 of 1

Pacman Trouble

PostPosted: Sat Oct 28, 2006 10:04 am
by Legendz
How do i shoot only one bullet at a time, they all follow the mouse how to make them go strait in the direction of the mouse but not follow it?

Also im making a Pacman kind of game. as you have seen in the real Pacman when you pick up all the items you automatically progress to the next level how do i do that in my game??


I NEED HELP :( :(

PostPosted: Mon Oct 30, 2006 11:15 pm
by Zehper48
This should answer your first question
http://game-editor.com/forum/tp-2489-cr ... mouse.html

PostPosted: Tue Oct 31, 2006 2:24 am
by Legendz
Thanks, for the bullets, but i still have the packman problem.

PostPosted: Wed Nov 01, 2006 12:48 am
by EvilDragon
Well, one way would be to add a counter that has the amount of items stored at the beginning of the level.
Then decrease it with every item taken and as soon as it reaches 0, the level is finished :)

PostPosted: Tue Nov 07, 2006 1:42 am
by DocRabbit
Code: Select all
if (ActorCount("pill")<1){ExitGame();}


place this in a draw event, I used view to test it.

On the last Actor destroyed, (assuming you are using clones for the pills), this will trigger the if statement to fire.
I used ExitGame in the example, but a call to your level switching code would fire also.

Code: Select all
if (ActorCount("pill")<1 && ActorCount("PowerNodes")<1){ExitGame();}


This code would work if you had 2 different entities, the small dots and the big power dots.

To test this code, do the following:

1. Create an actor named pill.
2. Create another actor named bigpill.
3. Make a few clone copies of each.
4. Go to the view actor, add a Draw Actor event, select Script Editor for the action, and paste the code above in it.
5. Select pill, add a mouse down event and select Destroy Actor for the action. For Actor Choice leave it Event Actor.
6. Do step 5 for bigpill also.
7. Now run Game Mode, and click on each actor, when the last one is gone, the game exits.