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


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help and or Assistance
Tesseract Offline
Senior Member

Posts: 498
Threads: 7
Joined: Mar 2011
Reputation: 18
#1
Help and or Assistance

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
04-28-2011, 01:42 PM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#2
RE: Help and or Assistance

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:

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()
{
}

04-28-2011, 02:11 PM
Find
Tesseract Offline
Senior Member

Posts: 498
Threads: 7
Joined: Mar 2011
Reputation: 18
#3
RE: Help and or Assistance

Thank you!

it is now starting to make sense, ill give scripting another go hopefully i do better Smile
04-28-2011, 02:22 PM
Find
Khyrpa Offline
Senior Member

Posts: 638
Threads: 10
Joined: Apr 2011
Reputation: 24
#4
RE: Help and or Assistance

Don't mind me but green billboards from blue window into gray lighted room?
04-28-2011, 04:46 PM
Find
Exostalker Offline
Member

Posts: 204
Threads: 10
Joined: Aug 2010
Reputation: 3
#5
RE: Help and or Assistance

(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

04-28-2011, 04:52 PM
Find
Tesseract Offline
Senior Member

Posts: 498
Threads: 7
Joined: Mar 2011
Reputation: 18
#6
RE: Help and or Assistance

(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.
04-29-2011, 12:00 AM
Find




Users browsing this thread: 1 Guest(s)