(12-11-2010, 01:45 AM)LoneWolf Wrote: Scripts all right, its the tabs in the level editor which may have been filled out wrongly. I think the key needs 3 names down, 1 for the cfg file, for name of key and text to appear, and 1 for key picked up and 1 for key to be used on door and for key to be removed.
But the door just needs 2, one in collide i think and 1 in name.
If you've done this right then, have you posted your full script? and does the error say theres a line wrong? eg. (2,1).
I have corrected these in level editor..
ERROR: FATAL ERROR: Could not load script file custom/stories/FTD/custom_stories/FTD/maps/00_example.hps'! main (3,2) : ERR : No matching signatures to 'AddUseItemCallback(string@&, string@&, const bool)'
Full Script:
void OnStart()
{
AddUseItemCallback("", "key_1", "door_1" "UsedKeyOnDoor", true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "door_1", 0.0f, false);
RemoveItem("key_1");
AddDebugMessage("KeyOnDoor", false);
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
Im confused how this can be so confusing and hard... I dont never learn scripting i just love this game and just wanna make one beautiful map :I