Help with a complicated event involving enemy skills.

I have a very complicated idea that I would like some guidance with implementing. I have no actual scripting experience, but would like to try.


I assume I need a conditional branch to start, I want to have an event where an enemy will check if another enemy is alive. (Check for Enemy Status?)

If it is alive, determines if it uses the skill.

Then after using the skill it checks which actor was hit. (Check ActorID)

And displays a reaction text. I want a few dialogue options but I know how to randomize dialogue.

The idea is the enemy grabs the other enemy and throws it at the PC resulting in their reaction.


Where do I even start with this.
at minimum, you'll need a number of troop events setting states to control the enemy action patterns.
then each enemy needs to have an action pattern that reacts to the states for skill selection.

it can be done that way but requires advanced eventing knowledge.
or you have to request a plugin that enables new options for skills, and with that sequence it most likely have to be a custom plugin...
It could be done with scripting, right.

Wouldn't the starting if else statement be to just check if enemy state is KO. This is a very specific event, Enemy 1 would check for Enemy 3 and Enemy 2 would check for Enemy 4.
By default, no, because enemies don't use the knockout state (you can see this in your game, when you kill an enemy they aren't sitting around as a corpse, they're removed from the battle).

You can get some ideas of how to work around it from this thread:

Anything can be done with script (Javasript), as that's the actual code of the game, but getting into that is automatically a higher level of complexity than events, which you can easily do inside the game. I always suggest people who don't have coding experience learn their way around events before starting to learn JS to accomplish things, as there's a larger learning curve there.
I might try to see what I can parse as script idea and post it later for advice.

So I believe I have the randomized dialogue figured out. I made an if else that if the character has the state it plays the dialogue. However the problem is the attack does not cause the event. If I inflict it from the troop screen it happens, but when the attack is used it doesn't activate.

Course I also call the event as well from the troops screen.

Here is a general idea of the common event and Troop effect that worked.


Common Event

If:Actor 1 is affected by State
Control Variables: Randomize 1..3
If : Randomize = 1
Text : Dialogue 1
End
If : Randomize = 2
Text : Dialogue 2
End
If : Randomize = 3
Text : Dialogue 3
If:Actor 2 is affected by State
Control Variables: Randomize 1..3
If : Randomize = 1
Text : Dialogue 1
End
If : Randomize = 2
Text : Dialogue 2
End
If : Randomize = 3
Text : Dialogue 3
End
End
Else
End


Troop

Change State: Actor 1, + State
Common Event: Common Event

Original thread: https://forums.rpgmakerweb.com/threads/help-with-a-complicated-event-involving-enemy-skills.134153/