Author |
Message |
CaveCricket48
Joined: Tue Jun 12, 2007 11:52 pm Posts: 13144 Location: Here
|
Sticky Projectile Script Template
A lot of people asked me in the past concerning my method of making Lua'd sticky projectiles, which I would then reply with a cut-down script of some old mod's script that would be difficult for them to use. After a while, I made a simple script template that would allow easy editing of the sticky feature, but forgot to release it when I made it. So here it is.
First off in the script, there is a section labeled "Variables you can edit," which contains variables that you can edit to change the sticky properties.
Next, there are areas where I marked "Custom Script Chunks," where you can stuff in whatever script pieces you want.
All in all, it's meant to be easily editable by anyone, whether or not they know Lua.
|
Sun Feb 13, 2011 2:46 am |
|
|
Azukki
Joined: Sat Nov 03, 2007 9:44 pm Posts: 1916 Location: Flint Hills
|
Re: Sticky Projectile Script Template
Beautiful. If nobody uses this in the fire contest, I'll be downright baffled.
|
Sun Feb 13, 2011 5:38 am |
|
|
Roast Veg
Data Realms Elite
Joined: Tue May 25, 2010 8:27 pm Posts: 4521 Location: Constant motion
|
Re: Sticky Projectile Script Template
I'm thinking of throwing this and the multiple fire mode at each other for the contest.
|
Sun Feb 13, 2011 3:14 pm |
|
|
Naxete
Joined: Fri Apr 30, 2010 2:12 pm Posts: 560
|
Re: Sticky Projectile Script Template
HUGE thanks, it could be really useful for arrow-stuff.
|
Sun Feb 13, 2011 4:36 pm |
|
|
David Rodrigov
Joined: Mon Jan 25, 2010 11:35 pm Posts: 675
|
Re: Sticky Projectile Script Template
Or Ballistic Knifes..... *Runs off to modding folder*
|
Mon Feb 14, 2011 7:37 pm |
|
|
Roast Veg
Data Realms Elite
Joined: Tue May 25, 2010 8:27 pm Posts: 4521 Location: Constant motion
|
Re: Sticky Projectile Script Template
This does not work when the gun is spawned through the build menu or by Lua.
|
Mon Feb 21, 2011 8:34 pm |
|
|
CaveCricket48
Joined: Tue Jun 12, 2007 11:52 pm Posts: 13144 Location: Here
|
Re: Sticky Projectile Script Template
The Lua is on the projectile of the weapon, so it spawning it in different ways shouldn't have any effects.
Are you getting any Lua errors? What dies your script look like?
|
Mon Feb 21, 2011 10:06 pm |
|
|
Roast Veg
Data Realms Elite
Joined: Tue May 25, 2010 8:27 pm Posts: 4521 Location: Constant motion
|
Re: Sticky Projectile Script Template
It's when the gun is spawned in different ways, I.E: combining it with the dual weapon mode template. The error is something like: Code: ERROR: No overload of 'SceneManager:CastMORay' matched the arguments (SceneManager, const Vector, Vector, nil, number, boolean, number) candidates are: SceneManager:CastMORay(const Vector&, const Vector&, number, number, boolean, number) What I think is happening is that the gun is being given some bad ID and this is confusing the code where the bullet deals with the parent ID, which in turn messes up the MORay that requires it.
|
Mon Feb 21, 2011 10:16 pm |
|
|
CaveCricket48
Joined: Tue Jun 12, 2007 11:52 pm Posts: 13144 Location: Here
|
Re: Sticky Projectile Script Template
Uploaded new version, try that.
|
Mon Feb 21, 2011 10:41 pm |
|
|
Roast Veg
Data Realms Elite
Joined: Tue May 25, 2010 8:27 pm Posts: 4521 Location: Constant motion
|
Re: Sticky Projectile Script Template
Nope, I got it in the meantime. Thanks anyway.
|
Mon Feb 21, 2011 11:02 pm |
|
|
CaveCricket48
Joined: Tue Jun 12, 2007 11:52 pm Posts: 13144 Location: Here
|
Re: Sticky Projectile Script Template
Try changing "self.ignoreparent" to false and see if anything changes.
|
Mon Feb 21, 2011 11:06 pm |
|
|
Roast Veg
Data Realms Elite
Joined: Tue May 25, 2010 8:27 pm Posts: 4521 Location: Constant motion
|
Re: Sticky Projectile Script Template
No, no, don't worry, I fixed it.
|
Mon Feb 21, 2011 11:11 pm |
|
|
CaveCricket48
Joined: Tue Jun 12, 2007 11:52 pm Posts: 13144 Location: Here
|
Re: Sticky Projectile Script Template
ah, okay.
|
Mon Feb 21, 2011 11:12 pm |
|
|
|