Auto takeoff indoors

Hi,
I have configured my drone to fly indoors with no gps. my copter version is 4.6.0.
I am using flowsensor and rangefinder for position and altitude.
I want to add a rc switch that will do auto takeoff.
my lua script is running from switch and is based on copter_pingpong.lua example.
I found out during testing of lua script that start_takeoff is working only in guided mode.
because I am indoors I figured I need to work in guided_no_gps mode.
when I try the same example with guided_no_gps mode it is not accelarting the motors when start_takeoff is executing.
any idea how can I overcome this issue ? how can I takeoff to a certain altitude with my setup ?