Aller au contenu

Photo

How do we get roaming to work?... SOLVED


1 réponse à ce sujet

#1
FalloutBoy

FalloutBoy
  • Members
  • 580 messages
Okay it seems that ROAM_DISTANCE doesn't do what creature_core thinks it does:

            float fRoamDistance = GetLocalFloat(OBJECT_SELF,"ROAM_DISTANCE");
            if ( fRoamDistance > 25.0f )
            {
                location lRoamLocation = Location(GetArea(OBJECT_SELF),GetPosition(OBJECT_SELF),0.0f);

                SetRoamLocation(OBJECT_SELF,lRoamLocation);
                SetRoamRadius(OBJECT_SELF,fRoamDistance);
            }


That is from creature_core. I can confirm that the functions are being called, but the creature just stands there doing idle animations. Am I missing something? How are we suppose to make something wander around randomly?

I see there is a system in sys_ambient_h where we can get a creature to walk a waypoint path, but I just want my mobs to wander randomly when they are spawned.

Modifié par FalloutBoy, 15 décembre 2009 - 07:18 .


#2
BryanDerksen

BryanDerksen
  • BioWare Employees
  • 273 messages
You can help the search function along in specific cases like this by creating redirect pages from obvious search terms to the places where the relevant information is actually hidden. Or perhaps in a case like this where there might be multiple different things you want to accomplish (an ambiently meandering background creature vs. a monster that won't chase you too far from the spot its guarding for example) you might throw together a quick page with links to the different things an editor might want to do.



As a side note, I think I was responsible for causing those roam distance functions to be added relatively late in development. I filed a fun bug where I would go fight the bandits in Lothering and then lead them back into the town where they caused no end of trouble for the dialogues and triggers there. :)