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!
CHANGE IT TO THIS
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 1, false);
RemoveItem("IronKey_1");
=====================
Try not to space everything out. (I am not sure if that was a glitch with copying and pasting)
Put the script functions into these
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 1, false);
RemoveItem("IronKey_1");
}
you should read more up on scripting and maybe watch some videos on the wiki site to understand scripting more. If you just want to use a key on a door you would need a script like this
Spoiler below!
void OnStart()
{
/// use "castle_key_1" on "castle_door_1" door => calls "KeyOnDoor1"
AddUseItemCallback("", "castle_key_1", "castle_door_1", "KeyOnDoor1", true);
}
if you use this as your new hps and call the key for castle_key_1 and the door for castle_door_1 or change it for what you have, it should work and not crash anymore.
(05-06-2012, 11:57 AM)Rownbear Wrote: you should read more up on scripting and maybe watch some videos on the wiki site to understand scripting more. If you just want to use a key on a door you would need a script like this
Spoiler below!
void OnStart()
{
/// use "castle_key_1" on "castle_door_1" door => calls "KeyOnDoor1"
AddUseItemCallback("", "castle_key_1", "castle_door_1", "KeyOnDoor1", true);
}
if you use this as your new hps and call the key for castle_key_1 and the door for castle_door_1 or change it for what you have, it should work and not crash anymore.
Now, go watch some videos
Thanks
The thing is, I changed all Castle Door and Key names into my key and door names (IronKey_1) and mansion_1
Also, in my extra_english.lang file (some guy told me to do that) it says
<LANGUAGE>
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">This is my first try at a custom story. I have no experience at at all.[br]Please send me feedback at airmanerx@live.com.[br] http://www.youtube.com/user/AirmanerX</Entry>
</CATEGORY>
<CATEGORY Name="Inventory"?
<Entry Name="ItemName_IronKey_1">Iron Key</Entry>
<Entry Name="ItemDesc_IronKey_1">Put it in THAT door. Yes, THAT one.</Entry>
</CATEGORY>
</LANGUAGE>
This is correct, right?
Sorry, i dont understand scripting at all. Its like alien science to me. If you have any videos to explain it, id watch them but probbaly not learn anything anyway.
Favorite it in your browser and check out the tutorials there.
EDIT: also if you want the key to display what you put in the extra_english you must first click on the key in the leveleditor. go to entity, then in the customsubitemtypename and write in IronKey_1. so when you pick it up it should properly show name/desc.
The doorframe thats invisible, you sure its just not faceing the wrong way? try rotating it.