LUA code, what does "entity" mean?

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

LUA code, what does "entity" mean?

Post by Fiodis »

In LUA terms, what does Entity mean? The doc says it's props and objects, but in the teleporter tut the code says:

Code: Select all

OnEnterRegion(
function(regIn,character)
MoveEntityToNode(character,"TeleportNode")
end,
"TeleportRegion"
)
ActivateRegion("TeleportRegion")
The MoveEntityToNode line is, I think, what moves the player. But the player isn't a prop or object. Is he?
Null_1138
Jedi
Jedi
Posts: 1192
Joined: Thu Oct 16, 2008 4:05 pm

Re: LUA code, what does "entity" mean?

Post by Null_1138 »

I'm not a Lua expert, but Dictionary.com says:
Dictionary wrote:something that has a real existence
So I guess anything that exists and has form.
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: LUA code, what does "entity" mean?

Post by Fiodis »

Something in the dictionary isn't always the same in LUA.
YaNkFaN
Field Commander
Field Commander
Posts: 943
Joined: Sat Dec 13, 2008 8:17 am

Re: LUA code, what does "entity" mean?

Post by YaNkFaN »

i'm taking a wild guess on this one but an entity is something that has a mesh...i'm not a 100% sure i know it includes players and i know it doesn't include things like lights so yea just a guess
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: LUA code, what does "entity" mean?

Post by Fiodis »

So "OnEntityDamage (entity, damager)" with "entity" being a player/character/unit is a valid function?
Post Reply