View Single Post
Old 04-07-2003, 04:47 PM   #8 (permalink)
CopyKat
Senior Member
 
Join Date: Mar 2003
Location: Netherlands
Posts: 139
Default

Uhhm...that's not that hard...

I have created a code that summons a crusader by plane (get parachuted) when you build it from the WarFactory.

The way it works (I'll be brief), is that you actually build an invisible object. That object destroys itself after a certain time (time it takes to summon the crusaderdrop). The object summons the cursaderdrop, basically the way the supply dropzone does (with a timedelay).

As such, this code is basically EXACTLY what you need. You'll just have to modify the C4 charges of Burton with the code presented to get a new code that'll do what you want... Well, you actually only need to fill in the proper names, but that's it (and you'll just have Burton attach the C4 "beacon" perhaps?).

Quote:
CommandButton stuff (regular C4 code)
CommandButton Command_ColonelBurtonTimedDemoCharge
Command = SPECIAL_POWER
SpecialPower = SpecialAbilityColonelBurtonTimedCharges
Options = OK_FOR_MULTI_SELECT NEED_TARGET_ENEMY_OBJECT NEED_TARGET_NEUTRAL_OBJECT
TextLabel = CONTROLBAR:TimedDemoCharge
ButtonImage = SSTimedDemo
CursorName = PlaceTimedCharge
InvalidCursorName = PlaceChargeInvalid
ButtonBorderType = ACTION ; Identifier for the User as to what kind of button this is
DescriptLabel = CONTROLBAR:ToolTipUSAFireBurtonTimedDemo
UnitSpecificSound = ColonelBurtonVoiceModeTimedCharge
End

SpecialPower stuff
SpecialPower SpecialAbilityColonelBurtonRemoteCharges
Enum = SPECIAL_REMOTE_CHARGES
ReloadTime = 0 ; in milliseconds
PublicTimer = No
End

FactionUnit stuff (custom)
Object CrusaderDrop_InvisibleMarker
; ***DESIGN parameters ***
VisionRange = 0.0
EditorSorting = SYSTEM
KindOf = NO_COLLIDE IMMOBILE UNATTACKABLE

; *** ENGINEERING Parameters ***
Body = ImmortalBody ModuleTag_02
MaxHealth = 1
InitialHealth = 1
End

Behavior = DeletionUpdate ModuleTag_04 ; Not LifetimeUpdate, since I can't die. This will DestroyObject me.
MinLifetime = 1000 ;MUST be at least equal or higher than the delay given by the OCL beneath
MaxLifetime = 1000 ;(higher could mean multiple instances of the CrusaderDrop though)
End
Behavior = OCLUpdate ModuleTag_25 ; Context window is a reaction to this, no CommandSet ; start tw test
OCL = SUPERWEAPON_CrusaderDrop
MinDelay = 1000
MaxDelay = 1000
CreateAtEdge = Yes ; as opposed to just creating on self
End
End

OCL stuff (using CarpetBomb stuff)
ObjectCreationList SUPERWEAPON_CarpetBomb
DeliverPayload
Transport = AmericaJetB52
StartAtPreferredHeight = Yes
StartAtMaxSpeed = Yes
MaxAttempts = 1
DropOffset = X:0 Y:0 Z:-2
DropVariance = X:30 Y:40 Z:0
DropDelay = 300 ;500 ; time in between each item dropped (if more than one)
Payload = CarpetBomb 15
DeliveryDistance = 400
DeliveryDecalRadius = 100
DeliveryDecal
Texture = SCCA10Strike_USA
Style = SHADOW_ALPHA_DECAL
OpacityMin = 25%
OpacityMax = 50%
OpacityThrobTime = 500
Color = R:255 G:156 B:0 A:255
OnlyVisibleToOwningPlayer = Yes
End
End
End
Basically, all you need to do, is to match every given code above, with the proper names you want to use. Also, the thing calling for the CarpetBomb is the OCLUpdate and the delay ensures that it takes a while to call in the carpetbomb (even though it also takes time for the plane to come in, it might be best to work with a delay to ensure that it'll take a while...make sure that the "bomb"/beacon dies right after calling in the carpetbomb, otherwise it'll keep repeating the call for a carpetbomb until it dies, which will result in multiple carpet bombs).

That might work for the thing you want...however, the bomb/beacon will just dissappear after the stated time...
CopyKat is offline   Reply With Quote