thispatcher assigning scripting name at the time of object creation

whitelobster's icon

I am working on a script that will create new instances of an object, however after I create that instance I want to be able to address it via it's scripting name. How can I specify the scripting name of an object at the time of it's creation?

At the moment I have the following script for spawning a new instance of the object
script newobject pfft~ 02-stocha-freeze.pfft 4096 8

But I'm not sure how to go about specifying that object's scripting name, would love to hear any suggestions anyone might have

thanks!

whitelobster's icon

I've also tried this but it doesn't seem to work, just creates a blank object with the scripting name attached

script newobject newobj @text “02-stocha-freeze.pfft 4096 8” @varname icecream

how to I get the text in quotes to actually stick as the object being created?

Emmanuel Jourdan's icon
Max Patch
Copy patch and select New From Clipboard in Max.

It looks like the problem is that you're using smart quotes (“”) instead of regular ones (""):