View unanswered posts | View active topics It is currently Thu Mar 28, 2024 7:47 pm



Reply to topic  [ 14 posts ] 
 Sticky Grenades. 
Author Message
User avatar

Joined: Sun Jan 15, 2012 10:12 pm
Posts: 207
Location: Burrowed, waiting for you to come by.
Reply with quote
Post Sticky Grenades.
How do I make them sticky exactly?
Is there a certain Lua file I gotta copy paste and modify?


Tue Oct 22, 2013 2:53 am
Profile

Joined: Fri Oct 18, 2013 2:49 pm
Posts: 100
Location: Gretin
Reply with quote
Post Re: Sticky Grenades.
Find a 1.0/B27 mod and find a stick bomb item and review the script.


Tue Oct 22, 2013 7:41 am
Profile
User avatar

Joined: Sun Jan 15, 2012 10:12 pm
Posts: 207
Location: Burrowed, waiting for you to come by.
Reply with quote
Post Re: Sticky Grenades.
Epicnator wrote:
Find a 1.0/B27 mod and find a stick bomb item and review the script.

Seems legit. I'll try later today.


Tue Oct 22, 2013 11:13 am
Profile
User avatar

Joined: Sun Jan 15, 2012 10:12 pm
Posts: 207
Location: Burrowed, waiting for you to come by.
Reply with quote
Post Re: Sticky Grenades.
Chronometer wrote:
Epicnator wrote:
Find a 1.0/B27 mod and find a stick bomb item and review the script.

Seems legit. I'll try later today.


Tried this, still having trouble. Halp.
EDIT: Tried using 'Sticky.lua' in Base.rte. Didn't help, it just gets stuck to my actor and doesn't detonate.


Tue Oct 22, 2013 8:45 pm
Profile

Joined: Fri Oct 18, 2013 2:49 pm
Posts: 100
Location: Gretin
Reply with quote
Post Re: Sticky Grenades.
Chronometer wrote:
Chronometer wrote:
Epicnator wrote:
Find a 1.0/B27 mod and find a stick bomb item and review the script.

Seems legit. I'll try later today.


Tried this, still having trouble. Halp.
EDIT: Tried using 'Sticky.lua' in Base.rte. Didn't help, it just gets stuck to my actor and doesn't detonate.
\

Cannot find any stick grenade from anyother 1.0/B27 mods? (and credit those scripts)


Wed Oct 23, 2013 8:02 am
Profile
User avatar

Joined: Sun Jan 28, 2007 10:32 pm
Posts: 1609
Location: UK
Reply with quote
Post Re: Sticky Grenades.
Best way I found for making a sticky throwable grenade is to have an initial projectile (with GibImpulseLimit = 1) that gibs into a second sticky component stage when it hits the target. The second stage is what actually explodes, and should be able to use the standard Sticky.lua without many issues.

Also works fairly well for launched grenades, IIRC.


Wed Oct 23, 2013 3:07 pm
Profile YIM

Joined: Fri Nov 23, 2012 5:42 am
Posts: 143
Reply with quote
Post Re: Sticky Grenades.
Make sure the grenade has "ActivatesWhenReleased = 1" set in the ini. If that doesn't work post the sticky.lua script here please, I don't have a copy of it, but I imagine getting it to work like you want should only be a matter of adding 2 or 3 lines.


Wed Oct 23, 2013 4:52 pm
Profile
User avatar

Joined: Mon Oct 11, 2010 1:15 pm
Posts: 594
Location: Finlandia
Reply with quote
Post Re: Sticky Grenades.
Fiddling with the Coalition Timed Explosive is a good start for sticky grenades.


Thu Oct 24, 2013 6:34 pm
Profile
User avatar

Joined: Sun Jan 15, 2012 10:12 pm
Posts: 207
Location: Burrowed, waiting for you to come by.
Reply with quote
Post Re: Sticky Grenades.
Large Post. You've been warned.



Fri Oct 25, 2013 2:19 am
Profile

Joined: Fri Oct 18, 2013 2:49 pm
Posts: 100
Location: Gretin
Reply with quote
Post Re: Sticky Grenades.
Chronometer wrote:
Large Post. You've been warned.



I meant by "REVIEWING" the contents like reading how it works.


Fri Oct 25, 2013 10:35 am
Profile
User avatar

Joined: Sun Jan 28, 2007 10:32 pm
Posts: 1609
Location: UK
Reply with quote
Post Re: Sticky Grenades.
Chronometer wrote:
Arcalane wrote:
Best way I found for making a sticky throwable grenade is to have an initial projectile (with GibImpulseLimit = 1) that gibs into a second sticky component stage when it hits the target. The second stage is what actually explodes, and should be able to use the standard Sticky.lua without many issues.

Also works fairly well for launched grenades, IIRC.


Could you be more specific? I don't get it. Like, specific as in where and what to change.


This isn't really a case of going in and changing one thing. Stuff like sticky grenades is rarely ever that simple, so if you want to do it then be prepared to go all the way.

Okay, what you need is;

1) The thrown grenade, a TDExplosive.
2) The secondary sticky component. This can be a MOSRotating or AEmitter. I usually set it to use the same sprite and offset as the original grenade.

The secondary sticky component is what actually blows up, making sound/particles/etc. - it has the sticky script attached to it. The primary doesn't need a script by itself but that doesn't mean it must not have a script, either.

The thrown grenade has GibImpulseLimit 1, and exactly one gib; the secondary sticky component. It should have a very long detonation delay to ensure it has time to reach the target, and no gib sound. After the grenade is thrown and it hits a target, it will break into the secondary sticky component. As this searches for the nearest thing and sticks to it in the create event... it sticks to whatever it just hit. Then a timer on it expires, and it explodes.

Script;



This is just a modified version of the Base.rte Sticky.lua to add a time delay; replace the time (2500) in IsPastSimMS at the end with however long you want the delay to be remembering that 1000ms = 1 second. The timer is independent of the first stage, so you don't need to worry about premature detonation, but you do need to keep it reasonably short since the victim basically turns into a walking bomb and might be inclined to try giving you an explosive hug.

The whole solution is a little roundabout and I'm sure it's no doubt possible to do a safe one-stage grenade, but I find it's simple, reasonably foolproof, and works quite nicely for sticky grenade launchers as well.


Fri Oct 25, 2013 12:54 pm
Profile YIM
User avatar

Joined: Sun Jan 15, 2012 10:12 pm
Posts: 207
Location: Burrowed, waiting for you to come by.
Reply with quote
Post Re: Sticky Grenades.
Arcalane wrote:
Chronometer wrote:
Arcalane wrote:
Best way I found for making a sticky throwable grenade is to have an initial projectile (with GibImpulseLimit = 1) that gibs into a second sticky component stage when it hits the target. The second stage is what actually explodes, and should be able to use the standard Sticky.lua without many issues.

Also works fairly well for launched grenades, IIRC.


Could you be more specific? I don't get it. Like, specific as in where and what to change.


This isn't really a case of going in and changing one thing. Stuff like sticky grenades is rarely ever that simple, so if you want to do it then be prepared to go all the way.

Okay, what you need is;

1) The thrown grenade, a TDExplosive.
2) The secondary sticky component. This can be a MOSRotating or AEmitter. I usually set it to use the same sprite and offset as the original grenade.

The secondary sticky component is what actually blows up, making sound/particles/etc. - it has the sticky script attached to it. The primary doesn't need a script by itself but that doesn't mean it must not have a script, either.

The thrown grenade has GibImpulseLimit 1, and exactly one gib; the secondary sticky component. It should have a very long detonation delay to ensure it has time to reach the target, and no gib sound. After the grenade is thrown and it hits a target, it will break into the secondary sticky component. As this searches for the nearest thing and sticks to it in the create event... it sticks to whatever it just hit. Then a timer on it expires, and it explodes.

Script;



This is just a modified version of the Base.rte Sticky.lua to add a time delay; replace the time (2500) in IsPastSimMS at the end with however long you want the delay to be remembering that 1000ms = 1 second. The timer is independent of the first stage, so you don't need to worry about premature detonation, but you do need to keep it reasonably short since the victim basically turns into a walking bomb and might be inclined to try giving you an explosive hug.

The whole solution is a little roundabout and I'm sure it's no doubt possible to do a safe one-stage grenade, but I find it's simple, reasonably foolproof, and works quite nicely for sticky grenade launchers as well.



Did stuff, this happens.

Code:
---------------------------
RTE Aborted! (x_x)
---------------------------
Could not match property Error happened in ChimaeraRnD.rte/Devices/Devices.ini at line 4!

The last frame has been dumped to 'abortscreen.bmp'

You can copy this message with Ctrl+C


Before reprimanding me to check the code on line 4, look at it yourself.


Attachments:
ChimaeraRnD Runtest.rte.rar [796.93 KiB]
Downloaded 279 times
Sun Oct 27, 2013 6:59 pm
Profile

Joined: Fri Nov 23, 2012 5:42 am
Posts: 143
Reply with quote
Post Re: Sticky Grenades.
The problem is in magmine.ini, all the way at the bottom, you forgot to add the name of a gib:
Code:
   AddGib = Gib
      CopyOf =


Also MagMine lua.lua is oddly named and not actually used by anything in magmine.ini.


Sun Oct 27, 2013 8:27 pm
Profile
User avatar

Joined: Sun Jan 15, 2012 10:12 pm
Posts: 207
Location: Burrowed, waiting for you to come by.
Reply with quote
Post Re: Sticky Grenades.
clunatic wrote:
The problem is in magmine.ini, all the way at the bottom, you forgot to add the name of a gib:
Code:
   AddGib = Gib
      CopyOf =


Also MagMine lua.lua is oddly named and not actually used by anything in magmine.ini.


OOPS.
And I named it MagMine Lua so I didn't have to look around for which was ini and which was lua
EDIT:
Code:
ScriptPath = ChimaeraRnD.rte/Devices/Magneto Mine/MagMine Lua.lua

It was honestly just for ease of access.
EDIIIIIIIIIIIIIIIIIIIIIIIIT:
Goddamn it why is it so goddamn hard to do a simple goddamn task.
GARRRRRGH.
Well, the dummy mine gibs on contact, but it doesn't gib into anything. What it should gib into is a sticky magmine, no?
Well it doesn't work QQ


FINAL EDIT: Issue Solved, kthxbai.


Attachments:
ChimaeraRnD.rte.rar [796.97 KiB]
Downloaded 272 times
Mon Oct 28, 2013 4:28 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 14 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.067s | 16 Queries | GZIP : Off ]