- 6
- Posts
- 8
- Years
- Seen Jul 2, 2019
I'm a programmer who hasn't really fiddled around with Ruby before starting some Pokemon Essentials stuff as a fun side-project. But I'm having issues making the Trainer Card screen behave quite how I want.
Rather than making it so that after the StartScene does its thing, the text shows up, the text just straight up doesn't appear at all. I seem to be seeing the same issue with other types of variable, such as float and int, where they simply don't update when I try to modify them, but stay at the value they were first set at. This goes for different operators, too, such as "+=".
I figure you've got to do something different to update a variable in Ruby, but I can't seem to figure it out. Issues like this are always bound to crop up when you first start a new language, I suppose.
def pbStartScene
@drawText=false
#Do some stuff that takes some time, and all the other trainer card stuff
@drawText = true
def pbDrawTrainerCardFront
#Do stuff as normal until...
if @drawText==true
pbDrawTextPositions(overlay,textPositions)
end
Rather than making it so that after the StartScene does its thing, the text shows up, the text just straight up doesn't appear at all. I seem to be seeing the same issue with other types of variable, such as float and int, where they simply don't update when I try to modify them, but stay at the value they were first set at. This goes for different operators, too, such as "+=".
I figure you've got to do something different to update a variable in Ruby, but I can't seem to figure it out. Issues like this are always bound to crop up when you first start a new language, I suppose.