AS2最终幻想型库存

时间:2016-06-20 08:29:48

标签: actionscript actionscript-2 inventory

编辑:因为我原本不清楚,我在制作带有堆叠耗材和可装备武器/装甲的AS2库存时遇到了麻烦,下面我的代码是包含我多年来一直在研究的值的阵列但是没有想出任何可行的工作方式。我正在寻找有关如何使数组保持这些值并使它们堆叠的帮助/想法

从2008年左右开始,我一直在制作Flash RPG。虽然我正在取得进展,但我最大的障碍是缺乏物品系统,这在AS2中变得越来越难以制造,因为所有伟大的程序员都在慢慢拒绝触摸闪光灯。用另一种语言重新开始已经为时已晚,我的主要文件是超过500mb .fla

老实说,我会支付任何可以解决这个问题的人,因为这个游戏有一些其他的问题,在解决之后我会帮忙。我会向那些可以用这些要求制作好物品系统的人扔掉50美元usd

  • 必须能够从不同物品类型的数据库中获取(消耗品,武器,装甲,配件)
  • 耗材必须能够“堆叠”(武器,盔甲,配件不需要堆叠)
  • 耗材必须能够直接影响hp / mp值(治疗等)
  • 武器护甲acc。必须附加值才能在装备时影响角色的属性(ex.strength +10或其他)
  • 物品必须能够买卖
  • 项目必须能够以文本显示(每个项目的动画片段不是必需的)
  • AS2
  • 以下几点:( 最终幻想 项目/广告资料示例)

文件大小不是问题,这些项目必须能够在游戏中呈现

如果可能,请使用“最终幻想7”(或任何FF游戏)作为项目系统应如何运作的基础。如果你能接近它,我会立即付钱给你。这是我正在处理的代码......

//ITEM SYSTEM
//this array will hold all items, inside of it, hopefully to be called inside of itself

//0.......1............2........3......4.... array element values
//name, description, effect, price, item type
_global.itemlist = [
//CONSUMABLES
["Sweetroot", "Restores 50 HP", 50, 100, "consumable"],
["Sugarroot", "Restores 100 HP", 100, 500, "consumable"],
["Candyroot", "Fully restores HP", 9999, 5000, "consumable"],
["Bitterroot", "Restores 50 MP", 50, 200, "consumable"],
["Sourroot", "Restores 100 MP", 100, 600, "consumable"],
["Tartroot", "Fully restores MP", 9999, 10000, "consumable"]
];
//0.......1............2....3....4...5....6.....7. array element values
//name, description, user, str, sta, def, mst, item type
_global.weaponlist = [
//WEAPONS
["Secred", "A mysterious zanbato with seals on the blade", "azul", 50, 0, 25, 10, "weapon"],
["Illuminite", "A thin weapon with a diamond rod for focusing light", "aseru", 50, 10, 10, 50, "weapon"],
["Fists", "A bare handed attack", "malforn", 50, 0, 55, 0, "weapon"],
["Kazeshini", "An oddly shaped blade for quick attacks ", "vayle", 20, 10, 25, 10, "weapon"],
["Yamato", "A katana with a blue hilt and a lightweight blade", "aoizi", 50, 20, 35, 50, "weapon"],
["Saleria", "A heavy scythe made from chenre absorbing crystal", "laava", 50, 20, 35, 50, "weapon"]
];
//0.......1............2....3....4...5....6...7 array element values
//name, description, str, sta, def, mst, price, item type
_global.armorlist = [
["Clothes", "light clothing", 0, 10, 10, 0, 500, "armor"],
["Armor", "plated armor", 0, 20, 20, 0, 5000,"armor"],
["Chain", "a thick chain for attack or defense", 20, 10, 10, 0, 500,"armor"],
["Shawl", "thin fabric worn by women", 0, 0, 5, 10, 7000,"armor"],
["Bodysuit", "a thick full body suit", 10, 20, 20, 0, 7500,"armor"],
["Spiked Araments", "armor covered in spikes, increases attack strength", 30, 0, 20, 0, 8000,"armor"]

];

//0.......1............2....3....4...5....6...7 array element values
//name, description, str, sta, def, mst, price, item type
_global.acclist = [
["Blade Ring", "raises attack", 30, 0, 0, 0, 500,"accesory"],
["Vigor Ring", "raises stamina", 0, 30, 0, 0, 500,"accesory"],
["Shield Ring", "raises defense", 0, 0, 30, 0, 500,"accesory"],
["Chenre Ring", "raises mental", 0, 0, 0, 30, 500,"accesory"],
["Knife Ring", "greatly raises attack", 120, 0, 0, 0, 50000,"accesory"],
["Vehemence Ring", "greatly raises stamina", 0, 120, 0, 0, 50000,"accesory"],
["Aegis Ring", "greatly raises defense", 0, 0, 120, 0, 50000,"accesory"],
["Aura Ring", "greatly raises mental", 0, 0, 0, 120, 50000,"accesory"]
];
  • 使用item[0][0];
  • 获取项目名称
  • 使用item[0][1];
  • 获取项目描述
  • 使用item[0][2];
  • 获取项目效果
  • 示例:如果要处理项目[0],则...(item[0] [0] = Secred( as Name )。然后item[0] [1] =拳头(作为说明),依此类推。 trace(item[0][4]);应该跟踪名称 Sweetroot

0 个答案:

没有答案