rondivu Posted December 24, 2010 Share Posted December 24, 2010 (edited) So I'm working on a mod for myself, I already know enough scripting to add items to myself in game through a quest that runs once. The weapon I've created (copied technically) is working properly and works the way I want it to, no problems. The issue is the scripting for creating a Kickback effect. What I mean is, a gun so powerful it literally knocks you off your feet. I got this idea from "the Noisy Cricket" gun from M.I.B., and created my own version. I have already created a script for it, scn AAAAmalgamKnockdownScript ref myselfshort MyStatEshort MyStatXshort MyStatSshort SKpow Begin OnFireset myself to getselfset MyStatE to myself.getactorvalue EnergyWeaponsset MyStatX to myself.getactorvalue Explosivesset MyStatS to myself.getactorvalue Strengthset SKpow to ((MyStatE / 25) + (MyStatX / 25) + (MyStatS / 4))If Skpow >= 3 returnElse set SKpow to ((1 - (SKpow / 3)) * 12) pushactoraway myself SKpowEndifEnd Obviously, this script is supposed to knock me back if I don't meet the requirements to wield the weapon. I haven't figured out how to get this effect to work. I attached it to the weapon (not Object Effect), but when I shoot it does nothing. I'm wondering if there is anything wrong with the script itself, if I implemented it incorrectly or otherwise missed something logical in the way the script should be working, or perhaps I need it to be an Object Effect? I will be further trying to figure it out, help would be appreciated. Edit: I've been trying to figure out how to implement this script effect. I figured it was a script that simply ran when used, but is it an object effect? Or an actor effect? Or does it need to be something else. All I know is that it is supposed to run when I shoot the gun, and then push me back because of the force of the hit. Still, I'm not sure if its supposed to be running on two separate blocks either. Edited December 24, 2010 by rondivu Link to comment Share on other sites More sharing options...
kert349 Posted December 25, 2010 Share Posted December 25, 2010 (edited) when u have:set myself to getself doesnt it refer to the gun? change it to: set myself to player for quick fix... i think.. Edited December 25, 2010 by kert349 Link to comment Share on other sites More sharing options...
rondivu Posted December 25, 2010 Author Share Posted December 25, 2010 (edited) Oh, I suppose that might work. Ill give it a shot!!! TY! Merry Xmas!!!! Edited December 25, 2010 by rondivu Link to comment Share on other sites More sharing options...
Recommended Posts