var myItem = Game.GetItem("bat");
var myBool = myItem.AddAttachment ("entities\my_entity\my_entity.entity", false, 0, 0);
// I tried to change the parameters
Game.Msg (myBool);
You have added an item to your inventory with Game.GetItem("bat").
Code: WME Script
//I have not tested this code
Sorry, I meant Game.GetCursorObject(), which returns the cursor sprite. Game.GetCursor() returns the filename which is a string.
Have you thought about using the Item attribute CursorCombined. If I have understood your issue correctly this might work
ITEM
{
CURSOR_COMBINED = TRUE
CAPTION = "Broken Door"
NAME = "MeansOfEntry"
IMAGE = "items\Broken Door.png"
CURSOR = "items\Broken Door Chosen.png"
CURSOR_HOVER = "items\Broken Door Chosen Highlighted.png"
SCRIPT = "items\meansOfEntry.script"
}
Or maybe I still don't understand what you want to do :-[