Posted by: Rrtaya_tsamsiyu - Thursday, January 10, 2013 7:18:15 PM
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

Posted by: CommieDog - Saturday, January 12, 2013 3:35:24 AM
What about a button that gives an upgrade? Can you turn on the behavior based on what upgrades the unit has?

Posted by: Annihilationzh - Saturday, January 12, 2013 6:03:30 AM
Unless I'm very much mistaken, this should do it: [code]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[/code] 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.