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


Thread Rating:
  • 3 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Language Reference and Guide
Adrianis Offline
Senior Member

Posts: 620
Threads: 6
Joined: Feb 2012
Reputation: 27
#5
RE: Script Language Reference and Guide

That's really good work man, nice one! Very well structured, well laid out.

It'd be great to get some examples of why you might actually use some of the more complicated parts, specifically I was thinking of enumerations (cause I didn't know what they were before, but now I'm not sure why I would want them (in a script, at least)), and reference parameters (cause I've only found 1 excuse to use them so far, and they kick ass). If that's intended for your test maps then I apologise. The AddDebugMessage example for function overloading did this very well, an example that is directly in context of Amnesia modding goes a long way for people who are focused on that

Aside from that, there's a couple of very, very slight knit-picky suggestions Tongue
1 - Theres a bit of a problem in the enum section, where you've provided an example of a couple of items that they player may define stats for, you have this...
HealingPotion vial = HealingPotion::Small;
HealingPotion leatherArmor = BodyArmor::Small;

Forgive me if I am mistaken, but it should be BodyArmor leatherArmor = BodyArmor::Weak;

2 - Do you think that the input-output reference parameter, for the sake of readability would be better when explicitly written as &inout ? I was surprised when you said it would be preferable to just use &, I figured given that you'd pointed out that its better to explicitly write things like HealingPotion::Small; rather than just Small; for the sake of clarity, that similar rules should apply elsewhere, particularly as accidentally returning modified variables could be a real pain in the A to debug

Hope that's useful anyway, like I said, very small and particular suggestions.
Looking forward to the section on classes, keep it up!


P.S. Armour, not Armor, and while we're at it, colour and favourite too Tongue

01-15-2013, 12:49 AM
Find


Messages In This Thread
RE: Script Language Reference and Guide - by Adrianis - 01-15-2013, 12:49 AM



Users browsing this thread: 2 Guest(s)