I want to make it so characters attack allies while knocked out (acting more like confusion than being ''knocked out''), so I imagined all I would need to do was change the restriction from ''can't move'' to ''attack an ally'', but when I tested it out, it still behaved like normal. Do I need to change anything else? Is it like a hardcoded effect or something like that?
To clarify, playable characters should attack their allies, not enemies. I'm assuming both enemies and PCs use the same death state from the fact that you set up enemy death messages from it, despite the fact that enemies just disappear and to my knowledge can't be revived, so I don't know if that's even possible.
Thanks in advance for the help.
There is specific coding in the engine to do things based on state 1. If you want different behaviour, you will need a script.
Moved to: RGSS3 Script Requests
So you want actors to attack allies when they are confused? Knocked out usually means they are dead. But I think you mean unconscious. If the actor is unconscious then they would not be able to attack anyways.
I think what you need to a modification to the confusion state so that actors will only attack allies. By default they attack any random target.
No, I want actors to attack allies when they're knocked out/dead. Similar to when they're confused, which is why I made the comparison. Modifying the restriction to make them attack only allies works just fine for other states, it's specifically the death state that's giving me trouble. Sorry for the misunderstanding.
Then I can only think of autobattle for the characters that are dead.
I don't know if it will be easy to do that.
I see that VE Automatic battlers looks like it can do what you want.
Set the conditions on the death state.
<strategy: attack, priority 0, random>
friend
</strategy>
why not make an "immortal" state and stack it with "confusion" + "anti heal" + "berserk"
-immortal: immune to death and 0 hp left (it should be in states list by default when you start a new project, copy it!)
-confusion:
-anti heal: make all healing ability to 0 including item recovery
-berserk: auto battle
It would be better to do something along the lines of proxydef's suggestion, as editing how the death state works would also affect all your enemies as well. Though giving actors immortal states would mean that you would never get a game over, and you would never finish a battle where all actors are dead because they would just carry on hitting each other.