Quote from: Snarky on Fri 22/02/2019 15:22:32
Hi, and welcome!
Slasher already answered your questions, but since I wrote this out, maybe you'll find a second version helpful.Quote from: Olleh19 on Fri 22/02/2019 13:48:13
1. Is scripting another word for programming?
Yeah, basically. Technically speaking scripting is a certain kind of programming, but for our purposes they're pretty much synonymous.Quote from: Olleh19 on Fri 22/02/2019 13:48:13
2. Is this a bad habit i'm using. I followed the Youtube tutorial series and eventually realised i don't need the edges for changing rooms, my drawn rooms are so tight sometimes that i need to be able to walk that "fine line" and i couldn't get it to work without either a hotspot or a region, but hotspots with the Thumbleweed template names the location (it seems, correct me if i'm wrong), so it was the obvious way to go. So i started to use Hotspots for it instead. What are the advantages/disadvantages versus forexample edges or regions? I get that with regions i can change the tint/saturation of the character which i've used a lot already, so that's great! But other then that?
They are meant for different things:
Hotspots are for triggering events that should happen when you click on them (or move the mouse over them)
Regions are for triggering events that should happen when the character walks on them
Edges are for triggering events that should happen when the character crosses themQuote from: Olleh19 on Fri 22/02/2019 13:48:13
2. I have a puzzle idea that i want to create that seems impossible to create with the little basic knowledge i have, as i understand it from what little information i've gathered is what needs to be done is someform of global variable. After watching another youtube video named "HOW TO QUICKLY MAKE A SIERRA/LUCASARTS ADVENTURE GAME | Adventure Game Studio Quick Tutorial". I learnt how to do it with an item from the inventory, but in my case. There is no item. It's just a object or two, one for when the cable is in the wall and one laying on the floor. That if using the right command (Player is supposed to pull a plug, the screen should then go blank in the room, when putting the plug back in, the screen should work again. Let me rephrase that whole section for what it is i am going to do, perhaps it's much easier for you guys to get the grasp then. The Puzzle idea in a nutshell is this ==
A computer when entering the room first time is in error mode/state but it's turned on, so the player should be able to look at the screen with it's error (which will probably transition to another room, since i don't know any better! Haha). The reset button is stuck, so the player has to go to the back of the computer, unplug the cable (which should make the object/lights of the screen disappear momentarly). Then plug it in again, now the object should light up the computer screen again, obviously. However Now when the player clicks "look at screen" (All this is happening in the same room, to be clear!) it should instead show a login screen where the player needs to type a correct password. That password should be found in another room, but if the player knows the password before, there should be no need to find out the password in the other room. I hope that was a clear explanation of the puzzle i'm trying to create
Sure. So:
-A different room for the computer screen is fine, that's a perfectly normal way to do it.
-When you unplug and replug the computer, you could make an object visible with the new screen state. Clicking that object could potentially bring you to another "computer screen" room.
-However, as an alternative you could use a global variable as you say, and use the same "computer screen" room and display different things on the screen depending on that variable.
-If the password isn't an inventory item, you probably do need a global variable to keep track of whether the player has it. You can create one called "knowsPassword" of type bool. Then to check whether the player knows the password you write something like:Code: ags if(knowsPassword) { // TODO: Log in to the computer } else { // TODO: Say something like "Looks like a need a password" }
Then in the other room, if the player learns the password you just write:Code: ags knowsPassword = true;
Quote3. E-block is confusing to me, a lot of people seems to use it on youtube. I was hoping what it does is make the animation none canceable, is that correct? So forexample when me and my friend plays point and click games, many times in dialogs we accidently hit a mouse button and it skips. I want that to NOT be able to happen, at least the first time you hear a dialog, then perhaps you could be able to skip it if it repeats. How would you go on about creating that?
eBlock and eNoBlock are alternative ways to run animations and some other actions (the e at the beginning just means that they're "enum" values: a fixed list of options to choose between – in this case block or no-block). The difference is whether the rest of the script "blocks" or not: blocking basically means that it pauses, waiting for the command to finish before it continues on to the next line. When the game is blocked, most interaction is disabled.
Blocking is the easiest way to have a bunch of things happening in order (which is often called queuing actions). (Speech, for example, is blocking: A character says one line, and the game waits for that line to finish before the next line.)
Speech can be skipped by a key or mousebutton press (depending on your settings), but many blocking commands cannot be interrupted. So to do what you describe with making actions cancellable, they usually need to be non-blocking. However, queuing actions becomes much more difficult that way, so as a newbie I probably wouldn't attempt it.
Thanks so much for your thoughtful explanation! Well i have a lot of questions. I can already see you guys saying to yourself "read the manual". Well i'm trying too! the scripting part is easy to understand in the beginnings but like i've said it's a bit of chinese once he starts to name different += -= and what it does only in "values" not in examples, which would have been more helpful. For someone who have never done anything like this before. Is there anything i should read before reading about the scripting to make me understand it better, if you know what i mean? The parts before scripting i already understood
Forexample "go to this webpage and read about basic programming for this and that, that will clear out things, how to set variable, when to use a += versus -= etc etc!".
I think that's very unclear since he is not giving real life examples just saying what happens to the numbers. It's not "clicking" in my brain, how should i know what happens to those numbers if no example is given except for one instance, where the character says 3 different lines and then repeats the last one. I managed to get it to different outcomes by using -= and += or raising the number, etc, but i didn't "see the logic". If that makes any sense? Like when should i have used += instead of just ==0 which was in the example, in what example would that be more viable? It makes no sense to me. Unfortunaly the answer you gave is still over the top of my head. I don't know "abc" yet. All i know is how to display a message when the player does something, or perhaps looks at something and say something either player/cego or "display", how to pick something up, make the object go into the inventory and disappear on the screen. That's the only things i've learnt from the manual and youtube so far. Thanks ever so much again both of you guys replied quicker then i would ever have imagined!
