working version of trigger. no actor yet
move variables from header to local
remove ; at end of defines
Fix memory allocation problem