Anyone need help? - 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 (https://www.frictionalgames.com/forum/forum-35.html) +--- Thread: Anyone need help? (/thread-7825.html) |
RE: Anyone need help? - Roenlond - 05-15-2011 (05-15-2011, 05:45 PM)Dominic0904 Wrote: Thanks for the help with the Lamp thing...now, I got a timer problem. I want to add a timer in so the screen fades to black, this is the code so far. (float string &in asTimer) should be (string &in asTimer) RE: Anyone need help? - Kyle - 05-15-2011 You can't have it as a "float string &in asTimer". The "asTimer" is a string, not a number. I could see someone thinking that it's a float or integer, but it's not. :/ Just have this: void FadeToBlack_01(string &in asTimer) Darn, you beat me to it. On my own thread... RE: Anyone need help? - Dominic0904 - 05-15-2011 That just gave me "No matching signatures to 'FadeOut(string@&, cost uint)' " as well as "Candidates are: void FadeOut(float)" that second part came up as INFO and not ERR RE: Anyone need help? - Kyle - 05-15-2011 Have it "FadeOut(4);" RE: Anyone need help? - Roenlond - 05-15-2011 (05-15-2011, 05:49 PM)Kyle Wrote: You can't have it as a "float string &in asTimer". The "asTimer" is a string, not a number. I could see someone thinking that it's a float or integer, but it's not. :/ I'm sorry, didn't really notice it RE: Anyone need help? - Dominic0904 - 05-15-2011 Thanks again Kyle! Worked great! Btw you've made a really great thread haha, just gonna say thanks personally, you've helped me a lot. RE: Anyone need help? - nemesis567 - 05-15-2011 (05-15-2011, 05:45 PM)Dominic0904 Wrote: Thanks for the help with the Lamp thing...now, I got a timer problem. I want to add a timer in so the screen fades to black, this is the code so far. Replace FadeOut("", 4); with FadeOut(4.0f); How do you disable a normal player area or script area? RE: Anyone need help? - X4anco - 05-15-2011 Hello peoples What is a local variable and how do I set it up etc...? RE: Anyone need help? - Kyle - 05-15-2011 (05-15-2011, 07:12 PM)X4anco Wrote: Hello peoples A local variable is as simple as this: x = 1 There are 3 different kinds of local variables, int, string, and float. The difference from x = 1 and a local variable is that x can only be used in the function it is in mostly unless if you carry it over from one function to the next, but nevermind. A local variable can be used all within the whole script. You can use a local variable if you want to check if 2 different things happened and then it check to see if the local variable is whatever. Example: Code: void OnStart() RE: Anyone need help? - nemesis567 - 05-15-2011 A local variable is a variable that works on the script you're using. This is, it will only work on that map, while a global variable would work in all of them. To set a local variable you use the function: SetLocalVarInt(string& asName, int alVal); //If the variable is an integer, where asName is the variable name which can be anything you like, and alVal is the variable value(must be an integer) GetLocalVarInt(string& asName); //Returns an integer and can only be used to get an integer variable. asName is the name of the local variable SetLocalVarFloat(string& asName, float alVal); //If the variable is an float, where asName is the variable name which can be anything you like, and alVal is the variable value(must be a float var) GetLocalVarFloat(string& asName); //Returns a float and can only be used to get an float variable. asName is the name of the local variable SetLocalVarString(string& asName, const string& alVal); //If the variable is an string, where asName is the variable name which can be anything you like, and alVal is the variable value(must be a string) GetLocalVarString(string& asName); //Returns a string and can only be used to get an string variable. asName is the name of the local variable So, does anyone knows How do you disable a normal player area or script area? |