Help - Search - Members - Calendar
Full Version: [HELP] Change charset when certain weapon equipped???
RPG RPG Revolution Forums > Game Engines > RPG Maker XP Discussion
lightness20
I began developing a game not to long ago and below is a little bit about it

Planet of the Dead: Fascist Fury
A special team of highly intelligent historians and scientists venture deep into a Nazi German bunker hidden since WWII. It was uncovered recently when a Ex Nazi Scientist left the coordinates on a suicide note. What the Nazi Scientist didn't include on his note was what the deepest recesses of the bunker kept secret from the world for so many years...

Anyways, Ive been hunting for a script that simply switches the actors charset when a certain weapon is equipped.
Visual Equipment is far to complicated for my simple needs and wont work for the concept.

Here are to of my custom made charsets so you might get the idea of what im getting at (There not great but you can use them with credit given)






Thanks in advance for any help i may receive smile.gif
Tsukihime
QUOTE
Visual Equipment is far to complicated for my simple needs and wont work for the concept.


It actually doesn't work, or you aren't sure how to get it to work? Cause it sounds just like what visual equipment does.
lightness20
I dont want individual bits of armour i just literally want to change the charset i didnt think Visual Equipment did this?
Atoa
Why you simply don't make an event for that? you can check if the actor is using the equipment with common events and change the graphic according to the equipment.
lightness20
Im probably wron about this but inside visual equipment this is the method to overlay a peice of armor onto your sprit, if someone could just edit this for me so instead of layering it on top it would just change it entirely i would be satisfied

CODE
def add_equip(sprite,to_add,character)
@game_party = $game_party
@game_party = $game_party2 if $visual_equipment[0]
bmp = Sprite.new
bmp.visible =false
bmp.bitmap = RPG::Cache.character(to_add,@game_party.actors[character].character_hue)
color = bmp.bitmap.get_pixel(0, 0)
x=sprite.width
y=sprite.height
if $visual_equipment[0]
   x=x/4
   y=y/4
end
for i in 0..x
   for j in 0..y
     color_get=bmp.bitmap.get_pixel(i, j)
     if color_get!=color
       sprite.set_pixel(i, j ,color_get)
     end
   end
end


Not to mention that since all it dose is overlay a new sprite onto the old one, when i fire my luger (MR MOS ABS) the attack animation causes an error since with the luger on "Main Guy (Luger 9mm)" and my attack sprite is "Main Guy (Luger 9mm)_luger" and my main sprite is "Main Guy (Unarmed)" so it looks for "Main Guy (Unarmed)_luger"

EDIT: I evented the problem like suggested above smile.gif thanks .

Please do not double post within 24 hours. Also, put your code snippets in [code] tags. ~Redd
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.