View unanswered posts | View active topics It is currently Wed Jun 20, 2018 10:19 am



Reply to topic  [ 15 posts ] 
 Sticky Projectile Script Template 
Author Message
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 9972
Location: Here
Reply with quote
Post 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.


Attachments:
Sticky Gun.rte.rar [2.67 KiB]
Downloaded 194 times
Sun Feb 13, 2011 2:46 am
Profile
Data Realms SUPER Elite
Data Realms SUPER Elite
User avatar

Joined: Thu Jun 03, 2010 10:06 pm
Posts: 3716
Location: Over there.
Reply with quote
Post Re: Sticky Projectile Script Template
My, my. Thank you very much for it will aid me in my journey to find modding ecstasy.


Sun Feb 13, 2011 2:51 am
Profile
User avatar

Joined: Sat Nov 03, 2007 9:44 pm
Posts: 1916
Location: Flint Hills
Reply with quote
Post 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
Profile
Data Realms SUPER Elite
Data Realms SUPER Elite
User avatar

Joined: Thu Jun 03, 2010 10:06 pm
Posts: 3716
Location: Over there.
Reply with quote
Post Re: Sticky Projectile Script Template
I wont, but I've already started using it for other things.


Sun Feb 13, 2011 5:43 am
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: 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
Profile
User avatar

Joined: Fri Apr 30, 2010 2:12 pm
Posts: 560
Reply with quote
Post Re: Sticky Projectile Script Template
HUGE thanks, it could be really useful for arrow-stuff.


Sun Feb 13, 2011 4:36 pm
Profile
User avatar

Joined: Mon Jan 25, 2010 11:35 pm
Posts: 675
Reply with quote
Post Re: Sticky Projectile Script Template
Or Ballistic Knifes..... *Runs off to modding folder*


Mon Feb 14, 2011 7:37 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: 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
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 9972
Location: Here
Reply with quote
Post 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
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: 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
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 9972
Location: Here
Reply with quote
Post Re: Sticky Projectile Script Template
Uploaded new version, try that.


Mon Feb 21, 2011 10:41 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: Sticky Projectile Script Template
Nope, I got it in the meantime. Thanks anyway.


Mon Feb 21, 2011 11:02 pm
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 9972
Location: Here
Reply with quote
Post Re: Sticky Projectile Script Template
Try changing "self.ignoreparent" to false and see if anything changes.


Mon Feb 21, 2011 11:06 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: Sticky Projectile Script Template
No, no, don't worry, I fixed it.


Mon Feb 21, 2011 11:11 pm
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 9972
Location: Here
Reply with quote
Post Re: Sticky Projectile Script Template
ah, okay.


Mon Feb 21, 2011 11:12 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 15 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.021s | 16 Queries | GZIP : Off ]