To make keys, use this:
void AddUseItemCallback(string& asName, string& asItem, string& asEntity, string& asFunction, bool abAutoDestroy);
asName - (Leave this as "" all the time)
asItem - (Name of the item)
asEntity - (Name of the door to use on)
asFunction - (Name of what to do when you use the key)
abAutoDestroy - determines whether the item is destroyed when used
EXAMPLE:
AddUseItemCallback("", "YourKey", "YourDoor", "UsedKeyOnDoor", true);
**ONLY CHANGE "YourKey" to the name of your key, and only change "YourDoor" to the name of the door.**
To make a monster spawn when you pick up an item, place the monster with the level editor, and make it "inactive." Then use this script:
{
SetEntityCallbackFunc("Name_of_item", "OnPickup");
}
void OnPickup(string &in asEntity, string &in type)
{
SetEntityActive("Name_of_monster", true);
}
Just change Name of Item, and Name of Monster above, to the names that they are in the level editor. You will need to program Nodes for the monster to walk around, and thats something I have yet to learn.
Notes:
Just place a note in the editor, NOTE: IT MUST SAY "note" in the start. Example: "note_paper" so that it is able to be picked up. And then name it what ever you like.
Then the rest is in the Extra_eng.lang file. Use this:
<Entry Name="NAME_OF_YOUR_NOTE">This is the title of the note</Entry>
<Entry Name="NAME_OF_YOUR_NOTE">Everything here is what the note will say.</Entry>
Ask any questions!