Making a skill with random effects

So I decided to make the black effect change the enemy into a less harmful creature. Is there a way I could get the skill to change the enemy, but be the target I chose instead of the indexed number?
So I decided to make the black effect change the enemy into a less harmful creature. Is there a way I could get the skill to change the enemy, but be the target I chose instead of the indexed number?
I thought we already did that?

last_target_by_ctbolt-d6mx88a.png


If you are referring to the state that is going to be added, that will use the scope of the skill.

Currently that would be the enemy that you select...

I'm not so sure I understand what you are asking...
We did already do that, but this is not the force action. It is Enemy Transform. Enemy Transform doesn't have a "Last Target" option.
We did already do that, but this is not the force action. It is Enemy Transform. Enemy Transform doesn't have a "Last Target" option.
lol, ahh I see, so it doesn't... well I just made a simple script for you that will allow you to Transform the last target. 😉

Demo: Click here to download

As always please let me know how it works for ya. 🙂
I copied over the script, now how would I utilize it?
I copied over the script, now how would I utilize it?
Check the demo. Look at the common event that is used by the skill. 😉

In a script box use "ct_enemy_transform(-1, <new_enemy_id>)" with no quotes & replace <new_enemy_id> with whatever the enemy id is you want it to transform into. 🙂

I did put a comment by the script call in the common event. Saying basically the same thing. 😛
I changed the common event script to ct_enemy_transform(-1, Harmless Slime) for example, and it gives me an error. Here it is: Script 'Game_Interpreter' line 1411: SyntaxError occured. unexpected tCONSTANT, expecting keyword_do or '{' or '(' ct_enemy_transform(-1, Harmless Slime).
I changed the common event script to ct_enemy_transform(-1, Harmless Slime) for example, and it gives me an error. Here it is: Script 'Game_Interpreter' line 1411: SyntaxError occured. unexpected tCONSTANT, expecting keyword_do or '{' or '(' ct_enemy_transform(-1, Harmless Slime).
Lol, the ID of the enemy, not the name. 😉 Like 1 is Slime, 8 is Scorpion.
This is a neat idea, and I'm curious if this can be done on a enemy to do states instead. I tried doing it the traditional way and the ability is far too over powered. Is it possible to implement state changes on the target foe with this method without specifying the foe? (The skill hits 1 random enemy can deal 0 - 240 damage and can implement 1 random state or should anyway.) Just curious, I've been playing with it so far and it doesn't seem to set up correctly, what's the branch I'd use to get the desired results?

Original thread: https://forums.rpgmakerweb.com/threads/making-a-skill-with-random-effects.18097/