Posted: Mon Mar 17, 2008 12:52 pm Post subject:
Shields Broadcasting
Subject description: and Protecting Units.
Greetings,
I am trying to make the Shield Generators like in Stargate Atlantis, i have made it so that you can activate the shield and it protects the building "Shield Emmiters" however, i am trying to make it so that it also protects any buildings and units that are within the shield. I figured it was the option "Broadcast" on the Invisabity cloak. Here is the coding below,
as it said ShieldBodyUpdate can't use BroadcastObjectFilter. for your question, if you want the units receive shield forever, just look at the nod stealthfield specialpower codes. QUICK_EDIT
As ravage said, the broadcast filter is exclusively for the Stealth code. Other modules can´t handle it.
Now for your problem, finding a fitting solution mainly depends on how you want it to function ingame.
The shield of the scrin faction is a discrete entity for each object. It adds a fixed amount of hitpoints with a specific armor type to the object it belongs to - thus, it cannot share its status with other objects like a shield projected from a single source to protect everything in its vicinity would.
So if you don´t mind your generator only activating individual shields, you can try this:
Create a new AttributeModifier that does nothing else but set the Status SHIELDBODY_ENABLED. Look at the AlienPhaseField AttributeModifier if you need a template. Add an AttributeModifierAuraUpdate to your shield and have it propagate your newly created AttributeModifier. See the Nod Confessor as a template (set AffectHordeMembersOnly to false though). Finally, add the ShieldBodyUpdate and ShieldBody to every unit you want to be able to receive the shield.
For having a shield that is projected over an area, there are two things I can think of:
1. Do it the way PDLs worked in Generals. Create a new weapon that can only target projectiles (best to do via the AntiMask), hits instantly and set reload time, clipsize etc. to mimic shield health and recharge time. If you want the shield only to be able to intercept enemy fire at it´s border(like the shields in EAW), set the minimum range close to the maximum range. This will however require you to make every weapon that the shield should be effective against into a projectile based one.
2. Make the shield a separate object with KindOf WALL_SEGMENT that is spawned by the shield generator (see the storm column as an example). Change every weapon that the shield should be effective against to have WALLS in its ProjectileCollidesWith attribute. QUICK_EDIT
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum