Obviously this does not work
object oPC = GetPCSpeaker();
object oPackage = CreateItemOnObject("package", oPC);
object oGoblinBox = CreateItemOnObject("goblinbox", oPackage);
Modifié par henesua, 05 avril 2011 - 04:50 .
object oPC = GetPCSpeaker();
object oPackage = CreateItemOnObject("package", oPC);
object oGoblinBox = CreateItemOnObject("goblinbox", oPackage);
Modifié par henesua, 05 avril 2011 - 04:50 .
Modifié par Ryuhi2000, 05 avril 2011 - 05:16 .
[color="#00ff00"]object oPC = GetPCSpeaker();
CreateItemOnObject("nw_it_contain006", oPC);
object oPackage = GetObjectByTag("NW_IT_CONTAIN006");
object oGoblinBox = CreateItemOnObject("goblinbox", oPackage);[/color]Modifié par henesua, 05 avril 2011 - 05:44 .
Modifié par GhostOfGod, 05 avril 2011 - 06:16 .
Modifié par henesua, 05 avril 2011 - 07:05 .
henesua wrote...
Based on what you wrote the following should work:[color="#00ff00"]object oPC = GetPCSpeaker(); CreateItemOnObject("nw_it_contain006", oPC); object oPackage = GetObjectByTag("NW_IT_CONTAIN006"); object oGoblinBox = CreateItemOnObject("goblinbox", oPackage);[/color]
It does not. There is nothing magical happening with GetObjectByTag that enables a container to receive another from CreateItemOnObject.
[EDIT]
I just realized that I did not specify that both containers are items. I think this is a hard coded limitation of NWN which forbids nestinf of container items.
Modifié par Ryuhi2000, 05 avril 2011 - 12:47 .
Modifié par Ryuhi2000, 05 avril 2011 - 07:53 .
Modifié par henesua, 05 avril 2011 - 09:44 .