|
Post by Kriven on Apr 4, 2007 14:30:50 GMT -5
Basically this thread is for help with the program game maker. As such I will start the first "HELP ME!!!!!"
I can't seem to program my Pac-Man ghosts correctly.
I want him to randomly move left or right at his creation, I also want him to have a 50% chance of climbing the ladders when he is below them, and 50% of climbing down when he is above them.
Any ideas on how I can do this?
|
|
|
Post by Shrikeswind on Apr 4, 2007 14:58:29 GMT -5
Set a path, first off. Blinky and Co. follow paths in Pacman, but if Pacman's nearby, they hunt him down, then return to their paths when it's impossible to nail him. So, what you do is set your path and...
Blinky Create Follow Path 1. If Pacman is at relative position (x,y), change object to "Blinky Chase."
Blinky Chase is a new object that follows Pacman until Pacman is out of range. When Pacman is out of range, you'll want him to return to regular Blinky.
My own question: I want a game like SMB2. You know how that game works, you select a character at the beginning of the level or after each death. Well, I wanna do that, but my problem is that in order to do it, I need a way to select the characters from a roster in a previous room. How do I do that?
|
|
|
Post by Kriven on Apr 4, 2007 16:06:34 GMT -5
ROSTER! I've been working on this solution, and haven't gotten an oppurtune chance to test it but my theory is:
Create an invisable object labelled: Player One
Then set variables: Toad, Peach, Luigi, Mario. When one of these characters is chosen activate the variable for the corresponding character to One. Then, for example, if variable Toad is = one, change Player One's sprites to Toad sprites. Adjust other controls by use of the if Toad = One as well, this can create speed, strength, jump, etc.
|
|
|
Post by Shrikeswind on Apr 4, 2007 16:52:33 GMT -5
Variable to what?
|
|
|
Post by Kriven on Apr 4, 2007 17:11:38 GMT -5
Variables:
Toad Peach Luigi Mario
So if the player wants to be Toad, then set the Toad variable to one.
|
|
|
Post by Shrikeswind on Apr 4, 2007 17:39:01 GMT -5
That's not what I meant. I mean, what variable is required, like...
If I'm playing as Toad, I'm playing as Object 1 (Toad.) What variable determines that I'm not playing as Object 2 (Mario?)
|
|
|
Post by Kriven on Apr 4, 2007 18:45:12 GMT -5
Misunderstood.
Variable Toad tells Object One which sprite to display. If Variable Mario were active, it would still be Object One but the variable would tell it to display a Mario sprite instead of a Toad one. There's a code that you can put in Obj_One which will make it stay in position throughout the game, and if I'm correct, will tell it to keep it's current coding the same unless told otherwise.
global.Item[4,2]=1
I haven't tested it yet, so I'm not sure what the actual affects are...
|
|