Posted By
|
Message
|
Petas
Registered 25/08/2002
Points 6
|
28th July, 2003 at 11:29:40 -
I'm kinda new at this. What I'm trying to do is make a platform-type game with multiple team members, and when you select one you can set their waypoints and they will go to the first one and after reaching that, proceed to the next one until they get to the most recent waypoint.
Even pointing me to an article or thread would be greatly appreciated.
Hippopotomonstrosesquippedaliophobia - Fear of long words
|
Kirby Smith Resident Slacker
Registered 18/05/2003
Points 479
|
28th July, 2003 at 12:19:35 -
I'm not entirely sure that this will work, or even exactly how to do it in MMF, but it's a theory anyway. Set it up so that the waypoints are numbered (in value A, for example) as they are set down, then set up the characters with values (again, A is a good one), so that they will go to the waypoint with the corresponding value. Add 1 to their value A when they get there so that they will then seek out the next waypoint. Then, for determining what the most recent waypoint is, put in something that checks when the character's value A is greater than the maximum waypoint value A, and stop the character's movement. You might need to have a counter or soemthing that keeps track of how many waypoints were set down.
XBL Gamertag: Rampant Mjolnir
|
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
|
29th July, 2003 at 02:39:39 -
There are a few ways to do this, one way would be to use the movement object but that can only handle one teammate. Here is an easy way to do it:
Add a counter call it "Waypoint number" (WN for short)
add a waypoint object "Waypoint"
Add an active object "Teamate" with bouncy ball movement.
add a Button called "Start"
you'll also need a free alt value in all of your team mates we'll use A for this example.
Start of frame - Teammate.movement stop.
User clicks with left mouse button - Create waypoint at 0,0, set wayp.x to mouse.x set wayp.y to mouse.y, set wayp.alt a to value of WN. WN ++
User clicks on start
+ waypoint.a = 0 - Set team mate at waypoint 0,0.
Always
+ waypoint.alt a = teammate.alt a - teamate.direction = waypoint.alt a x,y
Teammate collides with waypoint
+ waypoint.alt a = teammate.alt a - add one to teammate.alt a
There you go, that's off the top of my head but it should work. Any probs just post them.
-Andy
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy
|
|
|