[Season 4] Agents - Telltale-Modding-Group/Telltale-Script-Editor GitHub Wiki
These are the many functions in relation to agents that can be found in S4 in the archive "WDC_pc_ProjectSeason4_data".
NOTE: Some of these are vague or their true function or return type has yet to be known. We will do our best to describe them but experimentation and more research are necessary to determine what these functions/values actually do.
Some functions are 'marked' with a question mark and this means that we are not certain what the values of the function are, or what the function itself does and will need further experimentation/testing to determine it.
Agents
Summary: Agents are akin to 'GameObjects' which can represent characters, props, or scenery. Essentially they are containers for almost any type of object.
[Transformations]
These are transformation functions for agent types (position, rotation).
Get Values
AgentGetPos(agent)
- agent is the given agent object.
- returns the position or 'pos' vector (x, y, z) of the given agent.
AgentGetRot(agent)
- agent is the given agent object.
- returns the rotation or 'rot' vector (x, y, z) of the given agent.
AgentGetQuat(agent)?
- agent is the given agent object.
- returns the quaternion of the given agent.
AgentGetWorldPos(agent)
- agent is the given agent object.
- returns the world position or 'pos' vector (x, y, z) of the given agent.
AgentGetWorldRot(agent)
- agent is the given agent object.
- returns the world rotation or 'rot' vector (x, y, z) of the given agent.
[Set Values]
AgentSetPos(agent, pos)
- agent is the given agent object.
- pos is the new position vector (x, y, z).
- function that sets the position of an agent.
AgentSetRot(agent, rot)
- agent is the given agent object.
- rot is the new rotation vector (x, y, z).
- function that sets the rotation of an agent.
AgentSetWorldPos(agent, pos)
- agent is the given agent object.
- pos is the new position vector (x, y, z).
- function that sets the world position of an agent.
AgentSetWorldRot(agent, rot)
- agent is the given agent object.
- rot is the new rotation vector (x, y, z).
- function that sets the world rotation of an agent.
[Vectors]
AgentLocalToWorld(agent, pos)
- agent is the given agent object.
- pos is the given vector.
- returns a vector that is transformed from local space to world space.
AgentGetForwardVec(agent, true)
- agent is the given agent object.
- true is unknown at this time.
- returns the forward vector of the given agent.
AgentGetRightVec(agent, true)
- agent is the given agent object.
- true is unknown at this time.
- returns the right vector of the given agent.
[Primary Agent Functions]
AgentFind(name)
- name is the name (string) of the agent to find.
- returns the agent object of the found agent.
AgentGetName(agent)
- agent is the given agent object.
- returns the name (string) of the given agent.
AgentGetParent(agent)
- agent is the given agent object.
- returns the parent agent object of the given agent.
AgentGetAttachments(agent)?
- agent is the given agent object.
- returns a list of objects that are attached to the given agent object?
AgentGetProperties(agent)
- agent is the given agent object.
- returns the list of properties on the given agent object.
AgentGetRuntimeProperties(agent)
- agent is the given agent object.
- returns the list of runtime properties on the given agent object.
AgentGetSceneProperties(agent)
- agent is the given agent scene object.
- returns the properties list for a scene agent object.
AgentSetSceneProperty(agent, propertyName, value)
- agent is the given agent scene object.
- property name is the name of the property on the given agent object.
- value is the value to be set for the propertyName.
- function that sets the value of the given scene property variable for the given agent scene object.
AgentCreate(agent, "name")?
- agent is the given agent object?
- "name" is the string of the new agent name?
- function that creates an agent?
AgentCreate(agentName, propfile, pos, rot, sceneName, false, false)
- agentName is the name for the new agent object.
- propfile is the property file to be assigned to the new agent.
- pos is the position vector (x, y, z) of the new agent.
- rot is the rotation vector (x, y, z) of the new agent.
- sceneName is the name of the scene in which the agent will be created in?
- false this is unknown.
- false this is unknown.
- function that creates an agent in a scene?
AgentDestroy(agent)
- agent is the given agent object.
- function that deletes the given agent object.
AgentDuplicate(nil, parentName, false, false, true, true, true, nil, Renamer)?
- nil is unknown.
- parentName is unknown.
- false is unknown.
- false is unknown.
- true is unknown.
- true is unknown.
- true is unknown.
- nil is unknown.
- Renamer is unknown.
- function that duplicates an agent?
AgentFindInScene(agentName, scene)
- agentName is the name of the agent object.
- scene is the scene.
- returns the agent object if it is found in the scene.
[Booleans]
AgentIsHidden(agent)
- agent is the given agent object.
- returns a boolean (true, false) of whether an agent is hidden or not.
AgentExists(agent)
- agent is the given agent object.
- returns a boolean (true, false) of whether an agent exists or not.
AgentHasProperty(agent, "property name")
- agent is the given agent object.
- "property name" is a string of the property name
- returns a boolean (true, false) of whether an agent has the given property.
AgentHasNode(agent, "node name")?
- agent is the given agent object.
- "node name" is a string of the node name?
- returns a boolean (true, false) of whether an agent has the given node?
AgentIsParentProperty(agent, "parent property name")?
- agent is the given agent object.
- "parent property name" is a string of the parent property name?
- returns a boolean (true, false) of whether an agent is the given parent property?
AgentExistsInScene(agentName, scene)
- agentName is the name of the given agent object.
- scene is the given scene.
- returns boolean (true, false) of whether an agent exists in the given scene.
[Other Functions]
AgentTurnTowards(agent, speed, pos)
- agent is the given agent object.
- speed is a float value defining the speed at which the agent turns.
- pos is the position vector (x, y, z) of where the agent turns toward.
- function that turns the given agent towards the given position at the given speed.
AgentFacePos(agent, pos)
- agent is the given agent object.
- pos is the position vector (x, y, z) where the agent will face towards.
- function that rotates an agent to face the given position.
AgentSetProperty(agent, "property name", propertyValue)
- agent is the given agent object.
- "property name" is the name of the property that will be set.
- propertyValue is the value that will be set to the given property name?
- function sets the given property name with the given property value.
AgentSetSceneProperty(agent, "property name", propertyValue)?
- agent is the given agent object.
- "property name" is the name of the scene property that will be set?
- propertyValue is the value that will be set to the given scene property name?
- function sets the given scene property name with the given scene property value?
AgentSetState(agent, state)?
- agent is the given agent object.
- state is the given state of the object?
- function sets the state of the given agent?
AgentAddOnDestroyCallback(agent, function)?
- agent is the given agent object.
- function is the given function to be called on destroy.
- function that adds a function that will be called when the given agent is destroyed.
AgentAttach(agent, attachAgent, true)?
- agent is the given agent object.
- attachAgent is the given agent to be attached to agent.
- true is unknown.
- function that attaches the attachAgent to the agent.
AgentDetatch(agent, true)?
- agent is the given agent object.
- true is unknown.
- function that detatches an agent?
AgentToModels(agent)?
- agent is the given agent object.
- returns the models of the given agent?
AgentGetAnglesTo(target, pos)?
- target is unknown.
- pos is the position vector (x, y, z)
- function is unknown as of this time.
GetAgentPropFile(agentName)?
- agentName is the name of the agent object.
- returns the properties file of the given agent?
GetAgentCreatePos(scene, true)?
- scene being the given scene object?
- true is unknown.
- returns the position of the agent upon creation?