Ruby/RGSSx questions that don't deserve their own thread

@ mlogan - dunno about yanflys scripts, sorry.

Anyway - Congrats on getting the 1000th post in this topic ^_^
That's 1001 🙂 BoluBolu had 1000.
:/

Really? Does the initial post not count as number 1?

On my screen it says in the top right of my post as #1001 and says yours in #1002

Either way...

Congrats to someone lol ^_^
on mine mlogan's also says 1000...


anyway... hmmmm... I think it might have the option to use a different windowskin, but I ain't sure
Mine says 1000 as well. So... thanks?

Anyway, if not through Yanfly's script, is there anyway to temporarily disable the windowskin? (And I can start a thread about this if need be.)
You could use thisto allow for a switch to enable/disable a new windoskin - then make the new skin look the way you need and turn on the switch ^_^

Spoiler
#===============================================================================module shit#===============================================================================  #-----------------------------------------------------------------------------  #  #-----------------------------------------------------------------------------  Switch_ID = 5  #-----------------------------------------------------------------------------  #  #-----------------------------------------------------------------------------  New_Windowskin = "Window"  #-----------------------------------------------------------------------------  #  #-----------------------------------------------------------------------------end#===============================================================================class Window_Message < Window_Base#===============================================================================  #-----------------------------------------------------------------------------  #  #-----------------------------------------------------------------------------  alias :init_shitshit :init  #-----------------------------------------------------------------------------  #  #-----------------------------------------------------------------------------  def initialize    init_shitshit    check_if_windowskin_switch  end  #-----------------------------------------------------------------------------  #  #-----------------------------------------------------------------------------  def check_if_windowskin_switch    return unless $game_switches[shit::Switch_ID]    self.windowskin = Cache.system(shit::New_Windowskin)  end  #-----------------------------------------------------------------------------  #  #-----------------------------------------------------------------------------end

Edit:

I am using particles, when I change scene the particles refresh, even if they are the same particles....

What would be the best way to make the new particles begin movement from the position the old ones stopped?

would I simply clone my particles array into a variable somewhere and then when initializing the scene, call that variable to set the particles? or would there be a better way?
I guess that deserves it's own thread since I don't think particles exist in the default RGSS... or do they? anyway, if the particles won't move and should still be visible, it's better to not refresh them (if by refresh it destroys then recreates them)
The way I usually do particles is to spawn a lot (as many as I need) on initial load, then keep them in an inactive particles array (keeping them in memory). When I need to use them, I fetch them from that array into an active particles array used for render iteration; when done with them, instead of removing them (and letting the garbage collector omnom them), I make them not render by passing them back to the inactive array.

I might've misunderstood your question here though 😛
haha - maybe there's a hidden post somewhere that's being counted for me and not for you. Interesting ... although completely unrelated to the topic 😀
The way I usually do particles is to spawn a lot (as many as I need) on initial load, then keep them in an inactive particles array (keeping them in memory). When I need to use them, I fetch them from that array into an active particles array used for render iteration; when done with them, instead of removing them (and letting the garbage collector omnom them), I make them not render by passing them back to the inactive array.

I might've misunderstood your question here though 😛
Yep, this is pretty much exactly what I was thinking of doing. It already works in the way that 'when not visible it hides until being forced back onto the screen - without any disposal'... But when the scene ends, everything is disposed in the terminate process.

So if my screen shows 50 parties, there will always be 50 parties in memory, no more, no less.

But when I change scene - to a new scene which uses the same particle images, the particles reset. All I want is to stop them from being disposed and then rather than initialize new particles, simply continuing the party from the previous scene.

Pretty sure just putting them into an array while the scene changes would be fine...
Hi all I'm back! Of course with a question haha.. And thanks for Shaz for answering my earlier question.
Now I want to know how we can obtain a character state, I mean let's say Eric is poisoned or even death, then how do I obtain the data if Eric is death?
My goal is make something like if else from that condition but via script. Something like :
if Eric is death then do this else do that

I just need a simple code that perhaps showed me that Eric is death by triggering event which inside it, I had write a script call. But the problem is I don't know the code to do this.. can someone help me?I know this can be done via eventing, but I have a reason to do it via script.

Thanks all, peace.
 
Any of these will return true if the chosen actor is under the influence of state id.

Code:
$game_actors[ACTOR_ID].state?(STATE_ID)$game_parry.members[MEMBER_POSITION].state?(STATE_ID)
Any of these will return true if the chosen actor is under the influence of state id.

$game_actors[ACTOR_ID].state?(STATE_ID)$game_parry.members[MEMBER_POSITION].state?(STATE_ID)
Wow it's perfect, eh but what if I want it like this

if Eric is "normal" I mean he isn't affected by any state, what's the code? I tried with nil it gives me false eventhough Eric is not affected by any state..
Code:
$game_actors[ID].states.size > 0
So I have need to initialize a variable as a hash using the following:

$game_variables[56] = Hash.new{|h,k|h[k]=[]}

Why would this cause an error when trying to save into an open slot? It won't show an error, it simply won't save. If you try to save on an occupied slot, it deletes the old one but doesn't save, so I assume it tries to process it but hits a roadblock.
You can't make a Hash like that, however. A new hash is not enumerable, because it has no content. What are you trying to do with this part?

Code:
{|h,k| h[k]=[]}
I couldn't tell you the specifics, I'll have to wait for my scripter to get online and explain it in detail. I'm just trying to get some things done while he's out.

It's being used to store enemy health in specific events and in specific maps.
Actually, scratch that, you can actually do it that way to make sure unknown values don't return nil, but an empty array. So it ought to work by default. Do you have any script that modifies the save process, perhaps?
Not that I can think of. I tried it on a new project and it denies the save the same way. Try it out in a script call in an empty project~
Yeah, I tested it now, and I see that this doesn't work. You can assign hashes normally ($game_variables[56] = {}, for instance) and save, so my guess is that it can't save hashes that are made this way that include default assignment. I'm not actually sure why, but I'm guessing it's because Marshal (module that saves to files) can't save that kind of Hash using the dump method. But maybe someone else can give you a better answer 🙂

Original thread: https://forums.rpgmakerweb.com/threads/ruby-rgssx-questions-that-dont-deserve-their-own-thread.150/