struggling to get Galv's Substitute to work

Hello everyone,

I am currently trying to get Galv's Substitute script to work on battler's.

EDIT: I solved one problem but now I am getting another bug. See below.

I have a boss (enemy id: 39) and standard enemy soldier.

In my troops I have Boss (39) and two of the soldiers.

I have the substitute flag on on the soldiers and the <cover: 39> tag in the not box

I have set the Health % in the script to 100% as I want them to cover all the time.

But they do not cover. They only cover when the boss's health is low which is the standard function of the substitute flag.

Ok I got the cover to work but now I get an error:

What am I doing wrong?

galv error.png

EDIT 2: I removed the offending line and I am not getting this error, but have I potentially caused problems further down the line by doing this?
Did you start a new game after adding the script, or did you continue a saved game? 'undefined method ... for nil class' is a typical error that's caused by playing, saving, adding a script, then resuming your saved game.


Start a new one and see if the error happens.

Original thread: https://forums.rpgmakerweb.com/threads/struggling-to-get-galvs-substitute-to-work.37911/