Helmet CopyItemAndModify on Android Tablet
4BOLTMAIN
Member Posts: 90
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.
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"));
}
0
Comments
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.