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
Testing the boundaries of AngelScript
ApollotheOmnipotent Offline
Junior Member

Posts: 1
Threads: 1
Joined: Jul 2011
Reputation: 0
#1
Testing the boundaries of AngelScript

Hey, just started making custom stories and I had a couple of questions on what exactly is allowed by AngelScript in terms of Amnesia, as well as a model entity question.

In a map I'm working on I'm attempting to fit a castle_arched01 door into a door_way_arched entity, but the two most certainly don't fit together at a 1:1:1 (x:y:z) scale, and even if I attempt to scale the door to the door_way_arched model, I can't seem to get the curvature to line up correctly. Is there any other curved door that the door_way_arched entity was meant to be used with? I've tried a few others, but none seem to fit.

On a more general note, I have some questions regarding how much functionality AngelScript has with Amnesia and how close it is to C++. Is there support for some kind of object-oriented notation (similar to JSON prototyping)? Can I implement structs in my script maps? Is there any support for things like pointers and arrays?

I ask since what I really want to do is track a graph of networked entities that can be dynamically created and tracked (as in the heap space of the application; I assume AddLocalVar+(type) does this since it seems to persist even after a callback function has been popped from the stack) and referenced through a series of nodes. Being able to define structs in the game would make this much easier than tracking localvars through generated names using string functions (which feels about as awful as variable variable names in PHP). I feel like it's possible to maintain the graph structure through the AddLocalVar functions, but very difficult and a layer of abstraction on top would ease bookkeeping a lot.

Thanks in advance for your replies!
07-27-2011, 01:53 AM
Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#2
RE: Testing the boundaries of AngelScript

http://www.angelcode.com/angelscript/features.asp

07-27-2011, 02:02 AM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#3
RE: Testing the boundaries of AngelScript

The door entity of "castle_arched01" does appear to fit easily into "door_way_arched" once having a "wall_door_frame_arched" fitting inside of the "door_way_arched". If the swing door doesn't open and close, then take off a tiny bit of the scale of the "castle_arched01" to have it work correctly.

I haven't tried pointers yet for Amnesia's AngelScript, for I don't see a good reason to use them currently. I do believe arrays work. I'm not completely aware of structs working in AngelScipt, but I never tried. :/


07-27-2011, 02:08 AM
Find
MrBigzy Offline
Senior Member

Posts: 616
Threads: 18
Joined: Mar 2011
Reputation: 8
#4
RE: Testing the boundaries of AngelScript

Arrays work yes. And structs should work too, though why wouldn't you just use classes?

I think there are some small differences in syntax though: http://www.angelcode.com/angelscript/sdk...class.html
(This post was last modified: 07-27-2011, 03:44 AM by MrBigzy.)
07-27-2011, 03:41 AM
Find




Users browsing this thread: 1 Guest(s)