Project X Forums



It is currently Fri Apr 19, 2024 12:56 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: How i changue the mine sprite?
PostPosted: Wed Apr 02, 2014 11:45 pm 
Offline
User avatar

Joined: Wed Apr 02, 2014 12:00 pm
Posts: 38
Location: Argentina
I Need to know how to changue the sprite for mine, pls help


Top
 Profile  
Reply with quote  
 Post subject: Re: How i changue the mine sprite?
PostPosted: Thu Apr 03, 2014 3:07 pm 
Offline
User avatar

Joined: Wed Apr 02, 2014 12:00 pm
Posts: 38
Location: Argentina
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
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: How i changue the mine sprite?
PostPosted: Mon May 05, 2014 2:23 am 
Offline
User avatar

Joined: Mon Dec 05, 2011 1:14 am
Posts: 242
Hello again Lucho.....

I made this lib a long time ago and it should help you change your mine sprites....The lib sets all mine sprites to the blue and red targets and can only detonate with longbow arrows.....it's actually pretty sweet....It's also got MapEd support so you can rig the level beforehand with targets.


Last edited by Curtis on Sun May 25, 2014 7:09 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: How i changue the mine sprite?
PostPosted: Thu May 22, 2014 9:13 pm 
Offline
User avatar

Joined: Sun Apr 08, 2012 1:09 pm
Posts: 425
Location: Ukraine, Kyiv
Lucho wrote:
I Need to know how to changue the sprite for mine, pls help

here is couple mistakes i found after reading your message (very fast genearl looked, but..)
so..
1. f = GetAttachment("slime.png");
- but name of attached file is "duse.png", isn`t?
2. skipper_aiming = LoadSprite(f, 3, 3);
written wrong.
should be:
- skipper_aiming = LoadSprite(f, 3, 0);
3. Make sure that your png is "saved as" in photoshop, with full range of colors. I mean not "published for web" with limited colors. In second case it will not work.

good luck.

_________________
Things to impress.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 96 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