// paste all this code into your script. Replace names with your weap names, adjust parameters (u can use my templates from forum) and you ready to go. require p_sprite_builder; /////////////////////////////////////////////////////////////////////////////////// //////////////////////////////// ANIMATE WORM /////////////////////////////////// //```````````````````````````````````````````````````````````````````````````````// CSprite* toxic_paintBall_aiming; // 1. rename as "YOUR_WEAP_aiming" CSprite* toxic_paintBall_bullet; // 2. rename as "YOUR_WEAP_bullet". //WormSprite* toxicPaintBallWS; //WeapSprite* toxicPaintBallws; // void paintball_animations_script::InitGraphic() // name of your sript in LibEditor { CFile* f; // f = GetAttachment("toxic_paintball_aiming.png"); // 3. (replace with your attached png of aiming sprite) toxic_paintBall_aiming = LoadSprite(f, 1, 0); // 4. (replace with variable from 1.) f = GetAttachment("paintball_bullet.png"); // 5. (replace with your attached png of bullet sprite (if it differs from aiming sprite)) toxic_paintBall_bullet = LoadSprite(f, 1, 0); // 6. (replace with variable from 2.) } // // override void CTurnGame::Message(CObject* sender,EMType Type,int MSize,CMessageData* MData) { super; // if (Type == M_FRAME) { // if (gframe == 1) { // local weapName; local sprite; ///////......................................................................\\\\\\ // CWormAnimParams* Params = new CWormAnimParams; weapName = "Toxic PaintBall"; // 7. weap name: EXACT weap name. sprite = toxic_paintBall_aiming->Index; // 8. (replace with variable from 1.) Params->hand_radius = -6.0; Params->hand_rotation = 1.0; // 10. rotate worm`s hand, if u need: -1.0...1.0; Params->hand_radial_rotation = 0.9; Params->weap_radial_rotation = 0.0; Params->weap_rotation = 1.0; Params->weap_radius = 0.0; Params->hand_type = 1; // 1 = lower hand. 2 = normal hand. 3 - upper hand. Params->hand_scale = 0.8; ///// I recommend don`t change it. ////// // // Params->zplane = 10.0; // this is def value; // Params->scale = 1.0; // this better dont change. 1.0 is default value. // ///////``````````````````````````````````````````````````````````````````````////// local WA = new WormSprite(weapName, sprite, Params); } // } // } // //_____________________________ END OF WORM ANIMATION ___________________________// /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////// ANIMATE BULLET ////////////////////////////////// //```````````````````````````````````````````````````````````````````````````````// override void CMissile::Message(CObject* sender,EMType Type,int MSize,CMessageData* MData){ super; if (Type == M_FRAME){ // if (weap->CheckName("Toxic PaintBall")) { // 11. replace with your weap name if (toxicPaintBall_anim) { // 12. replace "toxic_paintBall_anim" with variable from 15. local sprite = toxic_paintBall_bullet->Index; // 13. replace "toxic_paintBall_bullet" with variable from 2. WeapSpriteParams* Params = new WeapSpriteParams; new WeapSprite(this, sprite, Params); weap->launch.anim.spriteIndex = 0; toxicPaintBall_anim = false; // 14. replace "toxic_paintBall_anim" with variable from 15. } } } // } // override CMissile::CMissile(CObject* parent,CWeaponLaunch* ldata,CShootDesc* sdata){ super; // toxicPaintBall_anim = true; // 15. rename variable to YOUR_WEAP_anim } // // // //____________________________ END OF BULLET ANIMATION __________________________// /////////////////////////////////////////////////////////////////////////////////// /*override void CWorm::Message(CObject* sender,EMType Type,int MSize,CMessageData* MData) { super; if (Type == M_FRAME) { if (CurWeapon->CheckName("Toxic PaintBall")) { if (ObjState == WS_AIMING || ObjState == WS_SETPOWER) //DoAnimParticleEffects( sprite, Rad, RelX, RelY, lifeTime, animSpeed, veloMin, veloMax, startAlpha, endAlpha, windFactor, startSize, endSize, angleMin, angleMax, randomMotion, grav); DoAnimParticleEffects(608, 1, 20, -13, 20, 0.03, 1.0, 7.0, 255, 255, 0, 1.0, 0.5, 0.0, 2.31, 0.0, 1.0); } } }*/