Aller au contenu

Photo

Deprecated_ExecuteScript - Georg?


  • Veuillez vous connecter pour répondre
2 réponses à ce sujet

#1
J.O.G

J.O.G
  • Members
  • 355 messages
So ExecuteScript is deprecated, yet it would be ideal for a placeable's event script for example, we could handle the events we care about, and then run placeable_core to do all the other little things.

Is the reason for deprecating that function a technical one or was it an organisational one (e.g the function works fine but it would've caused a nightmare for maintenance when used freely by Bioware scripters)?

Modifié par J.O.G, 08 décembre 2009 - 03:26 .


#2
Phaenan

Phaenan
  • Members
  • 315 messages
Hmm... Not sure what you want to do in your event handling example, but you may simply redirect events to a script resource using HandleEvent() as in :
HandleEvent(eCurrent, R"yourscript.ncs");
Or, you can simply use a standard event handling script attached to your placeable resource, and place wherever you want some HandleEvent falling through to the core rules :
HandleEvent(eCurrent, RESOURCE_SCRIPT_PLACEABLE_CORE);

Modifié par Phaenan, 08 décembre 2009 - 04:25 .


#3
J.O.G

J.O.G
  • Members
  • 355 messages
I just want to get rid of ballast in my own script. In this case I'm setting plot flags when a container is opened, and I don't want to copy all the stuff from placeable_core, just to make the container actually work (be clickable etc.).

HandleEvent is what I was looking for. Thanks!

(Though it would still be interesting to know how bad using ExecuteScript actually is.)

Modifié par J.O.G, 08 décembre 2009 - 04:55 .