Author |
Message |
Roast Veg
Data Realms Elite
Joined: Tue May 25, 2010 8:27 pm Posts: 4521 Location: Constant motion
|
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 |
|
|
findude
Joined: Tue Dec 12, 2006 3:10 pm Posts: 495 Location: Uncertain quantum state
|
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 |
|
|
Roast Veg
Data Realms Elite
Joined: Tue May 25, 2010 8:27 pm Posts: 4521 Location: Constant motion
|
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 |
|
|
CaveCricket48
Joined: Tue Jun 12, 2007 11:52 pm Posts: 13144 Location: Here
|
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 |
|
|
Roast Veg
Data Realms Elite
Joined: Tue May 25, 2010 8:27 pm Posts: 4521 Location: Constant motion
|
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 |
|
|
CaveCricket48
Joined: Tue Jun 12, 2007 11:52 pm Posts: 13144 Location: Here
|
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 |
|
|
mail2345
Joined: Tue Nov 06, 2007 6:58 am Posts: 2054
|
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 |
|
|
Azukki
Joined: Sat Nov 03, 2007 9:44 pm Posts: 1916 Location: Flint Hills
|
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 |
|
|
Abdul Alhazred
DRL Developer
Joined: Tue Aug 11, 2009 5:09 am Posts: 395
|
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 |
|
|
Azukki
Joined: Sat Nov 03, 2007 9:44 pm Posts: 1916 Location: Flint Hills
|
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 |
|
|
mail2345
Joined: Tue Nov 06, 2007 6:58 am Posts: 2054
|
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 |
|
|
|