Best way to determine which tile animpos is collidable?

Non-platform specific questions.

Best way to determine which tile animpos is collidable?

Postby Hblade » Tue May 07, 2013 9:00 pm

Hi, me again =D I was wondering what the best way to determine collidable tiles would be. It would be based off animpos (since thats how the tile editor works =D) Would you be able to do something like this?
Code: Select all
int CollidableTiles={1, 5, 12, 15, 25, 64};

as an example?

I need to know the most effective way =) because the tileset I'm using (The knight one :D) has a poop ton of tiles if divided by 32 (to make 32 x 32 size)
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Best way to determine which tile animpos is collidable?

Postby skydereign » Wed May 08, 2013 7:18 pm

One of the fastest ways is to just use an array, using values 0 and 1. That way you can use if(array[animpos]==1).
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Best way to determine which tile animpos is collidable?

Postby Hblade » Wed May 08, 2013 7:55 pm

Thanks
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron