This thing doesn't work why?
CSprite* Slime_aiming; // 1. rename as "YOUR_WEAP_aiming"
void Slime_spb::InitGraphic() // name of your sript in LibEditor
{ CFile* f; //
f = GetAttachment("slime.png"); // 3. (replace with your attached png of aiming sprite)
skipper_aiming = LoadSprite(f, 3, 3); // 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 = "Slime"; // 7. weap name: EXACT weap name.
sprite = Slime_aiming->Index; // 8. (replace with variable from 1.)
Params->hand_radius = -13.0;
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 = -11.5;
Params->hand_type = 1; // 1 = lower hand. 2 = normal hand. 3 - upper hand.
Params->hand_scale = 1.1;
Params->dont_rotate_with_angle = true;
Params->ang_if_static = 0.0;
Params->hand_ang_if_static = 0.4;
local WA = new WormSprite(weapName, sprite, Params);
}
}
}
And The sprite