A friend and I are making a game that includes a Points system that can be used to interact with the game throughout a day.
For example, you can only have 10 and will deplete with each use.
But now we're stuck, we can't seem to a switch turn on even with '$gameActors.actor(x).hp <= y' through Common Events > Conditional Branch and now we can't move forward. Are we missing something?
Can you show us a screenshot of the event you've made? It's hard to say what you've done wrong without seeing what you've done.
and usually such things are handled without scripts - you have direct access to the numbers through control variable game data after all.
so it has to be something in your logic steps that makes your events go wrong.
Double agree. From your description, there's no reason to be using any scripting instead of the included event commands, so please show what you actually have and describe exactly how the event is being called and what it should do.
If you are in battle, you don't need any script - troop events have the condition HP= whatever automatically in default (where in the example above the turn number is)
No battles either though! I just used HPs as an indicator for how many turns you'll have for the 'day'.
To put it simply: we just want an energy-based system where you can only interact with certain things for x times. (which is 10 for us)
You may want to nip back and revisit some tutorials/the instructions, especially those focused on events. They're the primary way you achieve things in RPG Maker, so it's important to understand the different kinds and how they work. There shouldn't be any hunches involved 😉
Just a Common Event like you show above doesn't do anything unless it's called with a command or from an item/skill.
But if you change the Trigger to Parallel, that means it runs continuously for as long as the triggering switch is on, which sounds like exactly what you want.
Make sure to put a Wait command at the bottom of some amount, so that it's not needlessly running every single frame.