Hello again! ><
Was looking to see if there's a battle check that can be used to make a common event I have for a move behave differently in/out of battle, to avoid any mess ups.
Any advice?
The correct syntax to look for this is: $gameParty.inBattle()
This will return 'true' if you're in battle and 'false' if you're not, so if you're using it inside a Common Event (rather than inside a plugin or a battle formula), just copy and paste that into the "Script" option of a Conditional Branch event command ("Script" is on page 4 of the Conditional Branch dialog).
How is the common event called and what does it do?
Yes, there are ways to check if you are on the battlescreen or on the map (they're even using different interpreters for event handling on map and on battlescreen), but because they are using different interpreters there are differences and we can help better if we know what you want to do instead of how you want to do it.
Any skill can either have its own element, or be set to use the element assigned to the actor (usually by weapon, but can be state or whatever as well). "normal attack" is the setting that tells the skill to use the element on the actor data.
Ant the attack element trait is the trait that assigns the element to the actor by whatever trait list you decide on.
Hmm one more thing has cropped up, although its more of an annoyance for the time being.
In battle, I need to be able to target an ally - but in the menu, since the common event calls items rather than actors, selecting an actor seems pretty odd :c. Is there any way to get the best of both worlds or should I dig for a more complex solution.
Nt that its bothering me just yet XD.
standard solution for targeting with common events is to have the skill itself apply a new and invisible "target" - state that does nothing, then have the common event check every actor for the state to find the one targeted.
an attack is a skill - and yes, you need the skill to choose a target for this to work. But you would need that anyway, and there should be no problem to set that on the skill that calls the common event.
But yes, a skill can be set only to one case - you would have to set it to select a target outside of battle even if that is only needed inside battle.
Anything else will require a custom plugin or a completely different approach
Thanks, I guess I'll put up with it for now and do some tweaking as I go. At least the feature is functional even if it's not optimised. 🙂.