sniperwolfmgs2000 Posted June 21, 2011 Share Posted June 21, 2011 Just out of curiosity, is there some kind of function or command that would allow a projectile to drop or spawn an item when it impacts solid surfaces? Link to comment Share on other sites More sharing options...
Skevitj Posted June 21, 2011 Share Posted June 21, 2011 (edited) Not too sure, but OnTrigger may work. It's probably impossible to determine if the object hit was ground at any rate, will probably trigger on any collision. Edited June 21, 2011 by Skevitj Link to comment Share on other sites More sharing options...
rausheim Posted June 21, 2011 Share Posted June 21, 2011 You should be able to script an effect for the weapon. I did it for FO3 where I had a grenade that turned into a Spider bot. Link to comment Share on other sites More sharing options...
sniperwolfmgs2000 Posted June 21, 2011 Author Share Posted June 21, 2011 (edited) Would you mind sending an example or something of a script like that? Haven't been able to figure what functions or commands i need to do that yet. Edited June 21, 2011 by sniperwolfmgs2000 Link to comment Share on other sites More sharing options...
Skevitj Posted June 22, 2011 Share Posted June 22, 2011 (edited) 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 June 22, 2011 by Skevitj Link to comment Share on other sites More sharing options...
sniperwolfmgs2000 Posted June 22, 2011 Author Share Posted June 22, 2011 (edited) 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 June 22, 2011 by sniperwolfmgs2000 Link to comment Share on other sites More sharing options...
Skevitj Posted June 23, 2011 Share Posted June 23, 2011 (edited) 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 June 23, 2011 by Skevitj Link to comment Share on other sites More sharing options...
sniperwolfmgs2000 Posted June 23, 2011 Author Share Posted June 23, 2011 All right, i'll try to figure this out eventually, that stuff you suggested doesn't seem to work (yet?) But anyways, thanks a lot for the help with the projectile spawning thing, really helped me out a lot. :) Link to comment Share on other sites More sharing options...
Recommended Posts