16
Technical forum / Change Item Caption after Interactions
« on: August 07, 2009, 01:35:44 PM »
I am trying to change the Caption of an Item after the Player looked at the item. It displays "Normal Item Name" as it should and according to Debug after looking at the Item the ItemStatus.LookedAt is indeed "true". However, the Item Name does not change. Does anybody know why and what I do wrong?
Here is the Code:
Here is the Code:
Code: [Select]
var ItemStatus;
ItemStatus.LookedAt = false;
////////////////////////////////////////////////////////////////////////////////
on "LookAt"
{
actor.GoToObject(this);
actor.Direction = DI_UP;
ItemStatus.LookedAt = true;
actor.Talk("Interesting");
}
// change caption
if(ItemStatus.LookedAt == true)
{
this.Caption = "Changed Item Name";
} else {
this.Caption = "Normal Item Name";
}