SkyEmerald Posted July 30, 2017 Share Posted July 30, 2017 Hi there, I was looking at the bloatfly syringe script and trying to figure out how I would change it to 100% spawn bloatfly on fire. Anyone have any ideas? Any suggestions would be greatly appropriated! Many thanks. :) :) Scriptname damageBloatflyLarvaPoisonSCRIPT extends ActiveMagicEffect ;the bloatfly we're spawningOBJECTREFERENCE PROPERTY bloatfly AUTO ;the explosino to play when it comes outEXPLOSION PROPERTY flyExplosion AUTO ACTOR victim EVENT OnEffectStart(Actor akTarget, Actor akCaster) ;save off the victimvictim = akTarget ENDEVENT EVENT OnDying(Actor akKiller) ;play the explosion, spawn the flyvictim.placeAtMe(flyExplosion)victim.Dismember("Torso", TRUE, TRUE) ENDEVENT Link to comment Share on other sites More sharing options...
kitcat81 Posted July 30, 2017 Share Posted July 30, 2017 (edited) The script spawns a bloatfly OnDying. The effect lasts 30 seconds so if you kill the npc before the effect is worn off , it will spawn a bloatfly. I`m not sure what you want to achieve. If you want it to spawn a bloatfly as soon as you hit an npc with the syringe , you move the spawning part to the EffectStart : Scriptname damageBloatflyLarvaPoisonSCRIPT extends ActiveMagicEffect EVENT OnEffectStart(Actor akTarget, Actor akCaster) akTarget.placeAtMe(flyExplosion) akTarget.Dismember("Torso", TRUE, TRUE) ENDEVENT Just don`t change the exsting script, better create your own effect with a new script. Edited July 30, 2017 by kitcat81 Link to comment Share on other sites More sharing options...
SkyEmerald Posted July 31, 2017 Author Share Posted July 31, 2017 The script spawns a bloatfly OnDying. The effect lasts 30 seconds so if you kill the npc before the effect is worn off , it will spawn a bloatfly. I`m not sure what you want to achieve. If you want it to spawn a bloatfly as soon as you hit an npc with the syringe , you move the spawning part to the EffectStart : Scriptname damageBloatflyLarvaPoisonSCRIPT extends ActiveMagicEffect EVENT OnEffectStart(Actor akTarget, Actor akCaster) akTarget.placeAtMe(flyExplosion) akTarget.Dismember("Torso", TRUE, TRUE) ENDEVENT Just don`t change the exsting script, better create your own effect with a new script. Heya, thanks for that :P I'll give it a go. I just wanted to spawn an animal when the gun is fired, was trying to use the bloatfly script as a base for that. xD Scripts are like a foreign language to me at the moment.. Once again, thanks a lot! :) Link to comment Share on other sites More sharing options...
ethanv131313 Posted August 4, 2017 Share Posted August 4, 2017 You could add a custom projectile with an explosion that will spawn the bloat fly, like how the synth relay grenades work, but this will spawn a bloat fly every time you hit something with the weapon, not just when you kill something. Link to comment Share on other sites More sharing options...
Recommended Posts