Take and Drop All
sfq
19 Mar 2012, 15:09The take all and drop all commands do not display anything if there are no objects available, is there a way to add this?
Also the take all command attempts to take all objects that are not held and are not scenery. Can this be extended to ignore other objects dependant on an objects attributes, for example exclude all objects that cannot be taken?
Regards
Also the take all command attempts to take all objects that are not held and are not scenery. Can this be extended to ignore other objects dependant on an objects attributes, for example exclude all objects that cannot be taken?
Regards
Alex
19 Mar 2012, 15:53You can copy the "take" and/or "drop" commands into your game from the editor by clicking "Filter" at the bottom of the tree, then "Show Library Elements". You can then select "take" or "drop" and click the "Copy" button in the yellow bar to make a local copy of these commands in your game.
Once in your game, you can edit the definitions. You could change the script so that if the "object" list has no items, you could print a message.
To change what "all" means for these commands, you need to edit the "multiple" attribute. You can only do this from the code view. The "multiple" attribute returns the object list which is passed to the script. The default for "take" is:
which returns all visible non-scenery objects, excluding the player themselves. You could call some other function to return a different object list here perhaps.
Once in your game, you can edit the definitions. You could change the script so that if the "object" list has no items, you could print a message.
To change what "all" means for these commands, you need to edit the "multiple" attribute. You can only do this from the code view. The "multiple" attribute returns the object list which is passed to the script. The default for "take" is:
return (ListExclude(ScopeVisibleNotHeldNotScenery(), player))
which returns all visible non-scenery objects, excluding the player themselves. You could call some other function to return a different object list here perhaps.