View unanswered posts | View active topics It is currently Thu Jan 02, 2025 10:29 pm



Reply to topic  [ 3 posts ] 
 Teams (actors) 
Author Message
User avatar

Joined: Thu Mar 06, 2008 10:54 pm
Posts: 1360
Location: USA
Reply with quote
Post 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! :)


Sat Jun 06, 2009 7:33 pm
Profile
User avatar

Joined: Thu Mar 06, 2008 10:54 pm
Posts: 1360
Location: USA
Reply with quote
Post 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


Sat Jun 06, 2009 8:19 pm
Profile
DRL Developer
DRL Developer
User avatar

Joined: Wed Dec 13, 2006 5:27 am
Posts: 3138
Location: A little south and a lot west of Moscow
Reply with quote
Post Re: Teams (actors)
See the vanilla homing missile launcher's code.


Sat Jun 06, 2009 8:46 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.040s | 15 Queries | GZIP : Off ]