Rrtaya_tsamsiyu
13 years ago
is there a way to make a button that turns a constant-fire weapon on/off?

more specifically, im wanting to make a vehicle that sprays toxins on location like the toxin truck's special ability, but have buttons that work like an on/off switch and have it be able to keep spraying at its own location while moving
one soul at a time
Sponsor
CommieDog
13 years ago
What about a button that gives an upgrade? Can you turn on the behavior based on what upgrades the unit has?
UserPostedImage 
CommieDog: Because someone has to do your dirty work for you
Annihilationzh
13 years ago
Unless I'm very much mistaken, this should do it:

CommandButton Command_SpawnToxins
  Command         = SPECIAL_POWER 
  SpecialPower    = SpecialAbilitySpawnToxins
  Options         = CHECK_LIKE OK_FOR_MULTI_SELECT
  TextLabel       = CONTROLBAR:Contaminate
  ButtonImage     = SSContaminate
  ButtonBorderType = ACTION 
  DescriptLabel   = CONTROLBAR:ToolTipGLAFireToxinTractorSlime
End[/code][code]  Behavior = OCLSpecialPower ModuleTag_Toxins
    SpecialPowerTemplate = SpecialAbilitySpawnToxins
    OCL                  = OCL_SpawnToxins
  End[/code][code]SpecialPower SpecialAbilitySpawnToxins
  Enum                = SPECIAL_DETONATE_DIRTY_NUKE
  ReloadTime          = 0
  PublicTimer         = No
  ShortcutPower       = No
End[/code][code]ObjectCreationList OCL_SpawnToxins
  CreateObject
    ObjectNames = PoisonFieldMedium
  End
End
The last one is just an example. It would most likely have to be a special object that spawns the anthrax field based on upgrades. It can also spawn the toxin spreading FX.

Alternatively, you can have it automatically turn on and off by turning it into a normal weapon that uses FireOCL to spawn the poison field.
If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.