(12-22-2011, 01:52 PM)junkfood2121 Wrote: I am unsure if HPS can read double '. Use double " and not double ' and try if that works.
Also, PlaySoundAtEntity('''', ''unlock_door'', ''deur'', ''0'', false);, Change "0" to 0.0f.
didn't work either.....
ill paste what i have now so u can see what i've changed with all the comments i got
btw thnx every1 for helping me though
////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "deurkey_1", "deur", "UsedKeyOnDoor", True);
AddEntityCollideCallback("Player", "doorclose", "Collidedeur", true, 1);
SetLightVisible(string& asLightName, bool abVisible);
}
void doorclose(string &in asParent, string &in asChild, int alState) ;
{
SetSwingDoorLocked("deur", true, false);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity) ;
{
SetSwingDoorLocked("deur", false, true);
PlaySoundAtEntity("", "unlock_door", "deur", 0, false);
RemoveItem(deurkey_1);
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
(12-22-2011, 01:55 PM)flamez3 Wrote:
(12-22-2011, 01:28 PM)viccie Wrote:
(12-22-2011, 12:27 PM)flamez3 Wrote:
(12-22-2011, 08:44 AM)viccie Wrote:
(12-21-2011, 04:30 PM)Unearthlybrutal Wrote: I fixed some problems. Do it work with this?
Spoiler below!
////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback('''', ''deurkey_1'', ''deur'', ''UsedKeyOnDoor'', true);
AddEntityCollideCallback(''Player'', ''doorclose'', ''Collidedeur'', true, 1);
}