Frictional Games Forum (read-only)
what c++ code can i use? - 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)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: what c++ code can i use? (/thread-9695.html)



what c++ code can i use? - DRedshot - 08-10-2011

Title says most of it, to what extent can i use c++ in angelscript? I am very new to c++, and have only made a couple of scripts with it. (Mainly maths based ones and stuff)
can i use any functions which do not require a header #include to work?
as i've said im new to c++ and programming in general, so i don't know the names / terminology of stuff, but hopefully you understand what i mean, Thanks!

also, more specifically, are there any cool or useful tricks you can do with c++ in angelscript? thanks again!



RE: what c++ code can i use? - Apjjm - 08-11-2011

Angelscript has some documentation covering what you can do in it:
http://www.angelcode.com/angelscript/sdk/docs/manual/doc_script.html

Most of the basics from c++ are there.


RE: what c++ code can i use? - DRedshot - 08-11-2011

so just to get this straight, I can use any function; statement, expression or keyword listed on that site, and it will work fine in .HPS script? as a random example, can i use Script Classes, or Object Handles? Thanks for the help


RE: what c++ code can i use? - Your Computer - 08-11-2011

(08-11-2011, 03:34 AM)DRedshot Wrote: can i use Script Classes, or Object Handles?

Yeah, but that should be more practical for HPL3.



RE: what c++ code can i use? - nemesis567 - 08-11-2011

What do you mean by saying that should be more practical for HPL3?


RE: what c++ code can i use? - Apjjm - 08-11-2011

(08-11-2011, 04:33 PM)nemesis567 Wrote: What do you mean by saying that should be more practical for HPL3?
HPL2 only saves the state of variables using the SetLocalVar/SetGlobalVar functions. States of classes aren't saved, and certain features can't be used (import functions).


RE: what c++ code can i use? - Endlvl - 08-11-2011

Dear god i cant wait for HPL3 it is such a pain to not be able to access the objects world coordinates


RE: what c++ code can i use? - Your Computer - 08-11-2011

(08-11-2011, 04:46 PM)Apjjm Wrote:
(08-11-2011, 04:33 PM)nemesis567 Wrote: What do you mean by saying that should be more practical for HPL3?
HPL2 only saves the state of variables using the SetLocalVar/SetGlobalVar functions. States of classes aren't saved, and certain features can't be used (import functions).

Also, the current functions of HPL2 that deal with callbacks may not be capable of handling object handles. I say "may not" because i haven't tested it out yet, but given that you are passing a string to the callback parameter, it should be safe to assume that it won't properly handle object handles.


RE: what c++ code can i use? - DRedshot - 08-11-2011

thanks for the help everyone, i am also looking forwards to HPL 3, it looks like there will be a lot more options and customisability/flexibility than in HPL 2.