it's possibile create deduction room like sherlock?

Started by katie08cd, Fri 20/04/2018 18:14:07

Previous topic - Next topic

katie08cd

it's possible create a deduction room, like that of Sherlock Holmes: Crimes & Punishments, which allows you to place the texts and then match them in the right way, not the graphics of course, but the ways to move and match like drag and drop


selmiak

either use dynamic sprites, but this is not that easy for a beginner or just make the whole screen an inventory and make the choices/option inventory item and inventory item mouse cursors, add them all on room entry to the player inventory  (cCharacter.AddInventory(iInvitem);) and code your interactions this way.

Crimson Wizard

Hello.

The simpliest way, I think, is to use GUI with buttons and/or labels. You put the graph "nodes" sprites on buttons and place labels near them.

There is a problem with AGS that you cannot create objects at runtime with a script command. This means that if you use GUI buttons, you would have to precreate a bunch of buttons (think of maximal number you would need), make them all invisible. Then, when you are opening GUI for player, set up a graph by taking available buttons from this "pool", making them visible, configuring their image and text, and so on.

For drag and drop you may use my Drag & Drop module, which you have already found it seems.
If you are using buttons, then that module has a simple mode for dragging them around, you need to install both DragDrop and DragDropCommon modules, and then work with DragDropCommon commands. Check the DragDrop demo game for script examples.

Alternatively, if solution with buttons does not work for you for some reason, you may script custom "entities" on GUI, but that way you would have to control them yourself, script their creation, removal, drawing (using DrawingSurface and DynamicSprite script classes, check them out in the manual), and so on. You may still integrate DragDrop module to drag them around, although that would require more scripting from your side.

This is all general information for you, to begin with something.

katie08cd

thanks to everyone, or I was thinking of creating a second inventory and when you talk to a character while you say goodbye, you add an inventory object (piece i card) but only in that second inventory, so that you can then make the combinations to finish the mission

could I also do it this way? create a second inventory and how can I do?

sorry for my english

ps. can I publish my other video tutorials such as the map with vehicle animation?


Crimson Wizard

#5
Quote from: katie08cd on Fri 20/04/2018 19:33:19
thanks to everyone, or I was thinking of creating a second inventory and when you talk to a character while you say goodbye, you add an inventory object (piece i card) but only in that second inventory, so that you can then make the combinations to finish the mission

could I also do it this way? create a second inventory and how can I do?

In AGS a Character may have only one inventory, but you can use second "dummy" Character for second inventory. That dummy character will never be shown anywhere, but you may access its inventory and display it on screen just like you do with real character.
You can create multiple different inventories that way.

When you have InventoryWindow in the editor, there is a property called "CharacterID". Put an ID of dummy character there to display its inventory.

katie08cd

Quote from: Crimson Wizard on Fri 20/04/2018 21:49:49
Quote from: katie08cd on Fri 20/04/2018 19:33:19
thanks to everyone, or I was thinking of creating a second inventory and when you talk to a character while you say goodbye, you add an inventory object (piece i card) but only in that second inventory, so that you can then make the combinations to finish the mission

could I also do it this way? create a second inventory and how can I do?

In AGS a Character may have only one inventory, but you can use second "dummy" Character for second inventory. That dummy character will never be shown anywhere, but you may access its inventory and display it on screen just like you do with real character.
You can create multiple different inventories that way.

When you have InventoryWindow in the editor, there is a property called "CharacterID". Put an ID of dummy character there to display its inventory.


wow :) ok work but crash maybe I have to assign the new character while I open his inventory, of the type as player?

Crimson Wizard

Quote from: katie08cd on Fri 20/04/2018 22:37:01
wow :) ok work but crash maybe I have to assign the new character while I open his inventory, of the type as player?

No, I think it should work without that.
When it crashed, what was the error message?
Are you sure you put correct ID?

katie08cd

Quote from: Crimson Wizard on Fri 20/04/2018 22:50:24
Quote from: katie08cd on Fri 20/04/2018 22:37:01
wow :) ok work but crash maybe I have to assign the new character while I open his inventory, of the type as player?

No, I think it should work without that.
When it crashed, what was the error message?
Are you sure you put correct ID?

I solved creating a room (brain) a new inventory with ID4, the ID4 character assigned to his room (brain) and before entering the room (fade in) I put the setasplayer command, it works but I have to fix the inventory buttons, because I do not allows you to exit the inventory, we see that importing the GUI uses the names of the first, however, thanks I'm getting close to what I wanted, making tickets with the clues of the game and then hook them to the right combination

sorry google translate

SMF spam blocked by CleanTalk