Project X Forums



It is currently Thu Mar 28, 2024 1:17 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: A bug with Sprite Builder
PostPosted: Sat Jun 07, 2014 12:58 pm 
Offline
User avatar

Joined: Wed Apr 02, 2014 12:00 pm
Posts: 38
Location: Argentina
I have a fking bug what crash my game, why works with Hammer and other no?

Hammer Not bugged

Code:
///////////////////////////////////////////////////////////////////////////////////
////////////////////////////////  ANIMATE WORM  ///////////////////////////////////
//```````````````````````````````````````````````````````````````````````````````//
CSprite* Hammer_aiming;                                                 //   1.   rename as "YOUR_WEAP_aiming"

//WormSprite* toxicPaintBallWS;
//WeapSprite* toxicPaintBallws;
                                                                                 //

void spb_hammer::InitGraphic()                                  //   name of your sript in LibEditor
{   CFile* f;                                                                    //
    f = GetAttachment("spb_hammer.png");                             //    3.  (replace with your attached png of aiming sprite)
    Hammer_aiming = LoadSprite(f, 1, 0);                                //    4.  (replace with variable from 1.)
}                                                                                //
                                                                                 //
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 = "Hammer Lucho";                                               //    7.  weap name: EXACT weap name.
     sprite = Hammer_aiming->Index;                                     //    8.  (replace with variable from 1.)
     Params->hand_radius = -14.5;                                                 
     Params->animate = true;
     Params->hand_rotation = -0.0;                                                //    10. rotate worm`s hand, if u need: -1.0...1.0;
     Params->hand_radial_rotation = 0.0;
     Params->weap_radial_rotation = 0.0;     
     Params->weap_rotation = 0.5;
     Params->weap_radius = -12.5;
     Params->hand_type = 1;     // 1 = lower hand. 2 = normal hand. 3 - upper hand.
     Params->hand_scale = 1.3;               ///// I recommend don`t change it. //////   //                               
                    ///// 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("Hammer Lucho")) {                                   //   11. replace with your weap name
         if (Hammer_anim) {                                              //   12. replace "toxic_paintBall_anim" with variable from 15.
              local sprite = Hammer_aiming->Index;                      //   13. replace "toxic_paintBall_bullet" with variable from 2.
              WeapSpriteParams* Params = new WeapSpriteParams;
              Params->animate = true;
              new WeapSprite(this, sprite, Params);             
              weap->launch.anim.spriteIndex = 0;
              Hammer_anim = false;                                       //   14. replace "toxic_paintBall_anim" with variable from 15.
         }                                                                     
     }                                                                                                                                                     
  }                                                                              //
}                                                                                //
override CMissile::CMissile(CObject* parent,CWeaponLaunch* ldata,CShootDesc* sdata){
super;                                                                           //
  Hammer_anim = true;                                                    //   15. rename variable to YOUR_WEAP_anim


Remote Missile BUGGED


Code:
///////////////////////////////////////////////////////////////////////////////////
////////////////////////////////  ANIMATE WORM  ///////////////////////////////////
//```````````````````````````````````````````````````````````````````````````````//
CSprite* remote_aiming;                                                 //   1.   rename as "YOUR_WEAP_aiming"

//WormSprite* toxicPaintBallWS;
//WeapSprite* toxicPaintBallws;
                                                                                 //

void spb_remote::InitGraphic()                                  //   name of your sript in LibEditor
{   CFile* f;                                                                    //
    f = GetAttachment("remote_missile.png");                             //    3.  (replace with your attached png of aiming sprite)
    remote_aiming = LoadSprite(f, 2, 0);                                //    4.  (replace with variable from 1.)
}                                                                                //
                                                                                 //
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 = "Remote Missile";                                               //    7.  weap name: EXACT weap name.
     sprite = remote_aiming->Index;                                      //    8.  (replace with variable from 1.)
     Params->hand_radius = -14.5;                                                 
     Params->animate = true;
     Params->hand_rotation = -0.0;                                                //    10. rotate worm`s hand, if u need: -1.0...1.0;
     Params->hand_radial_rotation = 0.0;
     Params->weap_radial_rotation = 0.0;     
     Params->weap_rotation = 0.5;
     Params->weap_radius = -12.5;
     Params->hand_type = 1;     // 1 = lower hand. 2 = normal hand. 3 - upper hand.
     Params->hand_scale = 1.3;               ///// I recommend don`t change it. //////   //                               
                    ///// 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("Remote Missile")) {                                   //   11. replace with your weap name
         if (remote_anim) {                                              //   12. replace "toxic_paintBall_anim" with variable from 15.
              local sprite = remote_aiming->Index;                    //   13. replace "toxic_paintBall_bullet" with variable from 2.
              WeapSpriteParams* Params = new WeapSpriteParams;
              Params->animate = true;
              new WeapSprite(this, sprite, Params);             
              weap->launch.anim.spriteIndex = 0;
              remote_anim = false;                                       //   14. replace "toxic_paintBall_anim" with variable from 15.
         }                                                                     
     }                                                                                                                                                     
  }                                                                              //
}                                                                                //
override CMissile::CMissile(CObject* parent,CWeaponLaunch* ldata,CShootDesc* sdata){
super;                                                                           //
  remote_anim = true;                                                    //   15. rename variable to YOUR_WEAP_anim



Code:
PX 0.8.0 crash log
Latest called hooks :
Stack analysis : 0x9AD808C5
Stack analysis done
Generating EAX CrashDump...Saving EAX CrashDump...Done!


What is this Pyro?


Attachments:
File comment: Remote Missile Bugged
Remote Missile.png
Remote Missile.png [ 669 Bytes | Viewed 7190 times ]
File comment: Hammer SPB Not Bugged
spb_hammer.png
spb_hammer.png [ 3.65 KiB | Viewed 7190 times ]
Top
 Profile  
Reply with quote  
 Post subject: Re: A bug with Sprite Builder
PostPosted: Sat Jun 07, 2014 1:02 pm 
Offline
User avatar

Joined: Wed Apr 02, 2014 12:00 pm
Posts: 38
Location: Argentina
PD:I need this weapon to release 4.0 version of my pack


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 20 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Skin by Lucas Kane