Action->Goto [message #375264] |
Sat, 07 March 2009 06:03 |
|
zunnie
Messages: 2959 Registered: September 2003 Location: Netherlands
Karma: 0
|
General (2 Stars) |
|
|
if (Commands->Find_Object(FollowID))//w00t we found our hero to the rescue
{
GameObject *GotoObject = Commands->Find_Object(FollowID);
ActionParamsStruct params;
params.Set_Basic(this,100,100);
params.Set_Goto_Following(GotoObject,1.0f,1.5f,true);//void Set_Goto_Following(GameObject *Target,float speed,float arrivedistance,bool following);
Commands->Action_Goto(obj,params);
Following = true;
Commands->Start_Timer(obj,this,1.0f,789);//our hero is alive so we continue following
Commands->Give_Money(Pokerguy,1.0f,0);
}
Im using the above code to get a hostage bot follow players around but the script 'breaks' on doors.
The hostage won't follow players when they pass a door for example.
Is there any way this can be fixed?
|
|
|
|
|
Re: Action->Goto [message #375267 is a reply to message #375264] |
Sat, 07 March 2009 06:35 |
DL60
Messages: 283 Registered: May 2006
Karma: 0
|
Recruit |
|
|
Because there are no pathfind sectors at some doors on some maps. It's like a wall for AI.
Lon time ago I tried to place some pathfind generators at these doors and to recalculate the pathfind sectors again but it doesn't work. LE didn't place pathfind sectors there.
|
|
|
Re: Action->Goto [message #375268 is a reply to message #375264] |
Sat, 07 March 2009 07:06 |
|
danpaul88
Messages: 5795 Registered: June 2004 Location: England
Karma: 0
|
General (5 Stars) |
|
|
There's a setting in LE for tiles that tells it whether it should be considered collidable during pathfind generation, and I guess some of the doors are set to collidable (and hence get no pathfinding) while others are set to non-collidable (and therefore do get pathfinding).
Since the doors would open anyway for the AI it would make sense to set them to non-collidable for pathfinding, but I guess Westwood didn't do it for all of the doors for some reason.
[Updated on: Sat, 07 March 2009 07:07] Report message to a moderator
|
|
|
Re: Action->Goto [message #375347 is a reply to message #375268] |
Sat, 07 March 2009 17:43 |
|
Jerad2142
Messages: 3812 Registered: July 2006 Location: USA
Karma: 6
|
General (3 Stars) |
|
|
danpaul88 wrote on Sat, 07 March 2009 07:06 | There's a setting in LE for tiles that tells it whether it should be considered collidable during pathfind generation, and I guess some of the doors are set to collidable (and hence get no pathfinding) while others are set to non-collidable (and therefore do get pathfinding).
Since the doors would open anyway for the AI it would make sense to set them to non-collidable for pathfinding, but I guess Westwood didn't do it for all of the doors for some reason.
|
I'd assume there are some doors that Westwood wouldn't have wanted AI to go though (on single player) that way the player wouldn't always have to watch their back/just stand in one spot and wait for the bots to come to them.
Visit Jerad's deer sweat shop
|
|
|