Jump to content

Finding Code


Salmanius

Recommended Posts

I was looking into making a creating a weapon through the GECK that could allow me to shoot some, and on impact put a live grenade into their pocket that would blow them apart several seconds later. I realize i could just blow them apart with a very concussive or explosive weapon, but i am looking to make them explode after a short delay kinda simulating it stuck a explosive bullet/dart/etc in them. After a little snooping around the GECK, I realized it may be possible with adding a script to the weapon, yet i dont know where to get/find it. If anyone knows the script, where to get it, or an easier way to achieve my goal i would greatly appreciate it. :thanks:
Link to comment
Share on other sites

i don't think so. closest thing i've come to seeing anything like this would be a mine gun on nexus files. it shoots multiple mines but none stick to npcs. i like what your talkin bout though. reminds me of a cool resident evil gun i used to have.. was a mine rifle lol.. would stick to the enemy for about 2 seconds before exploding.
Link to comment
Share on other sites

I am not to good at scripting but wouldn't something like Begin OnHit (this option still exists I think) and target.additem Ammunition of your choice?
Link to comment
Share on other sites

An OnHit block will only trigger when an actor is hit if it is in the script attached to the actor, so this approach won't work. AddItem alone also wouldn't work, as adding ammunition to an actor does nothing other than give them more ammunition, which is not what is desired here.

 

Having a projectile stick to an actor might be possible as of the latest version of the GECK. In v1.5 of the GECK, the option exists to give an explosion a "Placed Impact Object", which is an object that appears at the location of an explosion. With this, you should be able to create an ammunition with an invisible explosion that, when it explodes, replaces itself with another object that is scripted to stick to whatever it hits, and explode after a certain amount of time.

 

In order to do this, you'll want to use something along the lines of this - Forced Relative Orientation. The idea being that you use an OnTriggerEnter block that gets the RefID of the first reference to enter the object's trigger zone, and then use the principles in that forced relative orientation script to stick your reference to whatever it hit. It won't look perfect by any means, but if the timer is only short then it shouldn't be a problem.

 

In order to make it explode after a certain amount of time, the easiest way would probably be to give the object some destruction data, and make it deal itself enough damage that it will be destroyed after a short amount of time.

 

Cipscis

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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