Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help with scripts
JetlinerX Offline
Senior Member

Posts: 599
Threads: 49
Joined: Jun 2011
Reputation: 19
#3
RE: Need help with scripts

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! Big Grin

Lead Developer of "The Attic"
~Slade Mitchell

Chapter 3 (REL)

(This post was last modified: 08-17-2011, 09:00 PM by JetlinerX.)
08-17-2011, 08:55 PM
Website Find


Messages In This Thread
Need help with scripts - by NumsefisK - 08-17-2011, 07:12 PM
RE: Need help with scripts - by palistov - 08-17-2011, 08:54 PM
RE: Need help with scripts - by JetlinerX - 08-17-2011, 08:55 PM
RE: Need help with scripts - by NumsefisK - 08-17-2011, 09:24 PM
RE: Need help with scripts - by JetlinerX - 08-17-2011, 09:33 PM
RE: Need help with scripts - by NumsefisK - 08-17-2011, 09:35 PM
RE: Need help with scripts - by JetlinerX - 08-17-2011, 09:36 PM
RE: Need help with scripts - by NumsefisK - 08-17-2011, 09:46 PM
RE: Need help with scripts - by JetlinerX - 08-17-2011, 09:52 PM
RE: Need help with scripts - by NumsefisK - 08-17-2011, 10:00 PM
RE: Need help with scripts - by Obliviator27 - 08-17-2011, 10:08 PM
RE: Need help with scripts - by Your Computer - 08-17-2011, 09:59 PM
RE: Need help with scripts - by NumsefisK - 08-17-2011, 10:20 PM
RE: Need help with scripts - by Obliviator27 - 08-17-2011, 11:06 PM
RE: Need help with scripts - by NumsefisK - 08-17-2011, 11:31 PM
RE: Need help with scripts - by NumsefisK - 08-18-2011, 04:11 PM
RE: Need help with scripts - by Homicide13 - 08-18-2011, 04:21 PM
RE: Need help with scripts - by NumsefisK - 08-18-2011, 05:57 PM



Users browsing this thread: 1 Guest(s)