Couple of Questions - 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: Couple of Questions (/thread-8993.html) |
Couple of Questions - DRedshot - 07-06-2011 OK, i have a couple of questions, 1. in my map there is a part where i am froze to the spot, while a few visual things happen, after the visuals are over, a few script areas are activated (AddEntityCollideCallback). If One of these areas are activated whilst i am inside it, will the alState be 1? or will it be undefined untill i leave and reenter it? 2. how do i convert an integer into a string and vica versa? eg Code: void OnStart() RE: Couple of Questions - MrBigzy - 07-07-2011 Er, this code would just set more integers, not create a string. Is there any reason why you would want to do that conversion? Are you trying to suffix strings for multiple callbacks? Also for your first question, I'm pretty sure the boundaries of the area are the only thing that trigger the state and not the area itself. I could be wrong though; you would have to do some testing if you need to find out. Doing a debug might give you a message telling you whether you entered it or not. RE: Couple of Questions - DRedshot - 07-07-2011 Yeah, basically, my script has 9 areas, named simply 1 to 9, and if im in one of these areas whilst looking away from an entity, named entity1 and entity2, it spawns a new entity, either entity1_(1 to 9) or entity2_(1 to 9) depending on which area im stood in. i hope that makes sense to you, and thanks for answering my first question, i will try a debug message in a minute EDIT: I managed to get it working fine, i declared int i as a string, and used LocalVarStrings instead of LocalVarInts RE: Couple of Questions - Apjjm - 07-07-2011 Just for future reference, to you initial request for #2. Integer to string conversion is easy, just append the integer onto the end of a string and angelscript will do the rest. Code: //Example usage Code: //Usage: RE: Couple of Questions - DRedshot - 07-07-2011 Thank You, that may come in handy at some point. |