AI CreateGoalPipe
From CryWiki
In the game/scripts/AI/goalpipes
You can edit and add goalpipes,
NOTE: Most of the AI goalpipes originate in the PipemanagerCover2.lua
In there you can add or edit goalpipes,
This is an Example of a newly created one:
AI.BeginGoalPipe("suppressive_fire");
AI.PushGoal("run",0,2);
AI.PushGoal("+strafe",0,1,2);
AI.PushGoal("locate",0,"probtarget");
AI.PushGoal "hide",1,6,HM_NEAREST_TOWARDS_TARGET_PREFER_SIDES+HM_AROUND_LASTOP+HM_INCLUDE_SOFTCOVERS,1);
AI.PushGoal("locate", 0,"probtarget");
AI.PushGoal("lookat",0,0,0,1);
AI.PushGoal("bodypos",0,BODYPOS_CROUCH);
AI.PushGoal("+firecmd",0,FIREMODE_FORCED);
AI.PushGoal("usecover",1,COVER_HIDE,0.5,1,1);
AI.PushGoal("locate",0,"probtarget");
AI.PushGoal("lookat",0,0,0,1);
AI.PushGoal("+firecmd",0,FIREMODE_FORCED);
AI.PushGoal("hide",1,20,HM_NEAREST, 1);
AI.PushGoal("usecover",1,COVER_HIDE,0.5,1,1);
AI.PushGoal("+firecmd",0,FIREMODE_FORCED);
AI.PushGoal("usecover",1,COVER_UNHIDE,6,8,1);
AI.PushGoal("locate",0,"probtarget");
AI.PushGoal("lookat",0,0,0,1);
AI.PushGoal("+firecmd",0,FIREMODE_FORCED);
AI.PushGoal("timeout",1,0.5,0.5);
AI.PushGoal("signal",0,1,"COVER_NORMALATTACK",1);
AI.EndGoalPipe();
When making your new goalpipe, make sure it starts off with
AI.BeginGoalPipe("Name of Goalpipe");
and ends with
AI.EndGoalPipe();
To get your AI to call your new goalpipe go here
http://wiki.crymod.com/index.php/AI_BeginGoalPipe
--Rad15 02:44, 2 July 2008 (CEST)
