Posted By
|
Message
|
Matt Alexander
Registered 11/09/2006
Points 27
|
11th September, 2006 at 11:20:16 -
Hey everybody, been working on a game that calls for enemies to have "hunger" and my problem? Well I can't figure out how to get the Object once it fulfills the required conditons (I've set a range of values on an Alterable value that decreases over time) to go after objects within it's limits. Is their a way to make an object detect an object by distance of pixels? I can't figure this one out, MMF1.5 doesn't seem to be able to differentiate individual objects when there is more then one of the same kind on the screen and it ignores or gets confused with every other event set I've tried.
n/a
|
axel Crazy?
Registered 05/02/2005
Points 4766
|
11th September, 2006 at 11:39:42 -
Use Angle Calculator, or
Sqr(((x1 - x2) Pow(2)) + ((y1 - y2) Pow(2)))
Or something like that. You know, pythagoras; a² + b² = c².
n/a
|
Duncan Thelonious Dunc
Registered 18/05/2002
Points 552
|
11th September, 2006 at 11:59:40 -
Spread values, use a loop to check conditions on objects individually. You should be able to find an article on this pretty easily
n/a
|
Matt Alexander
Registered 11/09/2006
Points 27
|
13th September, 2006 at 18:59:49 -
I can't get it work, what I have gotten to work is rather crude and uninspiring with the AI being quite "dumb" if you will. Nothing but roadblocks in the development of this game x.X I can't debug it cause I can't figure out whats not working because most of it looks solid. If it's not the AI it's the enemy spawning I have set up, either it spawns one or two or doesn't spawn at all :/ Anymore help would be appreciated since I've gotten alot of progress on this game.
n/a
|
|
|