05-06-2012, 11:45 AM
Alright, Hello.
I love playing custom stories, so I decided to make one. After making a room and a door. I made a key. Now, in my HPS file ther is this script:
Is there anything wrog with it?
////////////////////////////
// Run first time starting map
void OnStart ()
{
}
////////////////////////////
// Run when entering map
void OnEnter()
{ AddUseItemCallback("", "IronKey_1", "mansion_1", "KeyOnDoor",
true);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true); PlaySoundAtEntity("",
"unlock_door", "mansion_1", 1, false); RemoveItem("IronKey_1");
}
///////////////////////////
// Run when leaving map
voin OnLeave
{
}
Also,
When i put the Door_frame02, its invisible. If i click on it i can see the outline and i can move it.
*Note*
I also havent gotten to test my map since i cant start it because of the scripting problem
Error is like this
FATAL ERROR: Could not load script file 'custom_stories/AirmanerX Custom Story/maps/00_firsttryairmaner.hps'!
main (27,1) : ERR : Expected '('
Any help is GREATLY appreciated!
I love playing custom stories, so I decided to make one. After making a room and a door. I made a key. Now, in my HPS file ther is this script:
Is there anything wrog with it?
////////////////////////////
// Run first time starting map
void OnStart ()
{
}
////////////////////////////
// Run when entering map
void OnEnter()
{ AddUseItemCallback("", "IronKey_1", "mansion_1", "KeyOnDoor",
true);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true); PlaySoundAtEntity("",
"unlock_door", "mansion_1", 1, false); RemoveItem("IronKey_1");
}
///////////////////////////
// Run when leaving map
voin OnLeave
{
}
Also,
When i put the Door_frame02, its invisible. If i click on it i can see the outline and i can move it.
*Note*
I also havent gotten to test my map since i cant start it because of the scripting problem
Error is like this
FATAL ERROR: Could not load script file 'custom_stories/AirmanerX Custom Story/maps/00_firsttryairmaner.hps'!
main (27,1) : ERR : Expected '('
Any help is GREATLY appreciated!