Difference between revisions of "Category:Entity functions"

From Fortress Forever Wiki
Jump to navigationJump to search
m
 
(One intermediate revision by one other user not shown)
Line 4: Line 4:
  
 
These Lua functions are common to all entities in FF Generally, any entity placed in the map should work with these.
 
These Lua functions are common to all entities in FF Generally, any entity placed in the map should work with these.
 +
*object = baseentity:'''new'''({''collection''}) creates a Lua object that corresponds to a map entity. You must call new() before you can access any entity through Lua. ''Collection'' is a table you can use to define any custom Lua variables you want. See [[Lua:info_ff_script#Example]] for example code.
  
*baseentity:'''Teleport'''(Vector neworigin, QAngle newangles, Vector newvelocity)
+
{| border="1" cellspacing="0"
*''entity'' baseentity:'''GetOwner'''()
+
! Command !! Description
 +
|-
 +
|entity '''Teleport''' ( Vector neworigin, QAngle newangles, Vector newvelocity ) || Teleports an entity.
 +
|-
 +
|entity '''GetOwner''' () || Returns the entity that "owns" the first entity.
 +
|-
 +
|entity '''StartTrail''' (int teamid, float start_width, float end_width, float lifetime) || Starts a trail with the Team ID as the color.
 +
|-
 +
|entity '''StopTrail''' () || Stops a trail on an entity.
 +
|}
 +
 
 +
==Example==
 +
<pre></pre>
 
[[Category:Lua_Commands]]
 
[[Category:Lua_Commands]]
 
{{Infobox manual/Footer}}
 
{{Infobox manual/Footer}}

Latest revision as of 13:23, 5 April 2015


Mapping for FF
The Basics

Setting up Hammer
Getting Started With Lua
Releasing a map

FF-specific Entities

Lua location system

Map Templates
FF Lua Documentation

Entity Typing
Entity Collections

Commands
Callbacks

Entity Functions

These Lua functions are common to all entities in FF Generally, any entity placed in the map should work with these.

  • object = baseentity:new({collection}) creates a Lua object that corresponds to a map entity. You must call new() before you can access any entity through Lua. Collection is a table you can use to define any custom Lua variables you want. See Lua:info_ff_script#Example for example code.
Command Description
entity Teleport ( Vector neworigin, QAngle newangles, Vector newvelocity ) Teleports an entity.
entity GetOwner () Returns the entity that "owns" the first entity.
entity StartTrail (int teamid, float start_width, float end_width, float lifetime) Starts a trail with the Team ID as the color.
entity StopTrail () Stops a trail on an entity.

Example


This category currently contains no pages or media.