Frictional Games Forum (read-only)

Full Version: String?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
It was mentioned to me I need to make variables to strings... or something, in my .hps file.. how does that work exactly, I have tried to find something about it without luck..... can anyone clarify? The .hps file looks like this:
// Run when entering map
void OnEnter()
{
AddUseItemCallback("", "Masterbedroomkey", "masterbedroomdoor", "UsedKeyOnDoor", true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("masterbedroomdoor", false, true);
PlaySoundAtEntity("", "unlock_door", "masterbedroomdoor", 0, false);
RemoveItem("Masterbedroomkey");
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
As you can see, no errors, but apparently still wrong since my key won't open the door it suppose to
Do any other scripts work?
My first xD
But my lang file works, there's description, name of the key, and all that
Is masterbedroomdoor a swing door or a level door?
(02-08-2012, 09:32 AM)Your Computer Wrote: [ -> ]Is masterbedroomdoor a swing door or a level door?
Just a normal castle door


(02-08-2012, 09:34 AM)Saren Wrote: [ -> ]Just a normal castle door

Believe it or not, that is still vague. Swing doors can be swung open, level doors cannot. If the door is a swing door, then either the key name or door name or both are wrong, or the .hps file doesn't have the same name as the .map file. If it is not a swing door, then you're using the wrong function to unlock the door. Or it's a .map_cache conflict, or something random.
(02-08-2012, 09:39 AM)Your Computer Wrote: [ -> ]
(02-08-2012, 09:34 AM)Saren Wrote: [ -> ]Just a normal castle door

Believe it or not, that is still vague. Swing doors can be swung open, level doors cannot. If the door is a swing door, then either the key name or door name or both are wrong, or the .hps file doesn't have the same name as the .map file. If it is not a swing door, then you're using the wrong function to unlock the door. Or it's a .map_cache conflict, or something random.
1. It's the second door, castle_Arched
2. both have the exact names in both the .lang and .hps
3. Same name
4. Map cache has already been destroyed



Do it in void OnStart instead of void OnEnter
(02-08-2012, 10:11 AM)flamez3 Wrote: [ -> ]Do it in void OnStart instead of void OnEnter
Alright, gonna try that
Edit: Damn... no luck =(
Double Edit: wait, it worked, there was a spelling mistake on the door... that's why... lol, thanks for the help though guys =)