Turley wrote: ↑Sat Jun 10, 2017 9:31 am
But I would anyway suggest to create items via GetItemDescriptor if multiple properties need to be changed, since you can define them before creating.
I'm trying this at the moment but it doesn't appear to be working. From all accounts its assigning that property when creating the item, however it doesn't seem to trigger the walkon script, as its not a member of the item class. I've checked through the items.txt file and it appears that walkon scripts aren't stored there, i don't know enough about the core to work out how it actually reads and loads a walkon script but it must be triggered by the objtype and not by a prop or member on the actual item itself.
RusseL wrote: ↑Sat Jun 10, 2017 2:55 pm
walkon.src
Code: Select all
start_script(CStr(GetObjProperty(walkon_item, "walkon_script")), {character, walkon_item});
Unfortunately the limitation i was coming up against was i'm using objtypes which i currently don't have items defined for in config files. I'm going to do some testing now, but using Turleys method with a placeholder item that has all its other parts changed at creation i might be able to do this with a generic script i will give it a test.
Harley wrote: ↑Sat Jun 10, 2017 11:58 am
When I create it, in my command, I set to to start_script() with this item and all looks great!
Code: Select all
var script := start_script( ":gmitems:control/special-item-decay", order_cloak );
As above, but this looks like a control script, unless theres a way to trigger a walkon event from a control script?
I'll do some more testing by combining the 2 methods and see how i go.