To clarify, the above should be thought of as a compact way to write:FishyClockwork wrote:This on its own doesn't declare 'success' (because it's a jumping function)Code: Select all
TNT1 A 0 A_Jump(111, "bleh")
Code: Select all
TNT1 A 0 { return A_Jump(111, "bleh"); }
It has no effect on the success of a CustomInventory state chain not because you called a jumping function but because the jumping function, which returns a state, is called with return to propagate the result out to the caller of your little function.
If it helps, what you are creating with this single line is an anonymous function ("anonymous" because it has no name) with an inferred return type, and the state calls that function. If it was written out as an explicit function (supposing DECORATE could express this), it would look something like this:
Code: Select all
actor MyActor
{
action state A_MyJumper()
{
return A_Jump(111, "bleh");
}
states
{
TNT1 A 0 A_MyJumper
}
}
Correct. This function returns nothing, so it gets counted as success.FishyClockwork wrote:while this does declare 'success' because it doesn't return anything, nevermind its contents, correct?