GarageGames/Torque3D — pull request #682 by Azaezel (2014-06-02 19:04:19+00:00)
Title: Extended onend sequence

adds the name of the sequence just completed.
example usage for simple FSMs and the like:

function shapeBaseData::onEndSequence(%this, %obj, %slot, %name)
{
%script = "on" @ %name; //concatenate the returned name with "on" as a differentiated standard nomenclature
if(%this.isMethod(%script)) //check to ensure the method exists for the class or child class
%this.call(%script, %obj); //call it
}

function fooData::onBar(%this,%obj)
{
error("fooData::onBar" SPC %this SPC %obj); //simple data verification
}