1. Dismiss Notice
  2. GOG.com logo

    Thanks to YOUR votes, GOG.com now sells:
    - Sea Dogs - Sea Dogs: Caribbean Tales
    - Sea Dogs: City of Abandoned Ships

    Vote now to add Pirates of the Caribbean to the list!

    Dismiss Notice
  3. Under the Crossbones Podcast

    A Pirate Podcast with Interviews
    Music, Comedy and all things Pirate!

    - Episode Guide - About - Subscribe -
    - Twitter - Facebook - iTunes - Android -
    - Youtube - Fill the Coffers -

    Dismiss Notice
  4. New Horizons logo

    Quick links for PotC: New Horizons
    - Download latest version
    - Wiki - FAQ - Report bugs here
    - ModDB profile

  5. GOF logo

    Quick links for AoP2: Gentlemen of Fortune 2
    - Downloads and info
    - Historical Immersion Supermod
    - ModDB Profile

Dismiss Notice
New to the forum?
Please take a moment to read our Welcome Message and Forum Rules.

Need Help Help wih check

Discussion in 'Sea Dogs: City of Abandoned Ships' started by Myth, Sep 18, 2017.

  1. Myth

    Myth Master Mariner

    Joined:
    Mar 25, 2014
    Messages:
    203
    Gender:
    Male
    Good afternoon. I need your help again. But this time I need help with game scripts.

    1) It is necessary if in the animation of the character there is an animation "sit", then plant it. Otherwise put in the location. The condition for checking a specific animation does not suit me, I need to check the contents of the animation.
    2) I know that you can get the total number of Hero's items, but I need to get the number of a certain object and make a check on it.

    Thank you.
     
  2. ChezJfrey

    ChezJfrey Master Mariner Storm Modder

    Joined:
    Apr 24, 2015
    Messages:
    226
    This will get equipped item.id: string sID = GetCharacterEquipByGroup(pchar,BLADE_ITEM_TYPE);

    If you further want the index of that, use: int nItem = GetItemIndex(sID);

    There is not currently a way to query/investigate if the character has the animation defined. Since Poklon is called with the function bool CharacterPlayAction(ref character, string actionName) from characters_ia.c, you could call it and see if it returns true/false for success/fail. Then if it fails, you know the character doesn't have it, then maybe play something else?

    if(!CharacterPlayAction(chr, "poklon"))
    CharacterPlayAction(chr, "dialog_stay" + (rand(8)+1));
     

Share This Page