Posts: 1,664
Threads: 391
Joined: May 2009
Hey there, not sure if anyone can help me with this. I'm rusty at scripting, and normally I would've been able to do this within mere minutes but I don't remember some of the variables. How do I get the bitmap width and height of the leading party member?
Edit (5/28/11 at 7:54pm): I forgot to mention "character sprites."
Edit 2 (5/28/11 at 7:58pm): I was focusing solely on RPG Maker XP when I posted this, but feel free to provide an answer for VX as well. I know VX has to be a lot more difficult since you have to deal with two types of charactersets: One involving a character in a set, the other involving eight in a set.
Posts: 11,267
Threads: 651
Joined: May 2009
Sent ya the code. Hope it works.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
Above are clickable links
Posts: 1,664
Threads: 391
Joined: May 2009
You should post it here, in case anyone else is feeling curious. Thanks a ton!
Posts: 11,267
Threads: 651
Joined: May 2009
Didn't save it. But it was practically a rip from Sprite_Character
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
Above are clickable links
Posts: 4,638
Threads: 554
Joined: Dec 2009
First of all I would like to say that possibly you already know the answer at some point in the last 15 months but I don't care about this. Perhaps someone else doesn't have a clue about how to get that like you did long time ago.
In XP the common width is 32 px and the height should be 48 px (whenever they are displayed on screen). Now my question should be if you're currently using characters that are bigger than default RTP hero characters like those nasty monsters already included there.
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.
My Original Stories (available in English and Spanish)
List of Compiled Binary Executables I have published...
HiddenChest &
Roole
Give me a free copy of your completed game if you include at least 3 of my scripts!
Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE,
RandomEnkounters XP,
KSkillShop XP,
Kolloseum States XP,
KEvents XP,
KScenario XP & Gosu,
KyoPrizeShop XP Mangostan,
Kuests XP,
KyoDiscounts XP VX, ACE & MV,
KChest XP VX & ACE 2016,
KTelePort XP,
KSkillMax XP & VX & ACE,
Gem Roulette XP VX & VX Ace,
KRespawnPoint XP, VX & VX Ace,
GiveAway XP VX & ACE,
Klearance XP VX & ACE,
KUnits XP VX, ACE & Gosu 2017,
KLevel XP,
KRumors XP & ACE,
KMonsterPals XP VX & ACE,
KStatsRefill XP VX & ACE,
KLotto XP VX & ACE,
KItemDesc XP & VX,
KPocket XP & VX,
OpenChest XP VX & ACE
Posts: 937
Threads: 101
Joined: May 2009
You'll have to call the character bitmap, then divide their width and height by 4.
Code:
bitmap = RPG::Cache.character(name, hue)
width = bitmap.width / 4
height = bitmap.height / 4