Skip to content

Helmet CopyItemAndModify on Android Tablet

I recently got an android tablet and installed NWN EE. I copied my server module to the tablet and I noticed that when I try to change my helmet appearance it disappears. It doesn't return a new helmet with the changed appearance and the old one is destroyed.

On my PC it works perfect with no issues.

Here is the code that I have been using on PC since NWN 1.69. This fires from a conversation.

#include "x2_inc_itemprop"
void main()
{
    object oPC   = GetPCSpeaker();
    if (!GetIsPC(oPC))
        {
        return;
        }
    if (GetLocalInt(oPC, "player_craft"))
        {
        return;
        }
    object oHelmet = GetItemInSlot(INVENTORY_SLOT_HEAD, oPC);

        if (!GetIsObjectValid(oHelmet))
            {
            FloatingTextStringOnCreature("No helmet is equipped.", oPC, FALSE);
            AssignCommand(oPC,PlaySound("gui_cannotequip"));
            return;
            }

    int iRandom = Random(35)+1;
    object oNewHelmet = CopyItemAndModify(oHelmet, ITEM_APPR_TYPE_SIMPLE_MODEL, 0, iRandom, TRUE);
    DestroyObject(oHelmet);
    AssignCommand(oPC,ActionEquipItem(oNewHelmet, INVENTORY_SLOT_HEAD));

    SetLocalInt(oPC, "player_craft", 1);
    DelayCommand(1.0, DeleteLocalInt(oPC, "player_craft"));
}

Comments

  • ForSeriousForSerious Member Posts: 466
    So it's not a matter of it not equipping the new helmet, but that it's not creating the new helmet at all, correct?
  • 4BOLTMAIN4BOLTMAIN Member Posts: 90
    ForSerious wrote: »
    So it's not a matter of it not equipping the new helmet, but that it's not creating the new helmet at all, correct?

    Correct, I created a test module with a simple on used script and the same thing happens, it works on a PC but not on Android.
  • ForSeriousForSerious Member Posts: 466
    Want to submit a bug report? This may be something that didn't transcode to ARM from x86, but that's just a pure speculation sort of guess. (I don't actually know the process, just that things don't always work.)
Sign In or Register to comment.