Pacman Trouble

Non-platform specific questions.

Pacman Trouble

Postby Legendz » Sat Oct 28, 2006 10:04 am

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 :( :(
A Living Legend
Legendz
 
Posts: 4
Joined: Sat Oct 28, 2006 7:31 am
Score: 0 Give a positive score

Postby Zehper48 » Mon Oct 30, 2006 11:15 pm

This should answer your first question
http://game-editor.com/forum/tp-2489-cr ... mouse.html
I like score
User avatar
Zehper48
 
Posts: 241
Joined: Sun Jun 11, 2006 1:34 am
Location: Advanced Noob
Score: 4 Give a positive score

Postby Legendz » Tue Oct 31, 2006 2:24 am

Thanks, for the bullets, but i still have the packman problem.
A Living Legend
Legendz
 
Posts: 4
Joined: Sat Oct 28, 2006 7:31 am
Score: 0 Give a positive score

Postby EvilDragon » Wed Nov 01, 2006 12:48 am

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 :)
Cheers,
EvilDragon.

http://www.gp2x.de
EvilDragon
 
Posts: 10
Joined: Sat Sep 23, 2006 11:10 am
Score: 0 Give a positive score

Postby DocRabbit » Tue Nov 07, 2006 1:42 am

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.
User avatar
DocRabbit
 
Posts: 114
Joined: Fri Oct 27, 2006 2:56 am
Score: 10 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest