Detection Weapon

Tutorial for Red Alert 2 RA2, Yuri's Revenge YR

Avatar of Nighthawk

Nighthawk

Category: Code
Level: Beginner
Created: Wednesday July 29, 2009 - 5:26
Updated: Wednesday July 29, 2009 - 5:28
Views: 4403
Summary: Create a weapon which acts as a detection alarm or sensor.
Rating
  • Staff-
  • Members-
  • Average-

0 votes

Here's an easy-ish way to make a detection weapon. It can be given to anything and will make a warning sound whenever an enemy unit or infantry enters it.

Here goes, I've added comments to some tags for new modders who don't know what the half of this means (it wouldn't be a tutorial if I didn't explain some things).

              
Code
[Detector]
Damage=1;can also be 0, tells program that this doesn't do proper damage.
ROF=170 ;fiddle with this to change the sound rate.
Projectile=Invisible ;unless you want a visible marker or something.
Warhead=DetectionWH
Report=WarningAlarm ;you can change this if you want, this is the alarm sound that is in the game already.
Speed=100 ;instant detection
Range=14 ;change this to suit your detector's range.


Now you need to code the Warhead, remember to add this to the [Warheads] list
xx=DetectionWH ;where xx is the no. after the last in the list

              
Code
[DetectionWH]
Verses=5%,5%,5%,5%,5%,5%,0%,0%,0%,5%,0% ;so it can detect infantry, vehicles and terror drones, but not buildings or spawned missiles.


That's all you really need there, but you can add AnimList=xxxx to the warhead to get it to play an animation over the detected unit. I suggest either WAKE1 or RING. Alternatively Anim=xxxx on the weapon itself will play an animation on the detecting structure.
WAKE1 is an anim used with the Squid and RING is the anim it plays behind the mouse when you tell something to move.

Return to top