Jump to content

Home

What's this? Another scripting question? Egad!


Darth_Robinson

Recommended Posts

I'm trying to spawn an item on Freedon Nadd's mummified corpse, but I'm having a little trouble with the script. This should be a pretty simple thing, but I just can't do it. Help please?

 

I don't remember if Freedon Nadd's mummy placeable has an unique Tag and Resref. If it has, you can access it directly with GetObjectByTag(). If it isn't uniquely named or tagged, something like this may work:

void main() {
       object oCorpse = GetItemPossessor(GetObjectByTag("g_w_fnaddblade"));
   if (GetIsObjectValid(oCorpse) && (GetObjectType(oCorpse) == OBJECT_TYPE_PLACEABLE)) {
       CreateItemOnObject("an_item01", oCorpse);   
       CreateItemOnObject("another_item", oCorpse);    
   }
}

...identifying the mummy by checking what container has Freedon Nadd's unique lightsaber in its inventory, and adding your own items to that container.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...