Frictional Games Forum (read-only)
Scripting definitions? - 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 - Development (https://www.frictionalgames.com/forum/forum-38.html)
+--- Thread: Scripting definitions? (/thread-9213.html)



Scripting definitions? - Rel - 07-18-2011

Could someone tell me a good place with simple definitions for things like If and void and those types of things in scripts?


RE: Scripting definitions? - Ouroboros - 07-18-2011

If you're asking what I think you're asking, functions can be bool, int, and so on and at the end have "return(a number or true/false);" at the end, which gives that to a variable somewhere else. Void means that it doesn't have a value to give to a variable.

If works by checking if something is true or not.

if(A == B) {do something}
else {something else}

If A had a value equal to B then it would do the first thing, if not then it would do the other thing. Of course adding else is optional.

Is that what you were asking? If it is, I can post more about some things you can do with if statements.


RE: Scripting definitions? - Tanshaydar - 07-18-2011

http://www.cprogramming.com/tutorial.html


RE: Scripting definitions? - Rel - 07-18-2011

(07-18-2011, 08:44 AM)Ouroboros Wrote: If you're asking what I think you're asking, functions can be bool, int, and so on and at the end have "return(a number or true/false);" at the end, which gives that to a variable somewhere else. Void means that it doesn't have a value to give to a variable.

If works by checking if something is true or not.

if(A == B) {do something}
else {something else}

If A had a value equal to B then it would do the first thing, if not then it would do the other thing. Of course adding else is optional.

Is that what you were asking? If it is, I can post more about some things you can do with if statements.

Ya thats exactly what i meant haha, and thanks tanshay, im looking around that site now.



RE: Scripting definitions? - Tanshaydar - 07-18-2011

First three or four tutorial should answer all of your questions and let you to get a grasp of general programming logic.