Frictional Games Forum (read-only)
Help and or Assistance - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: Help and or Assistance (/thread-7677.html)



Help and or Assistance - Tesseract - 04-28-2011

Hello all! Big Grin

I am new to the forum but not new to the awesome games!
i have been working on a map for a couple of weeks and it seems to be coming along nicely, i have used the HPL2 editor since it came out, i have made a beginning of a custom story but lost it due to my computer having bad anti virus, anyway i have tried to program for myself but i cant comprehend the language, and am not confident with writing for myself :/ so im curious if anyone would like to either try and put some area scripts in or provide help in how i can understand the placement and meaning of particular functions, i have read the Frictional WIKI and also looked at some threads on here, if you want send me an email or add me on steam.
Pictures:
http://i.imgur.com/wNs1p.png
http://i.imgur.com/gvFC1.png
http://i.imgur.com/CJBI9.png
http://i.imgur.com/3laNr.jpg

Email Infinity92@live.com
SteamID Saffire_92

Thanks for reading! Smile


RE: Help and or Assistance - Kyle - 04-28-2011

Script Functions

The scripting language is quite easy once you get the feel of it. I will describe a little of what some of the parts of script functions do.

string = a word (think of a string of characters)
int = a integer (whole number that can be positive or negative)
float = a part of a whole number and some left (example: 1.3)
bool = a true/false statement
void = The beginning of a function or callback
asCallback = When something happens, it calls a function and then tells it what to do.

void AddEntityCollideCallback(string& asParentName, string& asChildName, string& asFunction, bool abDeleteOnCollide, int alStates);

Lets take this apart, "void" begins the callback, "AddEntityCollideCallback" causes something to happens when two entities collide. The "string& asParentName" shows the name of the more important entity. "Player" can be a asParentName. Which brings us to "asChildName", which is the entity the parent collides with. "string& asFunction" is the name of the function you want to use for when these 2 entities collide. You can put any name you want to, just remember that all strings cannot have a space in it. "bool abDeleteOnCollide" asks if you want the callback to be deleted once these two entities collide. So if you say "true" then the two entities will only collide once when related to the funtion being called. "int alStates" asks you to either type 1, 0, or -1 into that. 1 means when the entity enters it. 0 means when the entity enters or exits. -1 means when the entity leaves it. Also remember to put strings in quotations ("").

Example:

Code:
void onStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "PlayerCollideArea1", true, 1);
}
void PlayerCollideArea1(string &in asParent, string &in asChild, int alState)
{
[INSERT THINGS YOU WANT TO HAPPEN HERE]
}
void onEnter()
{
}
void onLeave()
{
}



RE: Help and or Assistance - Tesseract - 04-28-2011

Thank you!

it is now starting to make sense, ill give scripting another go hopefully i do better Smile


RE: Help and or Assistance - Khyrpa - 04-28-2011

Don't mind me but green billboards from blue window into gray lighted room?


RE: Help and or Assistance - Exostalker - 04-28-2011

(04-28-2011, 04:46 PM)Khyrpa Wrote: Don't mind me but green billboards from blue window into gray lighted room?

Yeah I noticed that too


RE: Help and or Assistance - Tesseract - 04-29-2011

(04-28-2011, 04:46 PM)Khyrpa Wrote: Don't mind me but green billboards from blue window into gray lighted room?

Note that this map is still in early stages of development detail of billboards has not yet been tended to as they are just place holders and ideas, also in the first map in Amnesia they have used light blue billboards and dark grey lights.