Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Racoon

#101
Completed Game Announcements / Doors
Sat 25/04/2020 21:37:55



A long corridor with 5 Doors. You ask yourself what lies beyond? Just go exploring!

Dive into other worlds and solve the puzzles to open the last door.





'Doors' is a fantasy escape room game with at least 17 handdrawn backgrounds and original music.





Features:
- Surreal Worlds
- Solving riddles by a highly demanding bunny
- Weird combinations
- Literally baking a cake



'Doors' is the first game I started making when I found out about AGS and took a lot of dedication to make. Thanks to everyone who helped me make this game. Hope you enjoy! :)


https://www.adventuregamestudio.co.uk/site/games/game/2437-doors/
#102
It finally works!! Thank you so much Matti! (I actually felt like shouting "Heureka" when I saw it worked)

And for the unlikely case someone finds the thread while searching for similar problmes. While looking up on_event I also found a working code for another question I had

QuoteAnd also is there an easy way to prevent the mouse cursor going to "Look" whenever items are combined?

Code: ags


function on_event(int event, int data) 
{
{
if (event == eEventLoseInventory) { //loseInventory
if ((gInventory.Visible==true) && (mouse.Mode == eModeLookat)){
Mouse.Mode=eModeInteract;}
}
}
}

#103
I almost got it solved now, but I mght need a bit help for the rest.

Code: ags
if (button == eMouseLeftInv) {
// interact with item to grab it
if (mouse.Mode == eModeInteract) player.ActiveInventory = inventory[game.inv_activated];
// else process click
else inventory[game.inv_activated].RunInteraction(mouse.Mode);
}
else if (button == eMouseRightInv) 	
{mouse.Mode = eModeInteract;
mouse.UseModeGraphic(eModePointer);} 


Now I can select items in the inventory and deselect them, but only if I right click on an inventory item. So I think eMouseRightInv only gets called when the mouse is on an inventory item. What I want though is to deselect a picked item everywhere while the inventory is open.

I tried something like this, but it does nothing  :(

Code: ags
 else if (button == eMouseRight || button == eMouseWheelSouth){
    // right-click our mouse-wheel down, so cycle cursor
    if (gInventory.Visible==true){mouse.Mode = eModeInteract;
mouse.UseModeGraphic(eModePointer);} 
    else mouse.SelectNextMode();

#104
This is what it looks like if I put it where I think you meant for me to put it:

Code: ags
function on_mouse_click(MouseButton button) {
  
  // called when a mouse button is clicked. button is either LEFT or RIGHT
  if (IsGamePaused() == 1) {
    // Game is paused, so do nothing (ie. don't allow mouse click)
  }

  else if (button == eMouseLeft) {
    Room.ProcessClick(mouse.x, mouse.y, mouse.Mode );
  }
  else if (button == eMouseRight || button == eMouseWheelSouth){
    // right-click our mouse-wheel down, so cycle cursor
    mouse.SelectNextMode();
  } 
  else if (button == eMouseLeftInv) {
// interact with item to grab it
  if (mouse.Mode == eModeInteract) player.ActiveInventory = inventory[game.inv_activated];
// else process click
  else inventory[game.inv_activated].RunInteraction(mouse.Mode);
      }
  else if (button == eMouseRightInv) on_mouse_click(eMouseRight); // redirect to standard right click 
  else if (button == eMouseMiddle) { 
    // Middle-button-click, default make character walk to clicked area (a little shortcut)
    // Could have been just "player.Walk(mouse.x,mouse.y)", but it's best to
    // leave our options open - what if you have a special script triggered
    // on "walking" mode?
    Room.ProcessClick(mouse.x, mouse.y, eModeWalkto); 
  }
  else if (button == eMouseWheelNorth) { 
    // Mouse-wheel up, cycle cursors 
    // If mode isn't WALK, set the previous mode (notice usage of numbers instead
    // of eNums, when it suits us)...
    if (mouse.Mode>0) mouse.Mode=mouse.Mode-1; 
    else 
    { 
      // ...but if it is WALK mode...
      if (player.ActiveInventory!=null) 
      {
        //...and the player has a selected inventory item, set mouse mode to UseInv. 
        mouse.Mode=eModeUseinv; 
      }
      else 
      {
        // If they don't, however, just set it to mode TALK (change this line if you add more cursor modes)
        mouse.Mode=eModeTalkto; 
      } 
    }
  }
}
#105
Thank you, you got a pm!
#106
Recruitment / Looking for Game Tester
Thu 23/04/2020 15:40:05
Hey there,

I am looking for someone to give my game "Doors" a try and let me know if you find bugs or language mistakes (I am no native speaker), before I upload it.
Doors is a fantasy escape room game, if I had to put a label on it and I think it can be finished in 20-25min.

I can not offer much but my gratitude and your name in the credits :)
#107
I tried your code, but it if I add it after the eMouseRight section,then I can not pick up or look at ineventoryitems. If I put the code to the beginning of the on_mouse_click function, it works so far, that I can pick up an item and look at it again, but it still does not change with right click. I also double checked that I put Override built in inventory window click handling to true.
#108
Don´t worry, you are not the only one that had that problem when starting with AGS  :-D
#109
I can´t find any clue in the header of the Global script. But I think I am using Sierra style. I disabled eModeWalkto because its a first person escape room game. So it changes into "Look" and does not actually deselect the piece and I just interpreted that as deselecting because I never went through all modes to see the item again. Sorry, that my description was misleading!

And I will try one more time to gel the label to work like I want to, but then I will just leave it as it is. I think it will be ok even without it.
#110
I did all that, but it still just shows the usual description. The bool was true, I checked that with DisplayText, because this 
Code: ags
if (MaatLooked) lblDescription.Text = "true";
would not work either. I don´t know if its even worth the effort at this point, but thanks for putting up with me.

I use the Sierra Style template. By two click you mean left for ineract and right for look?
#111
Well the bad thing is, it does not work   :-D
It still does not change the description into anything else after the bool turns true.
I even tried abother approach like this
Code: ags
if (Hotspot.GetAtScreenXY(237, 172) ==hotspot[26]) {lblDescription.Text = "Maat"; } 

to see if it would turn out any different, but it does not.
My idea is, that maybe lblDescription.Text = Game.GetLocationName(mouse.x, mouse.y); can not be overriden. But I don´t know.

#112
Sorry, I thought it would not work at all because I tried to make the label in a Gui like the Displaytext Gui, well it was a mess.

But now that I just put hte new label in the statusline, the Hotspot Descriptions show up just fine. But I can not put
Code: ags
if (lblDescription.Text == hMaat.Name && MaatLooked==true) lblDescription.Text = "Maat"; 

in the global script, because it says GlobalScript.asc(61): Error (line 61): undefined symbol 'hMaat'.

#113
2) I don´t really understand the scripting. I tried to make it work somehow by putting
Code: ags
lblDescription.Text = Game.GetLocationName(mouse.x, mouse.y);

in Rep.ex. in the global script and
Code: ags
 if (lblDescription.Text == hMaat.Name && MaatLooked==true) lblDescription.Text = "Maat"; 

in the Rep.ex. room script, but it does not work. Before I make my next game I will watch some more basic scripting videos on youtube, but I think for this one I need to keep it really simple :D

3) Hm, I tried to use your code after enabling custom inv click handling, but now I can not pick up item from the inventory anymore nor look at them.
#114
ildu that is some awesome artwork. I hope to see more from you.
And I like the idea of Captain Corona - the hero that buys groceries for the elders and gifts toilet paper to those in need :D

Concept - cassiebsg
Play ability - ildu
Artistic merit - ildu
#115
1) Oh man, my label was wider than the game width and I just needed to change that. So that was easy to solve   :-[
2) Okay, I read a bit about what Matti wrote in the other thread and I think I might not be able to do that. I will take the easy solution here and just let the character describe it with DisplayText. Thanks for the idea though!
3)I tried to put Mattis code in mouse_on_click, but it did not change anything.
4)Thank you Khris! That is so easy to use.
#116
Hey, so I´ll reuse this thread for some more questions.

I am almost done with my game now (Yay!), and so I have to tackle all things that have been left over till now.

1) I use this
Code: ags
void DisplayText(String text)
{
    lblMessage.Text = text;
    gMessage.Visible = true;
    int time_to_wait = Game.TextReadingSpeed * text.Length;
    WaitMouseKey(time_to_wait);
    gMessage.Visible = false;
}

for my text. Now there are some lines that are too long, that I need to append. I found an example  in the manual,
Code: ags
String mytext = "Hello";
mytext = mytext.Append("World");
Display(mytext);

but I don´t knwo how I would apply it to "DisplayText"".

2) I want the description of a hotspot to change after looking at it. I found this
Code: ags
    if (Hotspot.GetAtScreenXY(mouse.x, mouse.y) ==hotspot[1] && bool==false) // bool is the bool name you gave it and use its hotspot i.d. and even add the players room so it only applies in that room (if global.)
     
    // Describe as this
    else
     // Describe as this
     

posted by Slasher in another thread. But how does "Describe as this" work? Do I make a new Text GUI for it?

3) When I have an item selected in the inventory window I would like to deselect it by right mouse click like it does outside the inventory.

And also is there an easy way to prevent the mouse cursor going to "Look" whenever items are combined?

4) I use this script by Khris to make the Audio play continously
Code: ags
AudioChannel *bgm;
    void SetBGM(AudioClip *music) {
      if (bgm == null || bgm.PlayingClip != music) bgm = music.Play();
    }

and if possible I would like to reduce the volume, when you enter a building. I found this
Code: ags
AudioChannel* chan = aExplosion.Play();
chan.Volume = 20;

but how can I use it without making the clip play again?

If made it through to this, thank you a lot for reading all that stuff!



#117
The Rumpus Room / Re: What grinds my gears!
Sat 18/04/2020 16:04:55
Quote from: Jack on Sat 18/04/2020 15:13:15
What do they sound like?

A very high beep sound. There are frequencies that younger people hear, but older don´t. And I think the same are used to scare of cats.

Quote from: manannan on Sat 18/04/2020 15:45:04
Jesus, how many unwanted cats do you guys have running around your area? I've never heard of these devices.

The rigth question would be: How many strange neighboors are out there?
#118
The Rumpus Room / Re: What grinds my gears!
Sat 18/04/2020 15:08:31
Quote from: Danvzare on Sat 18/04/2020 13:29:37
Here's something that grinds my gears.
Very high-pitched devices, used for scaring away cats or sometimes used in shops to "detract" youths.
Because I can hear those things, and they're nauseating!

Ohhh yes! I can relate so much  :-D Our neighboor has one of these torture devices and I get the feeling that cats don´t care about it at all. But I care! It has become a running gag in our family since we tried to talk to him about it and he said he can not hear it, so we shouldn´t too. He even upgraded it to something that makes a bright light when you get to close, but he had to take that down, because we were not the only ones bothered by it..
#119
Thanks to you as well Cassiebsg& Crimson Wizard! I will try out to make a GUI the next time I want to inlcude something like that.

And I am really greatful, that often my problems are solved within a day everytime I post a question. A lot of nice people around.
#120
Quote from: ManicMatt on Thu 16/04/2020 19:05:45
When you imported the sprite, was it set to "leave as is" or use the top left pixel, or something else? It should be imported with "leave as is" otherwise the whole sprite will be considered the background part of the sprite.

I'm guessing it's that, anyways.

And a GUI is going to be more flexible, especially when an object cannot be called in a global script. But it always helps to learn what it is you're doing wrong for future reference regardless of whether you stick to an object or a GUI.

Ahh, yes that was the problem. Thanks a lot!
Yeah, I am trying to get more flexible, but since I am completly new to coding working with GUI always seems like the more complicated step.
SMF spam blocked by CleanTalk