Sunday, September 18, 2011

r1056 - Custom Items

  • For scripting Vec3's can be created via Vec3(x, y, z) and have a few helpful functions on them
    • add(ScriptVec3 other)
    • subtract(ScriptVec3 other)
    • double length()
    • double distance(ScriptVec3 other)
    • scale(double s)
  • Custom Items can now be created by creating a property file and placing it in the items folder of your map.  Each property is assigned by propertyName=propertyValue and they are listed below
    • itemID - ID to use for this item
    • name - Name of the item
    • iconIndex - Index into the item.png to use for the icon
    • maxItemDamage - Maximum amount of damage this item can take
    • maxStackSize - The max amount this item can be stacked
    • onItemUsedScript - Name of the script file to use for when the item is clicked with
      • itemUsed is filled with the item being used on script execution

No comments:

Post a Comment