# Problem in set_engine_par Group Insert FX



## marcosarantesj (Dec 31, 2018)

I put in Group Insert FX - EQ 3, par L/H, in SendEffects - Reverb and put Send Levels in SendEffects. I have many groups and working reverb for each individual groups but I am wrong in KSP Script code.

In KSP Script I put this but dont working. I must be missing out on the index in script.

on ui_control($reverb) set_engine_par($ENGINE_PAR_SEND_EFFECT_OUTPUT_GAIN,$reverb,$group1,0,-1)
end on


----------



## EvilDragon (Dec 31, 2018)

You need to use $ENGINE_PAR_SENDLEVEL_0 in this case.


----------



## marcosarantesj (Dec 31, 2018)

EvilDragon said:


> You need to use $ENGINE_PAR_SENDLEVEL_0 in this case.


Thank you. Working. 
set_engine_par($ENGINE_PAR_SENDLEVEL_0,$reverb,$g1,7,-1)


----------



## marcosarantesj (Dec 31, 2018)

EvilDragon said:


> You need to use $ENGINE_PAR_SENDLEVEL_0 in this case.


to define bypass where I put it?
set_engine_par($ENGINE_PAR_EFFECT_BYPASS, 1, $group1, 7, -1)


----------



## EvilDragon (Dec 31, 2018)

You should probably bypass the reverb itself, so that would be -1, 0, 0 for the last three arguments.


----------



## geronimo (Dec 31, 2018)

And perhaps, $ENGINE_PAR_SEND_EFFECT_BYPASS for the built-in variable .


----------



## marcosarantesj (Dec 31, 2018)

EvilDragon said:


> You should probably bypass the reverb itself, so that would be -1, 0, 0 for the last three arguments.


The code below working BYPASS. Thank you, . 
if($btnFX = 1)
{Reverb} 
set_engine_par($ENGINE_PAR_EFFECT_BYPASS, 1, $g1, 7, -1) 
else
set_engine_par($ENGINE_PAR_EFFECT_BYPASS, 0, $g1, 7, -1) 
end if

Happy new year from here in Brazil.


----------



## geronimo (Dec 31, 2018)

marcosarantesj said:


> Happy new year from here in Brazil.


Yes, likewise _


----------



## EvilDragon (Jan 1, 2019)

marcosarantesj said:


> The code below working BYPASS.



There's no need to use if-else, it can be done in one line. Also, this is not bypassing the reverb, as I suggested - it's bypassing the send levels module, which doesn't save you much CPU... Here's how to bypass the reverb in send FX:

set_engine_par($ENGINE_PAR_SEND_EFFECT_BYPASS, 1 - $btnFX, -1, 0, 0)


----------

