В одном скрипте Event Sensor, было именно $game_map.events[1].name, но тут это не работает.
А зачем открывать через маршал, если есть $game_map, где уже лежит текущая карта.
Вид для печати
В одном скрипте Event Sensor, было именно $game_map.events[1].name, но тут это не работает.
А зачем открывать через маршал, если есть $game_map, где уже лежит текущая карта.
Если это не срочно, я покапаю завтра. Просто на ночь программировать опасно...
В этом то и прикол, что там не карта лежит, а что-то другое. Это один из первых тупиков, на который я наткнулся. Попробуй к примеру достать от туда ид тайлсета или имя карты (имя вроде можно). Может и можно достать из $game_map всё, но надёжней из файла карты доставать
P.S. не плоди посты, дописывай старый с пометкой
добавил через x минут
Через маршал, это примерно так?
Код:@map = Marshal.load("Data/Map001.rxdata)
А как сделать чтобы событие было одноразовым???
После выполнения всех действий ставь ВКЛ Локальный переключатель А, а на следующей странице в условиях поставь Локальный переключатель А ВКЛ.
Подскажите, как скриптовой командой вызвать использование предмета
А можно сделать так, чтобы вещь была и оружием и при её использовании была магия?
Не совсем понял, т.е. когда бьешь оружием была магия? Если это так то такое было реализовано на VX.
Код:#===============================================================================
#
# Shanghai Simple Script - Weapon Attack Replace
# Last Date Updated: 2010.05.30
# Level: Normal
#
# If an actor's weapons contain skills and the actor attacks, the actor will use
# that skill instead as a replacement for the regular attack. Makes things like
# Fire Wands actually cast fire.
#===============================================================================
# Instructions
# -----------------------------------------------------------------------------
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ▼ Materials but above ▼ Main. Remember to save.
#
# <attack skill: x>
# <attack skill: x, x, x>
# This belongs in a weapon's notebox. x is the skill ID use for what skill will
# replace the regular attack when the actor attacks with the weapon. If more
# than one tag is used or the multiple x tag is used, then the regular attack
# will choose randomly which of the skills to use.
#===============================================================================
$imported = {} if $imported == nil
$imported["WeaponAttackReplace"] = true
#==============================================================================
# RPG::Weapon
#==============================================================================
class RPG::Weapon < RPG::BaseItem
#--------------------------------------------------------------------------
# # Attack Skills
#--------------------------------------------------------------------------
def attack_skills
return @attack_skills if @attack_skills != nil
@attack_skills = []
self.note.split(/[\r\n]+/).each { |line|
case line
when /<(?:ATTACK_SKILL|attack skill):[ ](\d+(?:\s*,\s*\d+)*)>/i
$1.scan(/\d+/).each { |num| @attack_skills.push(num.to_i) }
end
}
return @attack_skills
end
end
#==============================================================================
# ** Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# * Attack Skills
#--------------------------------------------------------------------------
def attack_skills
n = []
for weapon in weapons.compact do n += weapon.attack_skills end
return n
end
end
#==============================================================================
# ** Scene_Battle
#==============================================================================
class Scene_Battle < Scene_Base
#--------------------------------------------------------------------------
# * Execute Battle Action: Attack
#--------------------------------------------------------------------------
alias execute_action_attack_sss_weapon_replace execute_action_attack unless $@
def execute_action_attack
if @active_battler.actor? and not @active_battler.attack_skills.empty?
attack_skills = @active_battler.attack_skills
skill_id = attack_skills[rand(attack_skills.size)]
@active_battler.action.set_skill(skill_id)
execute_action_skill
else
execute_action_attack_sss_weapon_replace
end
end
end
#===============================================================================
#
# END OF FILE
#
#===============================================================================