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

#1181
From the manual: Button.Animate(int view, int loop, int delay, RepeatStyle)

So you probably want something like: Bclock.Animate(CLOCK24, 0, 10, eRepeat); (where 10 is the speed the animation will run, and eRepeat to make it animate constantly)

About the last one, it tells you exactly what is wrong. You forgot a } (closing brace).
Now, you don't show your code and cut it, but I can see that there's a dotted line behind 123 that has no closing } bellow it. Try adding a line between line 123 and 124 and add a } under the dotted vertical line.
#1182
The Rumpus Room / Re: Open the puzzle pod
Tue 21/01/2020 13:24:45
And now I just learned something new... and wish I hadn't. Then again, maybe I'll be on the lookout if ever in such a situation.
#1183
Oh, cool! It works now!  :-D
Sorry that I use an old browser... but it's like every time Firefox updates the browser they ruin something I love in it and take control from me to their own automatic crap. And I don't like relinquishing certain things.

Edit:
I do feel this text should be added somewhere:
- If you don't want to translate a line, just leave the following line blank.
- Lines starting with '//' are comments - DO NOT translate them.
- Special characters such as [ and %%s symbolise things within the game, so should be left in an appropriate place in the message.

Maybe they could be added  in the empty space after the search box? Or maybe under the buttons in the blue frame? Or a frame for it self at the top?

But also, very cool that it runs on the browser, since I have spell check on my browser, that solves that problem (at least for me, no idea how spell checking works in other browsers).  :-D

So, from my original request, the only thing missing is the ability to jump to a line, by typing 808 and jumping to line 808.
Thanks again for doing it, I can see a lot of devs and translators being happy with the tool and saving them countless hours of headache trying to find that character that ruined the formating by accident.  (nod)

Edit2:
I tried and saved the file, to compile it. It saves as ags.trs, maybe it could ask to enter file name? Not a big deal though. it's easy to change the file name afterwards.
Also noted it adds an empty line at the top of the file. I tested compiling it with the empty line and the translation seems to work fine with it. So not a big deal, if it's too much work to remove it.

Again, super work! Maybe ready to be posted for others in here to know and start using it?  (not sure how many read the Engine Development forum).
#1184
It's not overkill, it's meant to give you time to play some games and refresh your memory about games you might have played during the year.
And nominating is a huge task, just looking at that huge endless page with lists of games you have barely heard of or remember can be scary. It does make me feel like I want to give up even before I started.  :-\ So being able to go thru the list at your own pace and being able to change your mind later on, makes the task seem more doable.
#1185
Code: ags

function repeatedly_execute_always() // locate this in GlobalScript
{
  intSecunds++;
  if (intSecunds*GetGameSpeed()==2400)
  {
    intSecunds=0;
    intMinute++;
    if (intMinute==20) // Because you wish to change the hour at every 20 minutes and not real time (every 60 minutes).
    {
        intMinute=0;
        intHour++;
        Bclock.NormalGraphic=88+intHour; // 88 is sprite number that corresponds your clock at 00:00 (note that this only works if 89 is hour 01:00, and 90 is 02:00, etc)
        if (intHour==12 && intHour==24) 
        {
          Bclock.NormalGraphic=88; // this resets the clock image to 00:00
          if (intHour==24)
          {
          intHour=0;
          intDay++;
          }
       }
    }
  }
}


Setting the day/night cycle is slightly more complicated. Does your clock show 06:01 ? If not and you just want the BG to show Dawn animation at this time, it's easier. Otherwise I recommend you might want to change the sprite numbers to make it easier when coding.
Let's say that you import all your clocks sprites in order....
Sprite number = clock hour
88 = 00:00
89 = 01:00
90 = 02:00
91 = 03:00
92 = 04:00
93 = 05:00
94= 06:00
95 = 06:01 (Dawn) // would it keep showing 6:01? <--- This situation would mess up the clock, showing the correct hour in my code. My suggestion would be to move it to another number. So that 95 = 07:00 and so on...

If what you want is to show an animation at 6:01 in your room changing from night to dawn to day, then all is needed is to add an if check in the minutes section of the code and keep track of the hour and minute, when  it matches you just tell it to animate and do the changes needed to the room.

If you want the clock to animate then just use
bclock.Animate(view); //where view is the view number or name (all caps). Place this line right after gClock.Visible=True.

I can try and explain in Portuguese, if you think you'll get a better match in the translation, considering Portuguese and Italian match in grammar and derive both from Latin.
Posso tentar explicar em Português, se tu achares que a tradução é melhor, tendo em consideração que Português e Italiano têm a gramática em comum e derivam ambas do Latim.
#1186
I'm not animating anything. I'm just replacing the clock sprite (image) with the next one.
You say in your first post that you have "created a characters clock with a 12-frame loop". So I'm assuming that you want to show only the hours and change the hour every time the hour has changed. So that the player can see what the current hour he's playing.

But now you're talking about a 26 frames animation...  ???

If you only need to show a single image (no animation!) and change the image every game hour, the set the first sprite to your clock 00 as the GUI image background.

If you want to animate it somehow, you will need to create a button, add the image of the first sprite to your clock 00 as the normal button image (note that you can also use this option for a single image with no animation).

CW beat me to the answer. :)
#1187
Sure, cat takes the front and I'll take the back of the stretcher, and we'll bear you anywhere you like.  (laugh)
#1189
How exactly do you want to animate the clock?
From what I understood of what you wrote, the clock changed only at every hour, if it's running on full time like a real clock, then you'll need a lot more sprites (or animate the pointers). Otherwise just do what I told you do to or use Snarky's module.

If you need to use a view for animation, use a button (I can't recall if the background can be assigned a view, but think it's not). Make a button, then assign the view to that button and it will animate.
#1190
Uhm... This defeats the purpose of adding extra languages.  :-\
Meaning that my game now only shows up if you select both English and Turkish. I think ideally it should just look for having at least one of the checked languages.
I can see people using that to find games that are in French, Portuguese, Turkish... etc  Don't think they will be caring about other languages, so I would just select Portuguese if I wanted games that are in Portuguese (or have translation in Portuguese). I'm pretty sure I would careless if it had translations in other languages.

Oh, and BTW, Portuguese is misspelled.  ;)
#1191
Line 11 on my code is how you change the clock sprite.

No idea what you mean by "frame".
#1192
This error seems to be reported: TypeError: this.props.from.trimStart is not a function (23 errors of this kind)
The CSS pane also throws a bunch of errors:
- Unknown property ‘-moz-osx-font-smoothing'. Declaration dropped.
- Expected media feature name but found ‘prefers-reduced-motion'.
- Unknown property ‘flip'.  Declaration dropped.
- Expected media feature name but found ‘hover'.
- Error in parsing value for ‘animation'.  Declaration dropped.
- Error in parsing value for ‘animation-name'.  Declaration dropped.
- Unknown pseudo-class or pseudo-element ‘-webkit-input-placeholder'.  Ruleset ignored due to bad selector.
- Unknown pseudo-class or pseudo-element ‘-ms-input-placeholder'.  Ruleset ignored due to bad selector.
(others similar to the above)

But since it works for Snarky, it just means it doesn't like my old browser. Not your fault.  ;)
#1193
Can it be the usual anti-virus protection shutting down the game? Avast is notorious for hating AGS games.  :(
#1194
You don't need an object to for each period of the day.
Also you have 2 different things in here. One is making the watch and keeping track of time. Another is changing the visual of your BGs to show of day/night cycle.

Concentrate on making the watch first, since you'll need the variables of time to decide when to do your BG change.

First make the GUI and use your  Clock at 00:00 sprite image as the BG.  open Global Variables (the one with a blue globe icon in the project tree). Now right click on an empty place and choose "add new variable...", give it a name like intSecunds. Leave it at int and set the default value to 0. Repeat for intMinutes, intHour & intDay (if you need to keep track of which day it is). You can change the variable names as you see fit. Also they don't all need to default at 00, so if yor game starts at 07:34, then just default Hour to 7 and minute to 34. ;)

now, locate in Global Scripts -> repeatedly_execute_always()

and then add the code to keep track of time:
Code: ags

intSecunds++;
	if (intSecunds*GetGameSpeed()==2400)
	{
		player.SayBackground("1 sec"); // for debugging, delete or comment out with //
		intSecunds=0;
		intMinute++;
		if (intMinute==60)
		{
			intMinute=0;
			intHour++;
			gClock.BackgroundGraphic=Clock00+intHour; // Clock00 is sprite number that corresponds your clock at 00:00 (I'm assuming they have been imported sequencially and in the right order)
			if (intHour==24)
			{
				intHour=0;
				intDay++;
			        gClock.BackgroundGraphic=Clock00; // Clock00 is sprite number that corresponds your clock at 00:00
			}
		}
	}


I'm not saying this is the only way to do it, and have no idea if I forgot anything in here. But I would go with something like this.


Don't have the time right now to give you code to change the game's BG.





#1196
To display the clock use a GUI, no need for characters or views. Just change the sprite of the clock when the timer reaches 20 (or corresponding value of Game Speed). Do the same to change background or set other events in march.

Try and try again, is also a valid way to reach the solution.  (nod)

Decide what is important to keep track of: day? hour? minute? sec?
If you only keep track of seconds, then your variable value will be a big number, which means it's probably easier to keep track of the others, and just reset (like a watch adds a 1 to the next value and resets to zero the current value). This will make it easier for you to keep track, and write if/if else/else clauses that make sense to you.

#1197
Short answer: Yes.

Now hos exactly does this watch move?
1)  Does it run on real time? 1hour of game running = 1 hour in game has passed?
2)  Does it change at a given setting? Like if you do task 1 and 2, the time moves 1 hour, then task 3 & 4 makes the timer move another hour...
3) Another scenario?

So first explain exactly how your clock should work, then we can give you solution (or even code) on how to solve the task at hand.
#1198
Thanks :)

Just one thing, I realize that listing every single language is a monumental/impossible task. But would it be possible to add a text box to enter other, non listed languages? (one at the time)

I have a game with turkish translation, but can't add it to the available languages. 
#1199
I decide to post it on the cog7 (Indiana Jones and the Seven Cities of Gold) forum to get feedback from those translating the demo.

Here's one comment (http://binarylegends.net/forum/index.php/topic,981.msg8509.html#msg8509)
Quote
The editor seems to work but I have one big feature request: I cannot search for strings in the whole file. I assume the web server streams the content, so searching is limited to the part which currently is transmitted. And line numbering would be great.
#1200
Thanks, I can nos see "Please Load trs file".
But when I do load it, all I get is still an empty page. And I have set all scripts on.  :-\

Maybe it just doesn't work with my browser? Firefox 59.0.3 (64 Bits)
SMF spam blocked by CleanTalk