Continuing from my previous conversation.....
Okay so here I am again. So I moved the New version of create-unit.lua to the raw\scripts folder that had fixed my earlier problem allowing me to run this onLoad.init command with no issues:
modtools/reaction-trigger -reactionName KILL_CAPTIVE_DWARF -command [ create-unit -race FAKE_SAPIENT -caste MALE_DWARF -location [ \\LOCATION ] -age 20 -flagSet [ scuttle ] ]
:
And yes a dead dwarf appears at the feet of the one who operates this command, from the reaction... well its a fake dwarf... but it gets the job done of getting dwarf skulls (and other commands for humans, elves, goblins, kobolds, etc skulls and meat for everyone!).
well we had a different script that when reviewed was the new version of create-unit.lua renamed to create-unit-friendly.lua with a few minor changes.... I was shocked at how similar it was, and decided that because I couldn't get it to do anything right(moved it etc like I did with create-unit.lua), I removed it, retried these lines with create-unit...
modtools/reaction-trigger -reactionName RELEASE_DWARF_MIGRANTS -command [ create-unit -race DWARF -caste MALE -civId a -groupId a -location [ \\LOCATION ] -name MOUNTAIN -age 20 ]
modtools/reaction-trigger -reactionName RELEASE_DWARF_MIGRANTS -command [ create-unit -race DWARF -caste MALE -civId \\LOCAL -groupId \\LOCAL -location [ \\LOCATION ] -name MOUNTAIN -age 20 ]
The first line is the original line from the original onLoad.init, modified to access create-unit, we got a dwarf, but it was just set to friendly, and not a part of the fort civ/group at all. It eventually wandered around the tavern then disembarked to who knows where....
The second line is the line written based on the information in the first part of "create-unit.lua" that says to use \\LOCAL to make the created unit a member of the local civ and group.... and well this dwarf did the same as the first one. It appeared but was set to friendly, not a member of the civ/group, hung out roamed a statue garden then left to points unknown. so now we have 2 free roaming dwarves just enjoying themselves free from the politics of any civ (and not forced into slave labor in my deep mines)...
The only thing I have to say is I'm glad it pops up in the right location? but how do I force the dwarf to be a member of the fort?