Actually, you will want to use the following format for the OnStateChange callback:
Sub Object_OnStateChange(state)
If state = "Riseup" Then
Object.OnTop
MsgBox("Hit")
End If
End Sub
You need to of course treat the .State property as a string variable, as Riseup does not otherwise have any value within that scope. If you wanted, you could declare something like this in the global scope:
Const Private Riseup = "Riseup"
After making such a statement, you would be able to treat Riseup as you had.
The only thing you want to keep in mind is that the function header, for example:
Sub Object_OnStateChange(state)
treats whatever is within the parenthesis as a variable, so you couldn't actually put a concrete value here. This does allow you to put whatever you would like to use as a variable here, however, for example:
Sub Object_OnStateChange(strNewState)
-Mike
[Stardock Support]