Change sensor value via Lua script

Please do not post the same question more than once ( How to check if WP saved via LUA script - ArduPilot Lua Scripting - ArduPilot Discourse).

I think you should monitor mission:num_commands(). Send that value back as a gcs:send_named_float(), and it will be available on the Quick tab of Mission Planner. Each time a WP is saved, the value will increase by one.

I am not familiar with your transmitter’s capabilities, so I’m not sure how to monitor that value on the transmitter and set an alarm accordingly.