Jump to content


[how to] Make forceshields in ZH


  • You cannot reply to this topic
6 replies to this topic

#1 Sgt. Rho

    Kerbal Rocket Scientist

  • Project Leader
  • 6870 posts
  • Projects: Scaring Jebediah.

Posted 13 November 2006 - 09:26

Here ill show 2 ways to make forceshield in ZH,requires some coding skills.


1st way:

Make a new weapon with the following data:
Name: ForceShield Weapon1

AceptableAimDelta = 360 ;turret doesnt need to turn to the target to fire

PrimaryDamage = 999999 ;so it kills everything which aproaches^^

Damage type = Unresistable ;there is no protection against it

DelayBetweenShots = 0 ;it can stop infinite missiles...

Now, give your unit the point defenselaser update and set the weapon as ForceShield Weapon.

2nd way:

Make a new weapon with the following data:

ForceShield Weapon2

PrimaryDamage = 999999

DamageType = Unresistable

DelayBetweenShots = 0

Now give your unit a FireWeaponUpdate and set the used weapon to FirceShield Weapon2 (by this way,it will deactivate if it fires the normal weapon

#2 Kris

    <Custom title available>

  • Project Team
  • 3825 posts

Posted 13 November 2006 - 11:41

Sorry Helge for hijacking your thread :/ But the Point defense Method is not a good way to make a shield, might work but will have sideeffects....the ECM tank logic will work with little or no sideeffects....i think :D

Make a weapon with a "AcceptableAimDelta = 360" so it will turn when targeting stuff and then give it a PrimaryDamage of 99999 and give it the weapon the "SUBDUAL_UNRESISTABLE" Damage type so every thing that gets near the tank gets disabled and last give it a Reload Time of zero and give it a "AntiSmallMissile = Yes" and a "AntiBallisticMissile = Yes" and last a "AntiProjectile = Yes" so every weapon that get near gets killed

Example Code:
Weapon Shieldshit
  PrimaryDamage	   = 9999.0
  PrimaryDamageRadius = 0.0
  AttackRange		 = 65.0 
  DamageType		  = SUBDUAL_UNRESISTABLE
  DeathType		   = EXPLODED
  RadiusDamageAffects   = ENEMIES NEUTRALS;should NOT Have ALLIES or your stuff get killed too.
  WeaponSpeed		 = 999999.0; dist/sec 
  DelayBetweenShots   = 0; time between shots, msec
  ClipSize			= 0		 &#59; how many shots in a Clip &#40;0 == infinite&#41;
  ClipReloadTime	  = 0		 &#59; how long to reload a Clip, msec
  AcceptableAimDelta  = 360; Don&#39;t need to turn at all.
  AntiSmallMissile	= Yes
  AntiProjectile	  = Yes
  AntiBallisticMissile  = Yes
  FireFX = FX_MicrowaveTankEmitter&#59;can be placeholder but can be replaced if desired 
End


If you want to spice up the weapon and give it somekind of special effects just like the Microwave have just add a "Firefx" in the weapon.

after that you must define the "SUBDUAL_UNRESISTABLE" damage too the armor of the unit you want to get affected by it ;

Example Code:
Armor ProjectileArmor		 
  Armor = DEFAULT		 25%	
  Armor = FALLING			0%	 
  Armor = LASER		   100%	
  Armor = SMALL_ARMS   25%	 
  Armor = MICROWAVE	  0%
  Armor = GATTLING		25% 
  Armor = HAZARD_CLEANUP  0%
  Armor = KILL_PILOT		0% 
  Armor = SURRENDER	   0%
  Armor = SUBDUAL_MISSILE   100%
  Armor = SUBDUAL_VEHICLE	  0%
  Armor = SUBDUAL_BUILDING	0%
  Armor = WATER					  200%
  Armor = SUBDUAL_UNRESISTABLE  200%
End


and last if you want to replicate the ECM tank's missile jammer ability... just add the "FireWeaponUpdate" on the unit and in the "Weapon" tag define the Shield Weapon (eg: like the "Shieldshit" i made) so when the tank is idle it will turn on the shield but when attacking it will turn off the shield so it can be killed.

Example Code:
  Behavior = FireWeaponUpdate ModuleZOMGShield!_01
	Weapon = ECMTankMissileJammer
	ExclusiveWeaponDelay = 1000; If we fire a real weapon, we turn this module off for this long
  End

Edited by Chris, 13 November 2006 - 11:51.








#3 Jordan

    Crazy Modder

  • Gold Member
  • 2704 posts
  • Projects: C&C Crazy Mod Leader

Posted 13 November 2006 - 20:11

I've done the pdl version, and it works for me.

Also, another juicy little tidbit of info. If you want to make the shield sphere shaped, like a giant translucent blue ball, make the radius of the weapon the same as the sphere's radius, but maybe about 10 shorter. They use the same measurements.

If the sphere radius is 220, make the PDL radius about 210.

Also, you might want to add a minimum range to it, just to help balance it out. What this will do is create a "wall" of shield coverage, and once the enemy drives through that wall, they can attack normally.

For example:

Sphere radius: 220

Max Weapon Range: 210

Minimum Weapon Range: 200

I haven't tested the minimum and maximum ranges part, but in theory, it should work.

Edited by Jordan, 13 November 2006 - 20:13.

C&C Crazy Mod Version 0.55
^^^^The True Crazy Mod Starts Here^^^^
Posted Image

#4 Sgt. Rho

    Kerbal Rocket Scientist

  • Project Leader
  • 6870 posts
  • Projects: Scaring Jebediah.

Posted 13 November 2006 - 21:42

It works, ask detonato,he should know it.....^^

#5 Qcumberhd

    Casual

  • Member
  • 61 posts

Posted 17 June 2008 - 19:56

how did does the min and max range work???? i tried and it didnt work:(

#6 Stinger

    .

  • Gold Member
  • 8156 posts

Posted 17 June 2008 - 20:31

Do not post in old threads!

But seeing as this is a modding related question, and seems genuine, I'll allow this to remain open.

However, next time you are in desperate search of an answer, please try sending a private message to the original poster, who may be able to help you out.

Edited by Stinger, 17 June 2008 - 22:00.


#7 Kris

    <Custom title available>

  • Project Team
  • 3825 posts

Posted 04 July 2008 - 02:29

View PostQcumberhd, on 18 Jun 2008, 3:56, said:

how did does the min and max range work???? i tried and it didnt work:(


Weapon "weaponname"

*extra crap*

AttackRange = "your defined default (or max) range. eg: 3232"

MinimumAttackRange = "your defined minimun range. eg: 232"

End











1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users