I have a variable called takeTicket, in a script after an interaction i want to set it to true.
so I put
takeTicket = true;
but it doesnt seem to work... Am I using the wrong command?
Ok: let me know if this is what you did
//At top of global script
bool takeTicket;
export takeTicket;
//At script header
import bool takeTicket;
//Some script
takeTicket=true;
As Joe displayed, if you want the variable available to all your scripts, you will have to export/import it.
However, you didn't say what exactly the problem was. Was there an error message, or did the variable not appear to change correctly, or what exactly happened?
well there's a condition on an object, that once it falls out of a window the character can pick it up. So while it's in the window the takeTicket=false and when It falls it should change to true but it doesn't. There's no error though.
Okay, can you show us where you put that code? i.e., copy and paste the whole function inbetween [ code ] and [ /code ] tags (without the spaces).
Yea I got it now, that import export is what I was missing. Thanks alot for the help!!! ;D