kert349 Posted April 18, 2011 Share Posted April 18, 2011 Hello does any one know how to use SetScript? I tried this: joiner.setscript GruntScript where GruntScript is name of the script object. But GECK has some problem with this syntaxt / the GruntScript paramenter. any one knows how to use it? Link to comment Share on other sites More sharing options...
tunaisafish Posted April 18, 2011 Share Posted April 18, 2011 Looks fine to me, although I've only used GetScript.Just noticed this in the doc... SetScript Alias: noneParameters:2 scriptInRef:GenericObject item:GenericObject So maybe the script just needs to be stored in a ref ? Link to comment Share on other sites More sharing options...
sagittarius22 Posted April 18, 2011 Share Posted April 18, 2011 Looks fine to me, although I've only used GetScript.Just noticed this in the doc... SetScript Alias: noneParameters:2 scriptInRef:GenericObject item:GenericObject So maybe the script just needs to be stored in a ref ?Yes you need to attach the script on a dummy item. Link to comment Share on other sites More sharing options...
kert349 Posted April 18, 2011 Author Share Posted April 18, 2011 Like this? ref sr set sr to dummy.getscript joiner.setscript sr does not seem to work... though geck accepts this syntax btw im using this on NPCs Link to comment Share on other sites More sharing options...
sagittarius22 Posted April 18, 2011 Share Posted April 18, 2011 (edited) No, like this: REF_OF_WHAT_YOU_WANT_TO_BE_SCRIPTED.setscript DUMMY_OBJECT Where DUMMY_OBJECT has the script attached Edited April 18, 2011 by sagittarius22 Link to comment Share on other sites More sharing options...
kert349 Posted April 18, 2011 Author Share Posted April 18, 2011 No, like this: REF_OF_WHAT_YOU_WANT_TO_BE_SCRIPTED.setscript DUMMY_OBJECT Where DUMMY_OBJECT has the script attached Ok thx i tried that but it doesnt seem to work.. does dummy have to be ref or can it be baseobject ? Link to comment Share on other sites More sharing options...
davidlallen Posted April 18, 2011 Share Posted April 18, 2011 You cannot have different scripts on different instances of an object. That is, you cannot call this on a "reference ID" which you give or see in the cell window. You must call it on a base object. In your original post, is "joiner" an object or an instance? Is it possible that the script is, for example a quest script, and you are trying to attach it to an object? Assuming you are using geck powerup, what is the exact error message? Link to comment Share on other sites More sharing options...
Recommended Posts