- Joined
- Sep 20, 2016
- Messages
- 6
- Reaction score
- 0
- First Language
- Spanish
- Primarily Uses
Hello everyone! You see, I am creating a menu for the SaS IV (Or Saphire Action System) battle system, and the problem is that when creating the item window, these are not shown but the skill is. It is very problematic since I have tried to add the skills as an item in the categories, but I cannot get the skill to show next to the items in any way.
I put the "item.is_a?(RPG:Skill) on the category
This is the list created, the original is after the "Else". I have the problem that it shows me only the skills.
I would greatly appreciate if you could teach me a way to display Skills and Items within the same category.
I've only made these changes to the menu, so I can't find anything else to clarify.
I put the "item.is_a?(RPG:Skill) on the category
Ruby:
def include?(item)
case @category
when :item
item.is_a?(RPG::Item) && !item.key_item? or item.is_a?(RPG::Weapon) or item.is_a?(RPG::Skill)
when :key_item
item.is_a?(RPG::Item) && item.key_item?
else
false
end
end
Ruby:
def make_item_list
if skill = $game_party.members.any? { |actor| actor.skills.include?($data_skills[9]) }
@data = $game_party.all_items.select {|item| include?(item) }
@data = $data_skills.select {|skill| usable?(skill) }
@data.push(nil) if include?(nil)
else
@data = $game_party.all_items.select {|item| include?(item) }
@data.push(nil) if include?(nil)
end
end
I've only made these changes to the menu, so I can't find anything else to clarify.
