Hey all
Just started messing around with the toolset. I am starting small, just trying to mod a couple of weapons and add them to my character.
I have been semi-successful. Weapons modded, "module" with items and script complied and built(no errors in the log). It shows up in my download content within the game BUT only one item gets added to my inventory.
I am using the sample script from
http://dragonagemodd...efore-spawning/
If I change the order in the script of checking for a valid object, then first one listed gets added but the second doesn't.
If anyone feels gracious enough to point me in a direction to fix this I would be most grateful.
I didn't know if posting script is allowed here so if anyone wants to take a look, I can send it, or PM it or something.
Thanks for reading.
Need help adding multiple items to character's inventory
Débuté par
Raanz
, avril 21 2011 05:03
#1
Posté 21 avril 2011 - 05:03
#2
Posté 22 avril 2011 - 08:09
Script posting is allowed here, so feel free.
Ensure that your items have different tags.
Consider whether you need GetObjectByTag or GetItemPossessedBy. The former will find the item anywhere in the area list (e.g. in an NPC or follower inventory) whereas the latter will only find the item on the target creature.
Ensure that your items have different tags.
Consider whether you need GetObjectByTag or GetItemPossessedBy. The former will find the item anywhere in the area list (e.g. in an NPC or follower inventory) whereas the latter will only find the item on the target creature.
#3
Posté 25 avril 2011 - 05:23
Proleric1 wrote...
Script posting is allowed here, so feel free.
Ensure that your items have different tags.
Consider whether you need GetObjectByTag or GetItemPossessedBy. The former will find the item anywhere in the area list (e.g. in an NPC or follower inventory) whereas the latter will only find the item on the target creature.
Hmm I see. I am using the GetObjectByTag
object oGSword = GetObjectByTag("ranz_greatsword");
object oLSword = GetObjectByTag("ranz_longsword");
if (!IsObjectValid(oGSword))
UT_AddItemToInventory(R"ranz_greatsword.uti",1);
if (!IsObjectValid(oLSword))
UT_AddItemToInventory(R"ranz_longsword.uti",1);
That's the meat of it, minus the normal syntax (brackets and the break, etc)
See anything obvioulsy messed up there?
Thanks for the reply.
#4
Posté 30 avril 2011 - 06:07
That should work, unless an object with that tag already exists somewhere in the area list. Perhaps you put one in a container, for test purposes, or something like that?
#5
Posté 01 mai 2011 - 07:44
P.S. worth checking that both item resources have been exported, and that there isn't a typo in either of the resource names.





Retour en haut






