View unanswered posts | View active topics It is currently Fri Feb 28, 2020 4:08 pm

Reply to topic  [ 2 posts ] 
 Addtogroup lua? 
Author Message
User avatar

Joined: Thu Oct 04, 2012 9:21 pm
Posts: 105
Location: Chile
Reply with quote
Post Addtogroup lua?
Hello. I have been making stuff for this game and one of those things is a crate.

This particular crate works as a bomb but it will deploy instead of just going boom. Once deployed, it will damage any actor in range that doesn't have AddToGroup = DecayRes in them.

So my request is. I would like to have a lua sample/help for a device that will make the actor carrying it immune to this damage. I would really appreciate help with this since my understanding of lua is a bit limited. :(

Tue Jun 11, 2013 7:10 am
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 12287
Location: Here
Reply with quote
Post Re: Addtogroup lua?
from Wiki wrote:
Shows whether this is or carries a specifically grouped object in its inventory. Also looks through the inventories of potential passengers, as applicable.
The name of the group to look for.
Return value:
Whetehr the object in the group was found carried by this.

So you'd use that to check to see if an actor has an object that is in a specific group, like
   if actor:HasObjectInGroup("Tools") then

Mon Jul 15, 2013 8:33 pm
Display posts from previous:  Sort by  
Reply to topic   [ 2 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.011s | 15 Queries | GZIP : Off ]