View unanswered posts | View active topics It is currently Thu Dec 26, 2024 6:07 pm



Reply to topic  [ 11 posts ] 
 What can I add scripts to? 
Author Message
Data Realms Elite
Data Realms Elite
User avatar

Joined: Tue May 25, 2010 8:27 pm
Posts: 4521
Location: Constant motion
Reply with quote
Post What can I add scripts to?
As title, basically.

I need a list of everything I can add a ScriptPath line to in it's .ini

Well, I don't need it, but would sure be useful.


Mon Oct 25, 2010 3:33 pm
Profile
User avatar

Joined: Tue Dec 12, 2006 3:10 pm
Posts: 495
Location: Uncertain quantum state
Reply with quote
Post Re: What can I add scripts to?
I don't think there's much of restriction, anything that's a child class of MovableObject should do.

But the script wont run unless the object is moving freely on it's own, and not an attachable to anything.


Mon Oct 25, 2010 3:36 pm
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Tue May 25, 2010 8:27 pm
Posts: 4521
Location: Constant motion
Reply with quote
Post Re: What can I add scripts to?
Oh-ho that is interesting. Seems like it's pretty unrestricted if that's the case.


Mon Oct 25, 2010 3:41 pm
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post Re: What can I add scripts to?
Though, scripts attached to objects that are attached to objects won't run.

For example, if you attach a script to a gun and an actor is holding the gun, the script on the gun won't run.

You can't have TOO much freedom, right?


Mon Oct 25, 2010 4:15 pm
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Tue May 25, 2010 8:27 pm
Posts: 4521
Location: Constant motion
Reply with quote
Post Re: What can I add scripts to?
...but the script will work so long as no-one is holding the gun, right?

If so then I get it.


Mon Oct 25, 2010 4:45 pm
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post Re: What can I add scripts to?
Roast Veg wrote:
...but the script will work so long as no-one is holding the gun, right?

Yep.


Mon Oct 25, 2010 8:25 pm
Profile
User avatar

Joined: Tue Nov 06, 2007 6:58 am
Posts: 2054
Reply with quote
Post Re: What can I add scripts to?
To get around that, slap an emitter that emits particles with the code.
This tip only applies for held weapons and other attachable.


Tue Oct 26, 2010 4:18 am
Profile
User avatar

Joined: Sat Nov 03, 2007 9:44 pm
Posts: 1916
Location: Flint Hills
Reply with quote
Post Re: What can I add scripts to?
An exception to the general rule: Magazines. Scripts don't work on magazines, not even when they've been detached from the gun, ie, dropped.

You can slap an emitter on one, causing it to gib when detached into something that can have a script, though.


Tue Oct 26, 2010 5:59 am
Profile
DRL Developer
DRL Developer

Joined: Tue Aug 11, 2009 5:09 am
Posts: 395
Reply with quote
Post Re: What can I add scripts to?
Azukki wrote:
An exception to the general rule: Magazines. Scripts don't work on magazines, not even when they've been detached from the gun, ie, dropped.
Perhaps not terribly useful, but there exist a workaround for this. Add the following code to the StartActivity function of your scene:
Code:
   if not ToMagazine then
      ToMagazine = ToMOSRotating
   end


Tue Oct 26, 2010 2:59 pm
Profile
User avatar

Joined: Sat Nov 03, 2007 9:44 pm
Posts: 1916
Location: Flint Hills
Reply with quote
Post Re: What can I add scripts to?
So that makes detached magazines in the scene become (or be treated like) MOSRotatings?


Tue Oct 26, 2010 9:53 pm
Profile
User avatar

Joined: Tue Nov 06, 2007 6:58 am
Posts: 2054
Reply with quote
Post Re: What can I add scripts to?
The ToWhatever functions are called on the creation of all objects with Lua.


Wed Oct 27, 2010 7:51 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 11 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.091s | 13 Queries | GZIP : Off ]