object properties for a battle system

francisstokes
14 Mar 2005, 22:54
im sorry if im over posting but i really need some help here.I want to make a sword have a properties so it has 5 attack points,and then compare it with a variable(monsters defence points).
if someone can work this out for me then it would be great for my legend of zelda and runescape games.

Christopher
15 Mar 2005, 01:16
Nah, these forums could use a few more posts. Anyway to do that you’ll probably need to use object properties. Give the weapon a property of ‘weapon’ a ‘attack’ with a value of 5. Do the same with monsters, give them the property ‘monster’ and a defence property with a numeric value. You can refer to them in script with #(weapon):attack#, which would get the value of the weapon’s attack. Anything with brackets around them contains a variable name. The format is #object:property#.
Hopefully you can make some sense of that.:roll: