Project X Forums



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

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: [SOLVED] SetSpriteOverride doesn't work
PostPosted: Tue Sep 27, 2011 1:13 pm 
Offline
User avatar

Joined: Sat Nov 27, 2010 12:59 pm
Posts: 346
Me, Undefined and Zed have examined the new EAX function called "SetSpriteOverride" and concluded that it doesn't work. I think that InitGraphic is the right place to put it, but however there is no sprite in game (blank), and no error is given too. Any solutions or tips?

EDIT: my fault. Nevermind :oops:


Last edited by StepS on Sun Oct 02, 2011 4:50 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: SetSpriteOverride doesn't work
PostPosted: Tue Sep 27, 2011 3:41 pm 
Offline
PX Developer

Joined: Mon Aug 17, 2009 12:01 pm
Posts: 91
Post code, i've tested that function before uploading the update, it worked..


Top
 Profile  
Reply with quote  
 Post subject: Re: SetSpriteOverride doesn't work
PostPosted: Tue Sep 27, 2011 5:00 pm 
Offline
Betatester

Joined: Wed Oct 07, 2009 8:21 pm
Posts: 73
Location: my home
Code:
CSprite* sprite;

void nameofyourscript::InitGraphic()
{
        CFile *f;
   f = GetAttachment("zomgpnglol.png");
   sprite = LoadSprite(f, 0, 1); // 0, 1 OR 1, 0 ? :<
        SetSpriteOverride(1, sprite);
}



Top
 Profile  
Reply with quote  
 Post subject: Re: SetSpriteOverride doesn't work
PostPosted: Tue Sep 27, 2011 5:29 pm 
Offline
PX Developer

Joined: Mon Aug 17, 2009 12:01 pm
Posts: 91
Are you sure that "nameofyourscript" is actual name of the script and zomgpnglol.png is valid PNG?


Top
 Profile  
Reply with quote  
 Post subject: Re: SetSpriteOverride doesn't work
PostPosted: Tue Sep 27, 2011 5:48 pm 
Offline
User avatar

Joined: Sat Nov 27, 2010 12:59 pm
Posts: 346
Entuser wrote:
Are you sure that "nameofyourscript" is actual name of the script and zomgpnglol.png is valid PNG?

yes, of course, the script itself is fine here (the above is just the template).
I have used it on the canister's sprite with 125 frames, if you need.

EDIT: I'm sorry, it's actually working. I was looking at the wrong sprite.
Please close the thread :oops:


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

All times are UTC


Who is online

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