Data Realms Fan Forums
http://45.55.195.193/

Teams (actors)
http://45.55.195.193/viewtopic.php?f=73&t=15223
Page 1 of 1

Author:  Mind [ Sat Jun 06, 2009 7:33 pm ]
Post subject:  Teams (actors)

How do you assign a team to, say a shield/hdfirearm, by finding the nearest actor and assigning the team of that actor to the team of the shield/hdfirearm? I know this would be in the create function, but i dont know how to exactly. Thanks! :)

Author:  Mind [ Sat Jun 06, 2009 8:19 pm ]
Post subject:  Re: Teams (actors)

Double post (not edit), but how would you find the nearest actor with a script, then call that actor "blah" and say if actor.ID ~= "blah" Don't know if it would look like this but:

Code:
function Create(self) 
    "find nearest actor"
    actor.ID == "blah"
end

function Update(self)
     if actor.ID ~= "blah" then
          sdjklahflkasdhf
     end
end

Author:  TheLastBanana [ Sat Jun 06, 2009 8:46 pm ]
Post subject:  Re: Teams (actors)

See the vanilla homing missile launcher's code.

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/