Aller au contenu

Photo

Triggering "steal" from a script


  • Veuillez vous connecter pour répondre
1 réponse à ce sujet

#1
FunkyMo

FunkyMo
  • Members
  • 42 messages
When I interact with an NPC via right-click to start a dialogue, I want all of my characters to try stealing. I have the dialogue handler working properly, but I can't figure out how to send a signal to try stealing. Here's what I have so far in the dialogue handler (UT_DebugFloatyText makes blue floaty text appear above the person's head):

            // When the user clicks on an NPC to start talking, have his entire party try to steal from it.
            UT_DebugFloatyText(oOwner, "Talking to someone!");  // Controlled character

            if (IsPartyMember(oOwner)) {
                object[] party = GetPartyList(GetHero());
                UT_DebugFloatyText(OBJECT_SELF, "I am OBJECT_SELF!");  // NPC character
               
                int i;
                for (i = 0; i < GetArraySize(party); i++) {
                    // Try stealing!
                    UT_DebugFloatyText(party[i], "Trying to steal!");
                   
                    // This is the part that's not working.
                    SendEventOnCastAt(OBJECT_SELF, party[i], ABILITY_SKILL_STEALING_1);
                    SendEventOnCastAt(OBJECT_SELF, party[i], SKILL_STEALING);
                }
            }


Here's a better-formatted version.

Modifié par FunkyMo, 20 novembre 2009 - 03:33 .


#2
Axe_Murderer

Axe_Murderer
  • Members
  • 279 messages
I think you want CommandUseAbility.