thispatcher noob problem (script delete)

flowdesigner's icon

Im trying to figure out thispatcher object, and use it to delete some objects..

Max Patch
Copy patch and select New From Clipboard in Max.

What do I do wrong?

Noob4Life's icon

you spelled 'delete' wrong in several places(also, there is no object with scripting name 'mess', which means the script at that point will fail and no other scripting will work after that(i.e. the 'this' named thispatcher will not get deleted because the deletion before that for 'mess' will not work)).

_______________________________________
*Never fear, Noob4Life was never here!*

flowdesigner's icon

Ahh, writing detete 4 times was not clever, I really need readin glasses.

1 question though, can I use a thispatcher to delete itself, after deleting several other patches?

Noob4Life's icon

yes, you can tell thispatcher to delete itself(it will work).

(just make sure that every part of the script before its self-deletion works, if the script message fails at any point(for example, you have it refer to an object/scriptingname that doesn't exist) it will stop registering any scripting beyond that found in the same message.)

_______________________________________
*Never fear, Noob4Life was never here!*

flowdesigner's icon

Cool, I have not got it to work though (yet)

Can I save messages with a scripting name as a prototype, and then use a thispatcher to clean up a patch with loads of comments (in a fast an convenient way)? Somehow a message-thispatcher clipping or prototypes that automatically speaks with (delete or other operations) many different objects in a patch.