Original Source
- Original title: Check states using a common event script?
- Original author: SuperRedo
- Original date: October 23, 2024
- Source thread: https://forums.rpgmakerweb.com/threads/check-states-using-a-common-event-script.172766/
- Source forum path: Game Development Engines > Legacy Engine Support > RPG Maker MV Support
Summary
Hi, I'm trying to do something strange I suppose. I'm trying to set up a battle system which allows players to essentially build combos through only through menu navigation (like most old rpgs handle their combat) and I'm not sure how to lock the moves so that a move of each category cannot be used more than twice? I know of states allowing me to lock away certain skill types but I'm not sure how to apply these to the player. (Or if there's a better way.) I'm using the...
Archived First Post
I'm using the VCM Action Points and Action Order plugins to allow the user to strike multiple times. , gave the class I want this to work with have six skills (Light punch, medium punch, heavy punch, light kick, medium kick, heavy kick), each with their own skill type to seal away. I made statuses named light hit 1, light hit 2, medium hit 1, medium hit 2 and heavy hit, where light hit 1 isn't meant to lock away anything, light hit 2 locks both light punch and kick, medium hit 1 also locks both light attacks and medium hit 2 does the same while also locking away all medium attacks. Heavy hit is singular as heavy attacks are meant as forced combo finishers therefore locking away all forms of combat further and forcing the player to skip their turn.
My problem is that I don't really know scripting, so I don't know how to check for the current player's selection in the battle menu and then based on that being able to apply the appropiate state. I tried running this short script as part of an attack effect, but it doesn't work (the former tells me a is null and the latter says "cannot read property 'isStateAffected' of null")
if ( a.isStateAffected(11) ) { a.addState(12); } else { a.addState(11) }
if ( BattleManager.actor().isStateAffected(11) ) { BattleManager.actor().addState(12); } else { BattleManager.actor().addState(11) }
And even then it doesn't lock the option to use the light attack skills - since it doesn't iniciate the turn right away, it still lets me pick as many light attacks in a row as i want as long as I have the AP, which is not what I want.
Doing all this with an AP system already in place may seem a bit redundant but I intend for the player to be able to gain AP so their combos get more complicated as time goes on.
Thank you so much.
Downloads / Referenced Files
Log in, then follow the RPG Maker Developers Group to see these download links.
Log in to downloadCreator Claims / Removal
If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.
Replies (0)
No replies yet.
Topic Summary
Loading summary...