Anonymous user
AGS Editor & User Interface: Difference between revisions
Jump to navigation
Jump to search
Wikifibeautificationism.
*>Monkey 05 06 |
*>Monkey 05 06 (Wikifibeautificationism.) |
||
Line 2: | Line 2: | ||
''I have an inventory item that I want to display a close-up of when the player looks at it. How do I do this? Is there some sort of top-secret function or code that you guys are not sharing with us beginners? Let's have it, oldie!'' | ''I have an inventory item that I want to display a close-up of when the player looks at it. How do I do this? Is there some sort of top-secret function or code that you guys are not sharing with us beginners? Let's have it, oldie!'' | ||
No. Think about it a little bit. Have you read the manual and learned about | No. Think about it a little bit. Have you read the manual and learned about [[GUI]]s yet? Although I shouldn't have to tell you this, a GUI is like a separate "window" where you can display anything from text boxes and list boxes, to buttons and labels. Buttons can also just be plain images. Basically, there are two different ways that one can do this: use a separate room, or use a GUI. | ||
With a separate room, you will have to make sure that once you are done with the close-up room, you have code in the first room that, once you return to it, it will place you at the same place you were when you looked at the item. You might have to use global variables for this (check the manual regarding them). So basically, in the "'''Look at inventory'''" interaction script, write the command to change the current room to whatever room number you choose as the close-up room. Then, in the "'''Player enters room (after fade-in)'''" script, write the script to display a description of the item, then wait a little bit perhaps, then change rooms to the player's previous room ('''character[ABC].prevroom''' or '''cAbc.PreviousRoom''' for AGS V2.7 and newer). | With a separate room, you will have to make sure that once you are done with the close-up room, you have code in the first room that, once you return to it, it will place you at the same place you were when you looked at the item. You might have to use global variables for this (check the manual regarding them). So basically, in the "'''Look at inventory'''" interaction script, write the command to change the current room to whatever room number you choose as the close-up room. Then, in the "'''Player enters room (after fade-in)'''" script, write the script to display a description of the item, then wait a little bit perhaps, then change rooms to the player's previous room ('''character[ABC].prevroom''' or '''cAbc.PreviousRoom''' for AGS V2.7 and newer). | ||
Line 14: | Line 14: | ||
} | } | ||
For AGS 2.62 or earlier: In your global script, you should see an interface_click function. Inside, there are a collection of if/else if commands. These check to see what GUI (interface) was active and what object (generically called button) was clicked on it. Let's say that you created GUI #6. In the code, add an else if command to check if interface passed 6 as a value. If you are only having an image/button in your GUI, you do not need any other if code to determine which button was clicked, because there is only one possibilty for that GUI. Then, insert the code that will close down the GUI. To activate the GUI, put the code in the "'''Look at inventory'''" interaction event, just like above. | For [[AGS Version history|AGS 2.62]] or earlier: In your global script, you should see an interface_click function. Inside, there are a collection of if/else if commands. These check to see what GUI (interface) was active and what object (generically called button) was clicked on it. Let's say that you created GUI #6. In the code, add an else if command to check if interface passed 6 as a value. If you are only having an image/button in your GUI, you do not need any other if code to determine which button was clicked, because there is only one possibilty for that GUI. Then, insert the code that will close down the GUI. To activate the GUI, put the code in the "'''Look at inventory'''" interaction event, just like above. | ||
==Simulating 3D distance perspective with scalable walkable areas== | ==Simulating 3D distance perspective with scalable walkable areas== | ||
''I have X-number of walkable areas in my room, with incrementing values of scaling, to simulate realistic 3D perspective. But my character looks jerky when (s)he changes size. What can I do?'' | ''I have X-number of walkable areas in my room, with incrementing values of scaling, to simulate realistic 3D perspective. But my character looks jerky when (s)he changes size. What can I do?'' | ||
AGS has a feature called continuous scaling. Simply create one walkable area, and set the top ("rear") and bottom ("front") scaling percentage values, and your character will be scaled smoothly from small to large. TIP: AGS also shows you the percentage value at a certain Y-coordinate within the walkable area. This is great for creating a walkable-area within a walkable-area for, say, lighting effects like street lights and shadows, where you want the scaling to say consistent. | AGS has a feature called continuous scaling. Simply create one walkable area, and set the top ("rear") and bottom ("front") scaling percentage values, and your character will be scaled smoothly from small to large. TIP: [[AGS]] also shows you the percentage value at a certain Y-coordinate within the walkable area. This is great for creating a walkable-area within a walkable-area for, say, lighting effects like street lights and shadows, where you want the scaling to say consistent. | ||
==Characters walk over/through things; Characters shift suddenly sometimes== | ==Characters walk over/through things; Characters shift suddenly sometimes== | ||
Line 29: | Line 29: | ||
''Can I delete stuff in the editor somehow, besides sprites and animation frames? For example, can I delete characters?'' | ''Can I delete stuff in the editor somehow, besides sprites and animation frames? For example, can I delete characters?'' | ||
No. If this were possible, then beginners could potentially screw up their game big-time. To avoid frustration and accidents, Chris has disabled the deleting of most things. But what if you don't need that extra inventory item for now? Or what if you don't want that extra GUI you created? Although you can now delete GUIs in AGS, there is an alternative. Just set the GUI so that it never appears (Set it to "Popup Modal"), or simply never refer to the inventory item. If you can't delete it, ignore it. | No. If this were possible, then beginners could potentially screw up their game big-time. To avoid frustration and accidents, [[Chris Jones|Chris]] has disabled the deleting of most things. But what if you don't need that extra inventory item for now? Or what if you don't want that extra GUI you created? Although you can now delete GUIs in AGS, there is an alternative. Just set the GUI so that it never appears (Set it to "Popup Modal"), or simply never refer to the inventory item. If you can't delete it, ignore it. | ||
To delete a GUI, just click the "'''Delete this GUI'''" button. '''WARNING:''' You must be ''' ''very careful'' ''' in doing this, as items in AGS are referenced by number; if you delete a GUI that is not the last in the list, the GUI IDs will be renumbered. As a result, it is possible that your game's script will refer to the wrong GUIs or even a non-existing GUI, causing crashes that end up being difficult to track. Fortunately, you have a name for each of the GUIs. If you only refer to them with their script names (i.e., you didn't type in the '''exact''' GUI IDs in your scripts), simply recompile all the rooms ('''Game -> Rebuild all room files''') and then save the game. | To delete a GUI, just click the "'''Delete this GUI'''" button. '''WARNING:''' You must be ''' ''very careful'' ''' in doing this, as items in AGS are referenced by number; if you delete a GUI that is not the last in the list, the GUI IDs will be renumbered. As a result, it is possible that your game's script will refer to the wrong GUIs or even a non-existing GUI, causing crashes that end up being difficult to track. Fortunately, you have a name for each of the GUIs. If you only refer to them with their script names (i.e., you didn't type in the '''exact''' GUI IDs in your scripts), simply recompile all the rooms ('''Game -> Rebuild all room files''') and then save the game. | ||
Line 175: | Line 175: | ||
Read the manual as well, AGS currently supports only 16 colour standard Windows '''.ICO''' files. | Read the manual as well, AGS currently supports only 16 colour standard Windows '''.ICO''' files. | ||
The AGS 2.72 beta, however, supports more sizes and colours in Icons if the game is created with Windows 2000 or XP. | The [[AGS Version history|AGS 2.72]] beta, however, supports more sizes and colours in Icons if the game is created with Windows 2000 or XP. | ||
==When I click on anything in the help, I get "The page cannot be displayed"== | ==When I click on anything in the help, I get "The page cannot be displayed"== |