じ☆ve冰风 发表于 2026-8-2 16:36:46

CANUSE (actor command)

This script enables ATTACK, GUARD and ITEM actor commands in battle based on actor id. you can disable lines and functions as you need.

WHY?

In my games, basic attacks are a free SKILL attacks.

in one of my games, an untrained character wouldn't know how to gurd effectively enough to do so.

In my current game, only one person can use items since they are the only one that can hold them in their "bag", disallowing other to use them.

                Code:       
#------------------------#CANUSE commands#Modifies what actor commands appear in battle based on#by DeiLin#------------------------module CANUSE#leaving [] below will disallow all actorsCANATTACK = [] #actor ids that can use attack commandCANGUARD = [] #actor ids that can use guard commandCANITEM = [] #actor ids that can use item command#Skill isn't included since it's based on RPG Maker VX ACE traitsend#------------------------#Don't modify below unless you know what you are doing.#------------------------class Game_Actor < Game_Battlerattr_reader   :actor_idendclass Window_ActorCommand < Window_Commandattr_reader   :actorattr_reader   :actor_iddef make_command_list    return unless @actor    add_attack_command if CANUSE::CANATTACK.include?(actor.actor_id)   add_skill_commandsadd_guard_command if CANUSE::CANGUARD.include?(actor.actor_id)    add_item_command if CANUSE::CANITEM.include?(actor.actor_id)endend




本贴来自国际rpgmaker官方论坛作者:deilin处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/canuse-actor-command.3692/
页: [1]
查看完整版本: CANUSE (actor command)