Build 1.11 is underway of the Fantastic Worlds iOS Starter Kit. In this build, I’ll tackle adding multiple weapons for objects / enemies to use. This should make for some awesome Boss enemies! Along with multiple object weapons, we’ll also need to add a separate animation sequence associated with each new weapon. Obviously for an object to throw a knife that would require a different animation than firing a cannon. So we’ll need a separate firing delay property to release the weapon (slightly delayed from the beginning of the animation), and finally we’ll want a property to set how often the weapon fires. For this build, let’s start with three weapons and if you users find more are needed, I can oblige. All these properties will be stored in a dictionary for Objects…
- UsesSecondWeaponNamed – This is the key name from the Weapons dictionary of the second weapon the object will attack players with.
- UsesThirdWeaponNamed – This is the key name from the Weapons dictionary of the third weapon the object will attack players with.
- UsesSecondWeaponHowOften – A decimal value for the time between attacks. The minimum is 0.25.
- UsesThirdWeaponHowOften – A decimal value for the time between attacks. The minimum is 0.25.
- AnimationFireSecondWeapon – Functions exactly the same as the AnimationFire dictionary. Include the AtlasFile property, FrameOrder array and optional FPS property.
- AnimationFireThirdWeapon – Functions exactly the same as the AnimationFire dictionary. Include the AtlasFile property, FrameOrder array and optional FPS property.
- FiringDelaySecondWeapon – A decimal value used to delay firing the second weapon from the start of the AnimationFireSecondWeapon sequence.
- FiringDelayThirdWeapon – A decimal value used to delay firing the third weapon from the start of the AnimationFireThirdWeapon sequence.
- RandomizeFiringMultipleWeapons – A YES or NO value to set whether or not to randomly fire the weapons. You can combine this property with the WeaponFiringOrder array
- WeaponFiringOrder – This is an optional array you can add to define the firing order of the weapons. This gives you the option to fire the same weapon multiple times, then use a different weapon. The firing order will loop in the sequence you setup. The items in this array should match the values set for UsesWeaponNamed, UsesSecondWeaponNamed or UsesThirdWeaponNamed. With that said, you can include any Weapons dictionary name in here, and set more than 3 weapons to use for the object, but you won’t be able to use the properties associated with the primary 3 weapons (the animation dictionary, firing delay, etc). If the weapon name does not match UsesWeaponNamed, UsesSecondWeaponNamed or UsesThirdWeaponNamed, the AnimationFire dictionary, FiringDelay and UsesWeaponHowOften property will be used.
Buyers can get this Build in-progress at their usual download pages for the kit (new links were sent out yesterday).