I have a fking bug what crash my game, why works with Hammer and other no?
Hammer Not buggedCode:
///////////////////////////////////////////////////////////////////////////////////
//////////////////////////////// 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 BUGGEDCode:
///////////////////////////////////////////////////////////////////////////////////
//////////////////////////////// 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?