Community

AGI Programming => Mega Tokyo AGI Archive => Topic started by: Ron on October 20, 2004, 04:23:37 PM

Title: follow.ego problem
Post by: Ron on October 20, 2004, 04:23:37 PM
Hi there,
I got problem with the follow ego...
The object follow ego but it aint catch it..
the flag isnt set in the end...
Here is the logic file..
please help!
thanks.
Title: Re:follow.ego problem
Post by: robingravel on October 20, 2004, 04:49:36 PM
Add ignore.objs(o1) in your code.

or use distance command unstead like this one:


distance(o0,o1,v102);
if (v102 < 10 &&
    !isset(f0)) {
 (add stuff here)
}

The second suggestion is better because the object is not need to be really closer and pass through the player sometime.


Robin Gravel
Title: Re:follow.ego problem
Post by: Ron on October 21, 2004, 12:44:18 PM
Thanks alot man !
Title: Re:follow.ego problem
Post by: I Lostalim on October 23, 2004, 07:37:24 AM
Yeah - it's a bit strange that the two objects have to actually overlap for the flag to trigger, not just be touching each other's base lines... The second method [ if (distance(....)) ] is the better method and one I recently started using.

Until then I never tried having an object catch the ego, I'd only used follow.ego(); for having a companion (such as in SQ when Roger buys that droid, and it follows him to the ship) - so I didn't even notice the flag wasn't setting.