I'm not sure if this thread belongs here or somewhere else, so sorry if it has to be moved.
I have a skill which 'ejects' someone from the battle permanently. I originally gave it to an enemy, but would now like to be able to give it to an ally as well. However, I obviously don't want this to be used on a boss.
I thought that I would use switch 167 as a conditional in the damage formula box. This is my "this is a boss battle" switch and is used for several things I want to happen automatically in such encounters. The structure I thought to use was
Is switch 167 ON?
if 'yes' have a message appear saying the enemy is too strong for this skill
if 'no' then the damage formula comes into play.
What I have at the moment is:
I have also tried $gameMessage.add'The enemy....
The message does not appear with either add or push.
The message does not appear whether I use either single or double quote marks
The skill continues but does not eject the enemy anyway.
I have tried different combinations of brackets, but if that's the problem I didn't hit on the right combination.
Could someone give the real code for getting the message to appear and (if and only if you have the time) explain to me why my brackets are wrong (if they are) so that I don't repeat the same error next time.
Thank you
I have a skill which 'ejects' someone from the battle permanently. I originally gave it to an enemy, but would now like to be able to give it to an ally as well. However, I obviously don't want this to be used on a boss.
I thought that I would use switch 167 as a conditional in the damage formula box. This is my "this is a boss battle" switch and is used for several things I want to happen automatically in such encounters. The structure I thought to use was
Is switch 167 ON?
if 'yes' have a message appear saying the enemy is too strong for this skill
if 'no' then the damage formula comes into play.
What I have at the moment is:
Code:
if ($gameSwitches.value(167)===true { $gameMessage.push‘The enemy is too powerful for this skill’} else {(b.addState(1); if ($gameParty.isAllDead()) BattleManager._escapeType = 'lose'; b.hide(); 0 )}
I have also tried $gameMessage.add'The enemy....
The message does not appear with either add or push.
The message does not appear whether I use either single or double quote marks
The skill continues but does not eject the enemy anyway.
I have tried different combinations of brackets, but if that's the problem I didn't hit on the right combination.
Could someone give the real code for getting the message to appear and (if and only if you have the time) explain to me why my brackets are wrong (if they are) so that I don't repeat the same error next time.
Thank you