-- Effects are acquired by specifying a name of GameObject with the effect component. -- Store the effect attached to the GameObject named "Effect" in a variable "eff" local eff = vci.assets.GetEffekseerEmitter("Effect") local toggle = false function onUse(use) -- Play the effect when the SubItem is being Used if use == "SubItem" then -- Reverse the toggle toggle = not(toggle) if toggle == false then -- Play the effect stored in the eff eff._ALL_Play() --Print the effect name being played print("Played an effect"..eff.EffectName) end if toggle == true then -- Stop the effect stored in the eff eff._ALL_Stop() --Print the effect name being stopped print("Stopped an effect"..eff.EffectName) end end end