Function: SetTempVariable(spawn, var, val)
Description: Sets a temporary named value on the receiver spawn. Passing nil removes the variable. Spawn, Zone, Item and Quest values remember their original allocation through weak observations; storing a value does not keep the referenced object alive or select a replacement under a reused ID/address.
Parameters:
spawn(Spawn): receiver actor.var(string): nonempty variable name.val: a string, supported Spawn/Zone/Item/Quest userdata, or nil. Numeric Lua values use the native string-conversion path. Other unsupported or expired userdata is rejected without changing the existing variable.
Returns: None. Invalid receivers, empty names, and invalid value types are logged without changing the variable.
Lifetime behavior: A Spawn value must resolve to a borrow owned by the current Lua invocation before its runtime identity is read. An actor already retained by the active invocation remains readable through that invocation even if it retires or its userdata is invalidated during a callback. A fresh invocation cannot revive an expired Spawn value. Zone values must acquire their original scene for assignment and remain weak in storage. Item and Quest values retain the original weak allocation behavior described below.