Aller au contenu

Photo

Assigning custom weapons to different party members... HELP


  • Veuillez vous connecter pour répondre
2 réponses à ce sujet

#1
DemonSlayer_1

DemonSlayer_1
  • Members
  • 185 messages
        void main()
{
   CreateItemOnObject(R"gen_im_wep_mel_lsw_lsw.uti", OBJECT_SELF, 1, "", TRUE);
}

Always works for me as the player to recieve gear

What I am trying to do is figure out how assign certain gear to my party members upon running a script after my cutscene plays.

        void main()
{
   CreateItemOnObject(R"gen_im_wep_mel_lsw_lsw.uti", OBJECT_ALISTAIR, 1, "", TRUE);
}

Does Not Work!

#2
hunharibo

hunharibo
  • Members
  • 126 messages
Well, i think you have to obtain some kind of reference to Alistair's object. OBJECT_ALISTAIR might not work under all circumstances (he might not even be in your party), so simply using that constant might not work.

#3
Jsmith0730

Jsmith0730
  • Members
  • 346 messages
I've been curious about something like this myself for awhile now. I wanted Alistair to have a 2H weapon instead of a sword/shield when I first meet him in Ostagar.

Unfortunately it seems that adding an item to an NPC is nothing at all like adding an object to, say, a container. :\\

One thing I have been wondering is if there is a command for NPCs similar to object oplayer maybe like onpc or something because I was thinking then I could do a script that was like:

object oNPC = GetAlistair();

and then I'd know what to do from there. I mean that was just a sloppy example but you get the idea.

Modifié par Jsmith0730, 28 décembre 2009 - 10:49 .