ELI'S PROFILE
Eli
0
Search
Filter
[VX Ace] Minor Window_BattleLog Issue
author=Quasi
As for the subject.class, subject alone is the class (it's Game_Actor or Game_Enemy), and when you add .class your reading that classes def for class, which happens to be the database class ( wow that sounds confusing lol. ) which is why I was asking why you were doing subject.class.is_a? when it should just be subject.is_a?
Uh...
Well, wow. Turns out I'm just objectively terrible at reading comprehension - I didn't actually realize you cut out the .class bit in the sample code you've provided in your earlier posts, doing that did the trick (and you nicely explained why in that quoted post). Curse you, sleep deprivation.
Thanks for the help, and for bearing with me, me not picking up that bit must've made things much more difficult for you. Everything's working fine now. Cheers!
[VX Ace] Minor Window_BattleLog Issue
author=Quasi
if subject.is_a?(Game_Actor)
gender = subject.actor.gender
else
gender = subject.enemy.gender
end
Apologies if I've been unclear about this in my previous posts. It's this bit right here that I can't seem to make work, at least not as a part of Window_BattleLog (or display_use_item, to be precise).
is_a?(Game_Enemy) never returns true. is_a?(Game_Actor) doesn't return true either; in addition, attempting to print subject.class when the subject in question should be an actor results in some weird override kicking in and producing the actor's database class (that is, Monk, Paladin, ...) which is the only thing that is_a? actually returns true for (thus the if clause in my OP, obviously it's not gonna be in what I'm actually trying to put together).
I'm hoping that someone might be able to help me figure out why is_a?(Game_Enemy) (or Game_Actor) doesn't work because I'm at a total loss about that.
It's not some custom script I'm using either by the way, already checked that.
[VX Ace] Minor Window_BattleLog Issue
That's what I figured too, but it doesn't work. puts (or print) subject.class results in either RPG::Class:(address) or Game_Enemy being printed into my console; is_a? can detected RPG::Class but not Game_Enemy (or Game_Actor, for that matter).
The Screenshot Topic Returns
author=LockeZ
What do you mean by "index all your graphics"?
The old RPG Makers (well, the 2k and 2k3 versions) didn't accept any graphics you threw at them unless they'd been reduced down to 256 colors beforehand. There was an upper limit on how many colors the game could display simultaneously that was a little higher, but it was rather irritating as well if you're the sort who enjoys using lightmaps and the like.
author=LockeZ
I like this screenshot. The left monitor seems to be a little too far back on the desk but the graphics look great and are used well.
Thanks for the feedback. I'll make sure to look into that monitor's placement - now that you mention it, I agree that it looks a little off compared to the other stuff on that table.
[VX Ace] Minor Window_BattleLog Issue
Hey guys, I'm trying to determine which type of object (enemy or actor) a combatant is and what their ID is whenever they use a skill (the idea's to determine those things and then use them to access a note tag that defines them as male, female or neutral, so their battle messages can be properly personalized - "Alex fires his pistol" rather than "Alex fires their pistol" or simply "Alex attacks").
I've run into somewhat of a problem here, though. The code below tells me that enemy objects are of the Game_Enemy type when I print subject.class, though the if clause doesn't return true. It does return true whenever an actor uses a skill but only because it detects their class as being of the RPG::Class variety - apparently, class functions differently for actors than it does for everybody else.
Any idea on how I can properly distinguish between friend and foe? Hope you'll be willing to bear with me and help me out. I've got some experience with Lua and C but I'm bloody new to Ruby and the VX Ace's pre-existing code in general.
I've run into somewhat of a problem here, though. The code below tells me that enemy objects are of the Game_Enemy type when I print subject.class, though the if clause doesn't return true. It does return true whenever an actor uses a skill but only because it detects their class as being of the RPG::Class variety - apparently, class functions differently for actors than it does for everybody else.
Any idea on how I can properly distinguish between friend and foe? Hope you'll be willing to bear with me and help me out. I've got some experience with Lua and C but I'm bloody new to Ruby and the VX Ace's pre-existing code in general.
class Window_BattleLog < Window_Selectable
#--------------------------------------------------------------------------
# * (Title)
#--------------------------------------------------------------------------
def display_use_item(subject, item)
if item.is_a?(RPG::Skill)
print "subject.class: "
puts subject.class
if subject.class.is_a?(Game_Enemy)
puts "Enemy object detected."
end
if subject.class.is_a?(RPG::Class)
puts "Class object detected."
end
$game_variables[2] = "placeholder"
$game_variables[3] = "placeholder"
$game_variables[4] = "placeholder"
add_text(subject.name + item.message1)
unless item.message2.empty?
wait
add_text(item.message2)
end
else
add_text(sprintf(Vocab::UseItem, item.name, subject.name))
end
end
end
The Screenshot Topic Returns

Recently stumbled across an old hard drive containing all my old RPG Maker stuff. Don't think I've touched any of it since around the time the RMXP came out - the screenshot above is from one of my old projects, actually. Kinda feeling like restarting it, probably gonna port it over to the VX Ace though since scripting seems nice and the hassle of upscaling everything strikes me as much less annoying than that of having to index all your graphics.
The light cast by the TV is animated by the way, can't really be bothered to make a webm though. Kinda dissatisfied with the lack of overlap between the computer desk and the window sill, too, probably gonna fix that if I do go ahead and port stuff. What do you guys think?
Pages:
1













