| Blockland Forums > Modification Help |
| Special untriggered input event simply does not work |
| (1/4) > >> |
| Bauklotz:
--- Quote from: Bauklotz on November 19, 2010, 02:50:15 PM ---Okay, that is fixed. But another problem: packaging addEvent doesn't seem to work. --- Code: ---package BB_specialEvents { function fxDTSBrick::addEvent(%this,%enabled,%delay,%input,%target,%output,%a,%b,%c,%d,%e,%f,%g,%h,%i,%j) { %input_ui = $InputEvent_NamefxDTSBrick_[%input]; %output_ui = $OutputEvent_NameScriptObject_[%output]; if($EVENTDEBUG) { announce(%this @ "::addEvent - "@%inputui@" -> (?) -> "@%output_ui); } Parent::addEvent(%this,%enabled,%delay,%input,%target,%output,%a,%b,%c,%d,%e,%f,%g,%h,%i,%j); if(%input_ui $= "Special" && $BB::EVT::EXIST[%output_ui] && isFunction($BB::EVT::FUNC[%output_ui])) { call($BB::EVT::FUNC[%output_ui],%this,trim(%a TAB %b TAB %c TAB %d TAB %e TAB %f TAB %g TAB %h TAB %i TAB %j)); } } }; activatePackage(BB_specialEvents); --- End code --- (sorry for bad identation, copied directly from Torsion) Even though $EVENTDEBUG is set to 1 (true), and I add a event to a brick and press send, nothing is "announced". --- End quote --- |
| Uristqwerty:
If that script executed? Without errors? |
| Chrono:
Works for me. |
| Space Guy:
Whatever is wrong is not that line. This works even without any script object for that existing. |
| Bauklotz:
Okay, that is fixed. But another problem: packaging addEvent doesn't seem to work. --- Code: ---package BB_specialEvents { function fxDTSBrick::addEvent(%this,%enabled,%delay,%input,%target,%output,%a,%b,%c,%d,%e,%f,%g,%h,%i,%j) { %input_ui = $InputEvent_NamefxDTSBrick_[%input]; %output_ui = $OutputEvent_NameScriptObject_[%output]; if($EVENTDEBUG) { announce(%this @ "::addEvent - "@%inputui@" -> (?) -> "@%output_ui); } Parent::addEvent(%this,%enabled,%delay,%input,%target,%output,%a,%b,%c,%d,%e,%f,%g,%h,%i,%j); if(%input_ui $= "Special" && $BB::EVT::EXIST[%output_ui] && isFunction($BB::EVT::FUNC[%output_ui])) { call($BB::EVT::FUNC[%output_ui],%this,trim(%a TAB %b TAB %c TAB %d TAB %e TAB %f TAB %g TAB %h TAB %i TAB %j)); } } }; activatePackage(BB_specialEvents); --- End code --- (sorry for bad identation, copied directly from Torsion) Even though $EVENTDEBUG is set to 1 (true), and I add a event to a brick and press send, nothing is "announced". |
| Navigation |
| Message Index |
| Next page |