Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline Wildingthing  
#1 Posted : Wednesday, January 19, 2022 1:05:27 PM(UTC)
Wildingthing
Private
Joined: 1/19/2022(UTC)
Posts: 1

I'm trying to add a dozer suicide weapon - it wouldn't actually explode the dozer, but would instead kill its own pilot (e.g. for an ally to take the dozer).

I created the weapon using the bombtruck suicide as a template:

Weapon AbandonDozer
PrimaryDamage = 1.0 ;was 150.0
PrimaryDamageRadius = 1.0 ;was 6.0
AttackRange = 1.0 ; must be very close to use this weapon!
DamageType = KILL_PILOT
DeathType = NORMAL
WeaponSpeed = 99999.0
ProjectileObject = NONE
DamageDealtAtSelfPosition = Yes ; this is a suicide bomber... remember?
RadiusDamageAffects = SELF SUICIDE
DelayBetweenShots = 0
ClipSize = 1
ClipReloadTime = 1000
AutoReloadsClip = Yes
FireFX = WeaponFX_UpgradeMineDetonation
FireSound = RebelWeapon
End

This works in theory - I've tested it with a humvee. However when I give a dozer this weapon, I can't make it attack.

I tried to give it a command button:

CommandButton Command_AbandonDozerNow
Command = FIRE_WEAPON
WeaponSlot = PRIMARY ; Best if this matches up with an AutoChoose listing that forbids this slot normally
Options = OK_FOR_MULTI_SELECT
TextLabel = CONTROLBAR:DetonateBombTruck
ButtonImage = SSTerroristCarBomb
ButtonBorderType = ACTION
DescriptLabel = CONTROLBAR:TooltipDetonateBombTruck
End

And edited the commandset to match.

When I set AbandonDozer as a default primary weapon, pressing the new button instead activates DozerMineDisarmingWeapon

WeaponSet
Conditions = None
Weapon = PRIMARY AbandonDozer
End
WeaponSet
Conditions = MINE_CLEARING_DETAIL
Weapon = PRIMARY DozerMineDisarmingWeapon
End

If I change AbandonDozer to a secondary weapon on either weaponset, and update the commandbutton to WeaponSlot = SECONDARY, the game crashes when I try to activate it. The game even crashes if I delete the MINE_CLEARING_DETAIL weaponset altogether.

I have added CAN_ATTACK to the dozer's KindOf... what could I possibly be missing??
Sponsor
Offline AdrianeMapMaker  
#2 Posted : Sunday, January 23, 2022 8:31:38 AM(UTC)
AdrianeMapMaker
General
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 3/8/2016(UTC)
Posts: 1,156
Philippines

Thanks: 312 times
Was thanked: 185 time(s) in 149 post(s)
look for the bomb truck codes or those things in the demo general and see what they have
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb

UserPostedImage





Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.