Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 1.04 KB

File metadata and controls

31 lines (22 loc) · 1.04 KB

AgentAttach

AgentAttach(Agent, Agent, boolean)

  • Agent:
  • Agent:
  • boolean: (optional)
  • Returns: Nothing

AgentAttach is an agent prop that you want attached to another agent. Example: Let’s attach a toy agent and Clementine agent!

AgentCreate("Broccoli", "obj_toyBroccoli.prop", Vector(0.5,0,32), Vector(0,0,0), kScene, false, false);
AgentAttach("Clementine", "Broccoli");
agentattach

As you can see in the above image, I spawned Broccoli on the postition differently instead of 0,0,0, because I want to spawn him close to clementine! Now, they are already attached to which I added code. The Broccoli supposedly will move the same way Clementine moves if you’re controlling Clementine to walk.

Usage

AgentAttach(variableAgent, variableAgent)
AgentAttach(variableAgent, variableAgent, variableBoolean)

Back To Scripting Documentation