How do I get an active object to follow a line or path without using the built in path movement. The speed can remain constant but I would need reverse. The line it runs on would only have 90 degree angles when changing direction.
At the simplest level, you could create invisible blocks which would change the direction of the object following the path. For example:
Create "dirChangeBlock" at (40,30)
+ Set direction to 8 [or 0,16 or 24]
"Object" collides with "dirChangeBlock"
>> Set direction of "Object" to current direction of "dirChangeBlock"
Do you need this to work for a constantly changing, dynamic path around other obstacles? In that case, check out the link Joe posted. Could you give us some more context?
Nim... I looked at Code Monkeys link but couldn't get it to load as it had an extension MMF didn't recognize.
If you think of a fuse which burns at a constant rate or better still a ghost train that follows a track. I would need limited control over it though... maybe stop or reverse.
Well, I think this may be what you're looking for. Below are two screenshots from a game I was working on back in Easter. Basically the bunny follows the path through the garden and the player rotates easter eggs around it to avoid them colliding with water/trees/etc. Excuse the cheesy theme - it was for an Easter competition!
Normal game
Game with hidden blocks shown - start, finish and direction changes.
Sorry it's not a step-by-step solution but I hope this helps. Half the fun of making games is working things out by yourself, anyway (IMO)
... hey that's neat... did you ever finish the game? I was thinking along the same lines... if active object is traveling North and is equal to the x,y coordinates of 'direction block1'... then change direction of active object to west (or whatever)... thanks for your assistance.
I didn't finish the game, it was basically a failed prototype.. but I got pretty far before realising that it just didn't work as a game idea. I'd still like to use the level editor for something else. Good luck with your own game!