Updating script support, taking requests - 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: Updating script support, taking requests (/thread-22612.html) |
RE: Updating script support, taking requests - PutraenusAlivius - 08-29-2013 (08-28-2013, 05:26 PM)Patrik Wrote: Some nice suggestions so far. Keep them coming! Make the if-else function to be able to interpret from Bools too instead of just Integers. PHP Code: if(1) could be the same as PHP Code: if(true) EDIT: Patrik, the source of this problem came from YC in this post http://www.frictionalgames.com/forum/thread-21190-post-217490.html#pid217490 RE: Updating script support, taking requests - felixmole - 08-29-2013 (08-27-2013, 12:29 PM)JustAnotherPlayer Wrote: Can you make the if-else function that the parameter could turn Integers to Bools and vice-versa? This is inherent to the AngelScript language, use casts (even though it's bad) to overcome these errors. RE: Updating script support, taking requests - PutraenusAlivius - 08-29-2013 Hold on, change the if-else AND the switch statement to accommodate this please. RE: Updating script support, taking requests - Adrianis - 08-29-2013 (08-29-2013, 01:12 PM)JustAnotherPlayer Wrote: Hold on, change the if-else AND the switch statement to accommodate this please. That's not necessary Code: bool IntToBool (int x) RE: Updating script support, taking requests - fancreeper - 08-29-2013 I have a little question.Is it possible to make outside levels,like in AAMFP,with the updated version of ATDD?I don't know if this question was asked before,but I can't find it anywhere. RE: Updating script support, taking requests - WALP - 08-29-2013 (08-29-2013, 03:00 PM)fancreeper Wrote: I have a little question.Is it possible to make outside levels,like in AAMFP,with the updated version of ATDD?I don't know if this question was asked before,but I can't find it anywhere.you can do that in the current version sir (that is given you have the right custom assets) RE: Updating script support, taking requests - Apjjm - 08-29-2013 A few more suggestions, mainly regarding entities:
RE: Updating script support, taking requests - felixmole - 08-29-2013 (08-29-2013, 08:44 AM)felixmole Wrote:(08-27-2013, 12:29 PM)JustAnotherPlayer Wrote: Can you make the if-else function that the parameter could turn Integers to Bools and vice-versa? In fact, AngelScript allows you to define implicit casts: http://www.angelcode.com/angelscript/sdk/docs/manual/doc_reg_opbeh.html RE: Updating script support, taking requests - Apjjm - 08-29-2013 I am against the integer to bool implicit conversion on the grounds of legible code. When the boolean type has been made available, it is best practice to use a boolean to represent a boolean value, rather than stick in some coercion to get around the fact that int isn't bool - especially when the language does not do this by default. Just use !=0 - it is far easier to see what is going on at a glance, and it's 3 extra characters. See also: http://msdn.microsoft.com/en-us/library/b6801kcy.aspx http://stackoverflow.com/questions/5554725/which-value-is-better-to-use-boolean-true-or-integer-1 http://geosoft.no/development/cppstyle.html#Variables [Not the only standard obviously...] RE: Updating script support, taking requests - felixmole - 08-29-2013 I agree with this. |