Jump to content

Ground Impact script


Recommended Posts

Actually, just ignore what I posted previously, I was just having a look then and I think you can actually do it without the need for a script.

 

IE:

Grenade -> WeapGrenadeFrag

Projectile -> GrenadeFragProjectile

Explosion -> Set to "Trigger on Impact"

GrenadeFragExplosion

Set force/damage/other fields to what you want (probably 0 or NONE)

Set "Placed ImpactObject" to object you want spawned

 

 

Don't know if it will work as you want, but it gives you the ability to place NPC's in the middle of a grenade's explosion, so it should be able to place pretty much any object. All ranged weapons fire a "Projectile" so just duplicate/edit an existing projectile and assign it to the gun. If you need it to place objects with a relative orientation/position to the impact object, that may be a little more difficult since I doubt it will be possible to trace back what the grenade actually hit, and even then determining the orientation of the plane it contacted with is impossible. If you want relative position / maybe absolute orientation then that will be easy enough.

Edited by Skevitj
Link to comment
Share on other sites

OMG! I can't believe i missed that damn Placed ImpactObject dropbox the whole time i've been screwing with the projectile data 0_o Thx a ton man, got it up and running. I have one more small question though. I now have my Xbow bolts deploy frag mines or C4 where ever they hit, but i don't seem to get any experience for killing anything with them. Is there any script or something that sets the explosive to being placed by you at all, like a set ownership thing or something?

 

P.S. Kudos to you Skevitj :D

Edited by sniperwolfmgs2000
Link to comment
Share on other sites

Yeah, this is getting back to the problem I noted at the end of the post, in that it's (probably) impossible to determine what actually spawned the object and trace that back to get the shooter. I haven't played around with it, but setting the crossbow bolt projectile such that the crossbow is the "Default Weapon Source" and then setting the explosion to "Push Explosion Source Ref Only" may trace it back automatically, but I doubt it.

 

C4 isn't something which is common in the game world anyway, so it may just be possible to script the C4 charges such that OnLoad they set their ownership to the player. If that same thing is done for frag mines though, it means none (even enemy ones already in the world) will trigger when you walk over them since they'll consider you friendly.

EDIT: I'm not sure how many of the mines already in the world don't have an owner, but it may be possible to use the logic that any which are spawned without an owner are assigned to the PC.

 

As a worst case scenario, it may be possible to ignore the "Place Impact Object" box and instead just use the "Enchantment" tab to place it manually, as long as you can somehow access the bolt to get the owner so you can pass that on manually.

Edited by Skevitj
Link to comment
Share on other sites

  • Recently Browsing   0 members

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