Page 1 of 1

How to Make Reflective Weapon

Posted: Mon Jun 19, 2017 12:39 pm
by DigaRW
I finally has found solution for my CM1 blaster. This weapon now has reflective effect.
To make the weapon with reflective effect (Reflect but still damage armor), use "OnDamageArmor" events on the weapon.
Like this:

Code: Select all

		(block (direction)
			; Randomize direction degrees for its basic reflection nature
			(setq direction (random 0 359))
			; Create weapon fire so makes them looks like reflected
				; We use same UNID with the weapon, but you can use additional virtual weapon as well
				; Spawn from gSource
				; Use sysVectorPolarOffset so the beam will not trapped inside ship
				(sysVectorPolarOffset gSource direction 1)
				; Use direction along with above so the beam will not reflect into odd direction
				; 100 is normal beam speed
				; Set Nil as it should not have target
			; Return full damage, if not, they may trigger a bug
For example, see Semesta I.G.C about CM1 weapon.

Note: If the weapon has passthrough ability, they may trigger more reflection.