Arbitrary Strings in Damage Display - Printable Version +- Save-Point (https://www.save-point.org) +-- Forum: Material Development (https://www.save-point.org/forum-8.html) +--- Forum: Scripts Database (https://www.save-point.org/forum-39.html) +---- Forum: RPGMaker XP (RGSS) Engine (https://www.save-point.org/forum-116.html) +---- Thread: Arbitrary Strings in Damage Display (/thread-2761.html) |
Arbitrary Strings in Damage Display - RPG Advocate - 03-02-2008 Arbitrary Strings in Damage Display
by RPG Advocate saved from Phylomortis.Com Introduction This script allows you to display any string you like as damage in battle. If you want to construct a string, perhaps to show MP damage, all you need to do is append the integer portion of the string to the rest of the string by using a statement like "game_actors[0].damage = "MP" + "$game_variables[1].to_s" to convert the integer contained in the variable to a string. The "xxx" in the code below needs to be replaced with one of the following three expressions: ⢠$game_actors[x] - Actor with ID x. ⢠$game_party.actors[x] - Actor in position x. ⢠$game_troop.enemies[x] - Enemy in position x. Remember that positions start at index 0. Code: $xxx.damage = "String" |