Dummyweapon tag and ENABLE_WEAPON get constant
Posted: 28 Sep 2006, 12:32
First the dummyweapon tag: When it is set the weapon goes through normal aiming and fire procedures but does not create a projectile when fired. It'd exist for scripts to take notice of and do whatever the scripter wants (e.g. spawn a bunch of explosions in the direction of the target). Obviously dummy weapons would still have values for lineofsight, ballistic or beamlaser so the script can get different aim values if you want a weapon that has to aim in front of the enemy or shoot in an arc.
Secondly, a get/set constant ENABLE_WEAPON: Just what the name suggests, a bitfield that determines what weapons are enabled. A disabled weapon is treated as nonexistent by the unit's AI, does not get a target, aim or fire. It could even be removed from the range value listed for the unit. The purpose is simply to allow scripts to notify the engine when a weapon isn't going to fire so Spring doesn't just think the weapon isn't done aiming yet. That way units with weapons that get disabled won't try to keep shooting them at anything. Concrete example: I've got infantry that can be switched between an assault rifle and an anti-air missile launcher. Obviously they can't shoot at planes with the rifle and can't shoot at infantry with the launcher. However they still think they can target those things since they don't know that the other weapon isn't just busy aiming. I'm also limiting ammo so I'd like a unit that's out of ammo to stop engaging enemies at all.
Secondly, a get/set constant ENABLE_WEAPON: Just what the name suggests, a bitfield that determines what weapons are enabled. A disabled weapon is treated as nonexistent by the unit's AI, does not get a target, aim or fire. It could even be removed from the range value listed for the unit. The purpose is simply to allow scripts to notify the engine when a weapon isn't going to fire so Spring doesn't just think the weapon isn't done aiming yet. That way units with weapons that get disabled won't try to keep shooting them at anything. Concrete example: I've got infantry that can be switched between an assault rifle and an anti-air missile launcher. Obviously they can't shoot at planes with the rifle and can't shoot at infantry with the launcher. However they still think they can target those things since they don't know that the other weapon isn't just busy aiming. I'm also limiting ammo so I'd like a unit that's out of ammo to stop engaging enemies at all.