Jump to content

Sticky Projectiles


kurochou

Recommended Posts

I'm using the geck to (at least try to) build sticky explosives. Preferably this would be accomplished through the projectile object, so that variations could be fired from different weapon types (mine-drop, grenade-throw, grenade-launch, rifle, shotgun).

I spent a good chunk of the weekend trying to solve this, and had some half-assed, half-complete success, followed by endless hours of googling--leading only to dead topics and unanswered questions (some of which are even here at nexus).

 

I've tried two different methods to accomplish this, both with pseudo-success, and each covering where the other failed.

If you shoot a missile-type projectile without any accompanying impact data on the weapon, the projectile sticks to whatever hard surface it hits. Fantastic, job half done.

Except it's not. Missile type projectiles --even throwing knives-- are set to be cleaned up at a certain interval (I haven't actually measured, but it seems like it's about 7 seconds.) You stick your target, and switch to a detonator, wait for an enemy to walk past, and then that's it. The mine vanishes after the allocated time, and you don't get a lovely mushy NPC, all you get is an anticlimactic click.

 

Okay, well that makes sense, normally you wouldn't want bullets lingering forever. But you do want mines and grenades to be persistent; and because they have their own destruction data, the clean up after themselves. Great; let's use the lobber type instead then.

Now we have persistent projectiles, that don't go anywhere until they detonate, but they don't stick. Even worse, they bounce. I tried for hours to figure out some magic combination of bounce and gravity, to prevent said lobber from bouncing.

Nothing worked.

 

I'm kind of at my wits end here, so I'm asking for a freebie here (which I normally don't do) --at least I know enough about the topic to know exactly what I need?

Does someone have knowledge of some black magic combination or hidden setting that will either A. remove the bounce from lobbers, B. extend the lifespan of missile projectiles (just the one, if at all possible), or C. enough scripting knowledge to generate a projectile (lobber) at the impact point of another (beam or missile)?

 

Thanks in advance!

Edited by kurochou
Link to comment
Share on other sites

To generate another projectile, you can make the projectile have an explosion, and the explosion place an activator on impact and the activator can do some scripting... Longwinded I know!

Warning:

Explosion on impact + 'No hitscan' = Projectile impact does no damage to target on impact, only explosion can damage target

Explosion on impact + 'hitscan' = Continious explosions (1 per frame) at impact point from time of projectile launch to simulated projectile impact.

 

I don't think placing a lobber will stick to people however. Or walls.. normaly...

However, if you made the (2nd) projectile use a havok model that was set to the static type.. (see: statics that don't move when you bump into them), I think it would be unable to move in the game world. Won't stick to people, but will 'stick' to walls (Or at least, Not move)

Will look wrong when it hits people mind you.

Link to comment
Share on other sites

Thank you!

 

It may not be a complete solution, but it's at least a start. I was actually reading some more detail about the more obscure parts of the explosion dialog earlier, but I didn't have the faintest idea what half of it actually did.

I've mostly done minor changes with the geck, so I didn't know about havok models yet. I'll have to play with that.

I'm not too worried about hitting actors, because none of my intended implementations were direct weapons.

 

I've never taken the time to fully understand Beth's script engine (too preoccupied with relevant languages like java and python), so I'll appreciate any pointers there too. Maybe a relevant sample script I can work with.

Edited by kurochou
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...