onspawn and ondeath event handlers added as cubescript identities