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 - Cassiebsg

#1161
Or we can just play them as they are released, and take notes for nominations in a text file.   (laugh)
#1162
Sorry, cat.

Don't know what happened, the sharing for the files was off. Though it was on when I uploaded it.  :-\
Fixed.
#1163
Cool. :) Take the master to make it better.  :-D
#1164
you're right   :-[ try this...  (roll)

else if (intHour>=6 && intHour<=18) SetBackgroundFrame(2); // Day Backgrund

Code: ags

void CheckRoomBackground()
{
  if ((intHour<6)||(intHour>=19 && intMinute>=1)) SetBackgroundFrame(0); // Night Background
  else if (intHour==6 && intMinute==0) SetBackgroundFrame(1); // Dawn Background
  else if (intHour>=6 && intHour<=18) SetBackgroundFrame(2); // Day Backgrund
  else if (intHour==19 && intMinute==0) SetBackgroundFrame(3); // Sunset Background
}
 
#1165
The Rumpus Room / Re: Open the puzzle pod
Thu 23/01/2020 19:20:00
uhm
Spoiler

Seems like neither delete nor back space would work, as they have more than 5 letters... But space would fit if I throw the bar away. ;)

However, I could also do this:

        CAGE CAGE CAGE

        LOCK bear   CAGE
        CAGE CAGE CAGE

And Enter would be very useful!
[close]
#1166
I found the problems,
- The first is that my check for hour was looking for a specific time, that would never be.
- The second wass that the first "check" for the clock come only after the clock reached the first hour, so the clock would show 00 and then jump to 10 after the first hour.

So I fixed it, it now. I'll try and explain how you can fix it (it's just copy/paste & replace in the right place).

Open CustomScripts Script and copy/paste the following code (replace all the lines in the script):
Code: ags

// new module script

void AdjustClock()
{
  if (intHour<=11)Bclock24.NormalGraphic=100+intHour; // 100 is sprite number that corresponds your clock at 00:00 
  else Bclock24.NormalGraphic=100+intHour-12; // Need to remove 12h to get the correct sprite number		
}

void CheckRoomBackground()
{
  if ((intHour<6)||(intHour>=19 && intMinute>=1)) SetBackgroundFrame(0); // Night Background
  else if (intHour==6 && intMinute==0) SetBackgroundFrame(1); // Dawn Background
  else if (intHour>=6) SetBackgroundFrame(2); // Day Backgrund
  else if (intHour==19 && intMinute==0) SetBackgroundFrame(3); // Sunset Background
} 


Now open CustomScripts Header and copy/paste the following code:
Code: ags

import void AdjustClock();



Open GlobalScript and locate the following two lines and replace them with: AdjustClock();
Code: ags

if (intHour<=11)Bclock24.NormalGraphic=100+intHour; // 100 is sprite number that corresponds your clock at 00:00 
else Bclock24.NormalGraphic=100+intHour-12; // Need to remove 12h to get the correct sprite number		


Lastly, open Room40 script and add the same line to room_load and it should look like this:
Code: ags

function room_Load()
{
  AdjustClock();
  CheckRoomBackground(); // this script can be found in Scripts->CustomScripts and it will change the room background acording to the clock at game start
}


Note: This last code you should add when you create a new playable room. Also take notice that if other rooms need to start at a specific time, you can just add a line before AdjustClock();, and type intHour=8; this would make that room to start at 8:00.
I'm not sure how you are planing to set the rooms, but if you have a case per room and they all need to start at 9, then just add the intHour=9; code to the room_Load of all your rooms. If not the clock will continue counting from when it stops (I set it to count if it's visible, so remember to turn it off if the player is accessing a GUI like save or settings...)
#1167
I forgot to mention I changed the greyout commands. It's changed in settings "When player interface is disabled, GUIs should". I just set it to Normal, as I I don't like the greyed out that is default to Sierra template. And it made the clock look weird.

Oh, I see. this is what happens when I code and don't test all options.  :-[
Give a me sec to figure out.
#1168
That is not sprite number, it's hour.  :~(
#1169
A forum for them would make it easier to find them.
I have this vague idea that there's also a speech dialogue editor somewhere...
#1170
NONONONO

Just open Global Variables, edit intHour and set the default to 9!
#1171
@fernewelten :) Thanks, the video for Mamma Mia doesn't work though, as it says "null: If the owner of this video has granted you access, please sign in."
#1172
Okay, I'm back.

I started by checking the sprite numbers, and the sprite for clock 00:00 was the last one of the series, not the first.
So I started by re-numbering the sprites. They now run from 100 to 111, and 100 is 00:00, 101 is 01:00, etc, up to clock 11:00.
I had to delete the frames on the clock view, but you don't need them anyway.

Here's the remaining changes I did:
Code: ags

function repeatedly_execute_always() 
{
  if (gClock.Visible==true)
  {
  intSecunds++;
  if (intSecunds==60*GetGameSpeed())
  {
    intMinute++;
    intSecunds=0;if (intMinute==20) // Because you wish to change the hour at every 20 minutes and not real time (every 60 minutes).
    {
      intHour++;
      intMinute=0;
      if (intHour<=11)Bclock24.NormalGraphic=100+intHour; // 100 is sprite number that corresponds your clock at 00:00 
      else Bclock24.NormalGraphic=100+intHour-12; // Need to remove 12h to get the correct sprite number
      if (intHour==12 || intHour==24) 
      {
        Bclock24.NormalGraphic=100; // this resets the clock image to 00:00
        if (intHour==24)
        {
          intHour=0;
          intDay++;
        }
      }
    }
    CheckRoomBackground(); // this script can be found in Scripts->CustomScripts and it will change the room background acording to the clock at game start			
    }
   //player.SayBackground(String.Format("%d:%d:%d", intHour, intMinute, intSecunds/GetGameSpeed())); // for debug purpose, player will tell the time
  }
}


I created a new Script in called CustomScripts (use it to add new scripts you wish to call from anywhere in script, and don't want it messed with GlobalScript functions).

Here you find the new function:
Code: ags

void CheckRoomBackground()
{
	if ((intHour<6)||(intHour>=19 && intMinute>=1)) SetBackgroundFrame(0); // Night Background
	else if (intHour==6 && intMinute==0) SetBackgroundFrame(1); // Dawn Background
	else if (intHour>=6 && intMinute>=1) SetBackgroundFrame(2); // Day Backgrund
	else if (intHour==19 && intMinute==0) SetBackgroundFrame(3); // Sunset Background
}


And in the Header: import void CheckRoomBackground();

Use this function to set you your room before fade in (as seen in room 40):

Code: ags

function room_Load() // remember to plug this function to room events, just copy/pasting it won't work.
{
	CheckRoomBackground(); // this script can be found in Scripts->CustomScripts and it will change the room background according to the clock at game start
}


Also, if you open Room40 and look at the Backgrounds, you'll notice I've added 3 new BGs.
Background 0 (default) is the one you had, which is Evening/Night,
Background 1 is Dawn,
Background 2 is Day,
Background 3 is Sunset.

Note: I don't know what happens if AGS tries to set a Background in a room that only has 1 background. I'm guessing the two options are "Nothing happens or game crashes..."  (roll)

Here's your source back: https://www.mediafire.com/file/vo67divmugtk8sc/orologio.zip/file
#1173
Ooooh... a secret hidden hotspot!  (laugh)
#1174
I fixed it, there's a if/else missing to change the sprite number when intHour is bigger than 11, need to subtract 12 to get the correct sprite to show again.
I'll post the fixes (there's more than one) later, as I needed to leave  now.
#1175
Please show me the numbers of your clock images. Sprite number.

No.

1. intSecund is keeping track of the seconds that have passed. Once the seconds reach 60 they are reset to 0 and to intMinute is added 1. This keeps repeating, until intMinutes reaches 20 (because you want 1 hour in game to equal 20 minutes in real life time), then IntMinutes gets reset to 0, to intHour it's added 1 and the clock changes to the next sprite.

2. There's in no stop sprite, just the sprite that corresponds to clock at 00:00!

And also, that is not the code I posted before. You have changed it at one point or another, and thus it does not work.  :-\ Please copy/paste my code (https://www.adventuregamestudio.co.uk/forums/index.php?topic=57712.msg636615180#msg636615180) and do not make changes. I have edited my code to add the missing closing bracket.
#1176
 //intSecunds++; <-- this is commented out. That's why the clock isn't running. Remove the // from it

Also, please wrap your code here in the forum with the [ code] [ /code] tags, or copy/paste and then select/highlight your code and choose the # button.
#1177
Please copy paste the entire function.  :-\
#1178
Looks really lovely and those cutscenes are just awesome!

Best of luck with final production. :)
#1179
Quote
I did not understand. I think I choose English translation for main language.

Can you explain this better? Do you mean you right clicked the English in the Translations and choose "Make default language" at some point?

Have you run winsetup to set the game language back to default? or do you mean it's set to default and the game still runs in English?

Did you just run F5, F7 or build all files?

If the English.tra is in the data folder inside compile it might still be copied to the game compiled folder (windows or linux) even if it's not longer part of the game project, I think. Also if it was previously there and you build a version without it now, you still need to manually delete the file from there as well...
#1180
uhm... number too big that my mind explodes.  Math is not my forte...


My script "manually" animates your clock every 20 minutes.
So it does exactly what you want to do with the animation (Meaning you don't need to animate the button it at all! as I'm manually changing it at the appropriate time).
Note that if you are animating the clock, changing the clocks normalGraphic will likely not work. Since there's a warning about it in the manual. My advice is: forget animating the clock. That's not really what you want, when we talk about animating is something that will run a quick/short animation sequence once or keep repeating it.
Delete or comment out the Bclock.animate command, and go with the code.


SMF spam blocked by CleanTalk