Data Realms Fan Forums
http://forums.datarealms.com/

Sticky Projectile Script Template
http://forums.datarealms.com/viewtopic.php?f=1&t=21485
Page 1 of 1

Author:  CaveCricket48 [ Sun Feb 13, 2011 2:46 am ]
Post subject:  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 469 times

Author:  Azukki [ Sun Feb 13, 2011 5:38 am ]
Post subject:  Re: Sticky Projectile Script Template

Beautiful.
If nobody uses this in the fire contest, I'll be downright baffled.

Author:  Roast Veg [ Sun Feb 13, 2011 3:14 pm ]
Post subject:  Re: Sticky Projectile Script Template

I'm thinking of throwing this and the multiple fire mode at each other for the contest.

Author:  Naxete [ Sun Feb 13, 2011 4:36 pm ]
Post subject:  Re: Sticky Projectile Script Template

HUGE thanks, it could be really useful for arrow-stuff.

Author:  David Rodrigov [ Mon Feb 14, 2011 7:37 pm ]
Post subject:  Re: Sticky Projectile Script Template

Or Ballistic Knifes..... *Runs off to modding folder*

Author:  Roast Veg [ Mon Feb 21, 2011 8:34 pm ]
Post subject:  Re: Sticky Projectile Script Template

This does not work when the gun is spawned through the build menu or by Lua.

Author:  CaveCricket48 [ Mon Feb 21, 2011 10:06 pm ]
Post subject:  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?

Author:  Roast Veg [ Mon Feb 21, 2011 10:16 pm ]
Post subject:  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.

Author:  CaveCricket48 [ Mon Feb 21, 2011 10:41 pm ]
Post subject:  Re: Sticky Projectile Script Template

Uploaded new version, try that.

Author:  Roast Veg [ Mon Feb 21, 2011 11:02 pm ]
Post subject:  Re: Sticky Projectile Script Template

Nope, I got it in the meantime. Thanks anyway.

Author:  CaveCricket48 [ Mon Feb 21, 2011 11:06 pm ]
Post subject:  Re: Sticky Projectile Script Template

Try changing "self.ignoreparent" to false and see if anything changes.

Author:  Roast Veg [ Mon Feb 21, 2011 11:11 pm ]
Post subject:  Re: Sticky Projectile Script Template

No, no, don't worry, I fixed it.

Author:  CaveCricket48 [ Mon Feb 21, 2011 11:12 pm ]
Post subject:  Re: Sticky Projectile Script Template

ah, okay.

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/