Enemy Kill Count as Variable
DescriptiontIntroduce my first script, so this script can count enemy killed as variable. So you not again add variable at troop events.
Prerequisites
None
How to Use
In the script. Just add above main section
Terms of Use
Free to use for both commercial and non-commercial games. Please give credit.
Credits
Sandy
FAQ
None so far
Changelog
- 0.1: First version.
The Script
#-----------------------------------------------------------------------------
# ENEMY KILL COUNT AS VARIABLE
# AUTHOR : SANDY
# VERSION : 0.1
# DATE : 9/6/2015
#-----------------------------------------------------------------------------
# EXAMPLE :
# I want to create monster type like insect as MONSTER_TYPE1
# so add the monster you want to MONSTER_TYPE1 = and the variable store at
# VARIABEL_1 = 2
#
# So you can make quest-killing or something like that
# Feel free to modify this script
# It's my first script ^^
# Enjoy!!
#-------------------------------------------------------------------------------
module SANDY
#MONSTER TYPE
MONSTER_TYPE1 =
MONSTER_TYPE2 =
MONSTER_TYPE3 =
MONSTER_TYPE4 =
MONSTER_TYPE5 =
MONSTER_TYPE6 =
MONSTER_TYPE7 =
MONSTER_TYPE8 =
MONSTER_TYPE9 =
#VARIABLE_TO STORE
VARIABLE_1 = 1
VARIABLE_2 = 2
VARIABLE_3 = 3
VARIABLE_4 = 4
VARIABLE_5 = 5
VARIABLE_6 = 6
VARIABLE_7 = 7
VARIABLE_8 = 8
VARIABLE_9 = 9
end
class Game_Enemy < Game_Battler
def perform_collapse_effect
$game_variables +=1 if SANDY::MONSTER_TYPE1.include?(@enemy_id)
$game_variables +=1 if SANDY::MONSTER_TYPE2.include?(@enemy_id)
$game_variables +=1 if SANDY::MONSTER_TYPE3.include?(@enemy_id)
$game_variables +=1 if SANDY::MONSTER_TYPE4.include?(@enemy_id)
$game_variables +=1 if SANDY::MONSTER_TYPE5.include?(@enemy_id)
$game_variables +=1 if SANDY::MONSTER_TYPE6.include?(@enemy_id)
$game_variables +=1 if SANDY::MONSTER_TYPE7.include?(@enemy_id)
$game_variables +=1 if SANDY::MONSTER_TYPE8.include?(@enemy_id)
$game_variables +=1 if SANDY::MONSTER_TYPE9.include?(@enemy_id)
case collapse_type
when 0
@sprite_effect_type = :collapse
Sound.play_enemy_collapse
when 1
@sprite_effect_type = :boss_collapse
Sound.play_boss_collapse1
when 2
@sprite_effect_type = :instant_collapse
end
end
end
Click to expand...
本贴来自国际rpgmaker官方论坛作者:wawodankurus处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/enemy-kill-count-as-variable.41002/
页:
[1]