View unanswered posts | View active topics It is currently Sat Dec 28, 2024 2:51 pm



Reply to topic  [ 2 posts ] 
 Attaching lua script to an HDFirearm 
Author Message

Joined: Sat Dec 04, 2010 4:48 am
Posts: 13
Reply with quote
Post Attaching lua script to an HDFirearm
Hi,
I'm trying to attach a lua script file to a gun (HDFirearm).
But in game it just didn't work. game version is B23 i think.

I even added
Code:
print("Weapon created.");

into the function of Create(self), but when i bought a bot with that weapon and it arrived safely to the ground, nothing displayed in the console. the script of the gun didn't start at all.
Then i look for other guns' ini files and i found that there's not any HDFirearm that is attached with lua. Most lua scripts are attached to some particles/emitters generated when the gun fires.
However, i want my script running not only when it is being fired but at any time. What can i do? Is it because the game version is too old?


Fri Mar 02, 2012 6:56 pm
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post Re: Attaching lua script to an HDFirearm
Yeah, your version may be too old. Scripts only work properly when they're on attachables in builds 25 and 26 if I recall correctly.


Fri Mar 02, 2012 7:11 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: Google [Bot]


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.024s | 14 Queries | GZIP : Off ]