I have a tiny problem with the rubber banding system (that's what makes a creature return to it's home location after it has been pulled away by combat, for example).
I'm spawning creatures and trying to set their home location, somewhat like that:
object oCreature = CreateObject(OBJECT_TYPE_CREATURE, );
SetTeamId(oCreature, nTeam);
AddCommand(oCreature, CommandMoveToLocation(), true);
Rubber_SetHome(oCreature, GetObjectByTag("home_beacon"));
All of this happens in the area script in a heartbeat event.
The problem now seems to be that the creature gets spawned after all of this above is run, and in creature_core in the EVENT_TYPE_SPAWN handler the rubber home location gets reset by Rubber_SetHome(OBJECT_SELF);
Now - how do I elegantly set the rubber home location for my little beasties? Is there some event I can catch (preferrably in the area script) that fires after the creature was spawned?
Right now I'm looping over all the creatures in my teams and setting the home location every few seconds, but that's not very nice.
Ciao, muh!
Modifié par thebigMuh, 13 janvier 2010 - 11:22 .





Retour en haut






