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

#1
As simple as that!
My translation text file was probably the only place I had left to look for this GUI_LANGUAGE line...!

Ok, with the art in part of the backgrounds pending, I think I'm done scripting!! So happy and so excited to show it and start testing it right now..!


Thanks a lot, Khris! I promise my next game I won't do it all by myself, but next to an expert coder!  :P
#2
Hi there!

My game is almost ready, but there's still one thing I can't figure out: I already translated the game into the 3 languages I speak, but there's one thing that's not "selftranslating": The GUI verbs.

I read the template pdf instructions in the game folder, but still, I don't understand how can you get the verbs translated when choosing your preferred language in the winsetup.exe. It makes you look into the "guiscript.asc" file, but there's no such file in the folders nor in the editor. It makes you look for this  line:
Code: ags
int lang = eLangEN;
, but I can't find it anywhere in the editor.

So, is it possible to change the language in your GUI by setting your language when running the game?
And then, I have another question: I worked with a language that isn't built in the game. Could I for example modify the verbs in an existing language (french, or portuguese for example) and associate them with the new translation I created (catalan)?


Thanks in advance!!

#3
Thank you all!!

Yes, I know using characters wasn't the easiest or most logical way to go, but it made sense to me... (laugh)
And as I could see with your ideas, there were also many different ways to code this, but I simply couldn't guess the right way. I saw it crystal clear when Cassiebgs posted the code.

Now it's done, and working like a charm! Thanks for all your knowledge!
I'll soon be able to post my first game here!
#4
Yes Cassiebsg! All you said is exactly what I'm aiming for! And though I checked the forum, the manual, and tried many different ways of scripting it... my scripting knowledge is definitely far from letting me get it right. So much so that looking for the right parts of the manual to look for this information, is getting really hard  (laugh)-
And I'm sure what I'm trying to do is not difficult at all, but it's beyond my reach now.

Thanks!! I'll keep trying and learning!
#5
Hi!

My first game is almost finished, but in my nearly zero coding knowledge, I'm stuck in one final puzzle. There's this 3 numbers lock, the usual one with 3 rotating rings with numbers on them, and you need to aling the correct ones.

My first idea (which I don't know if it's the simplest or if it's doable) was to create the 3 numbers as characters with a view with 10 sprites, numbers 0 to 9.
Then, buttons as hotspots with up/down arrows to scroll numbers up and down on each ring. When clicking "up", next sprite on that character should be shown. Same with "down", showing the previous sprite. This is the first step where I got stuck... using this:

Code: ags

function hBoto1_Up_AnyClick()
{
   cBoto1.LockViewFrame(13, 0, 1, eStopMoving);
}


isn't correct. Every "Any click" should keep scrolling and scrolling numbers, but I don't know how to code that it keeps changing the frame, one by one.


Then, there should be a line in the code that recognizes that the correct 3 numbers code has been set, to trigger the next cutscene.



Seems really simple in my mind and I already set the "characters", their sprites and the buttons and their hotspots, but I don't know how to start coding all this. :-\
#6
I tried to search it again in the manual, just to make sure.
And actually, if you search for "System.ViewportWidth" you get to the old page and it says very clearly: This property is obsolete since AGS 3.5.0. Use Screen.Width instead.

So.. my bad!! This reference table you mention could be great, but a proper use of the manual actually solves these problems.
#7
Ok, yes.. it was this simple! (roll)

Thanks for your patience!!
#8
Going further into development, I found a new problem related to this.

To sum up: I set a few regions in a room that affect main character's brightness while he's standing there, under a stream of light. As you told me, I did it in the baked in level property in the regions, and worked perfectly even when the character was eBlocked

Now, the room next to this one changes the main character's brightness and tint permanently while in there, so when he comes back to the first room, he's still all tinted and dark. To solve it, I coded this:
Code: ags

function room_Load()
{
  cRoger.Tint(0, 0, 0, 0, 0);
}


But then I noticed, doing this sets those levels permanently, and makes those regions levels completely useless. How can I make him go back to its normal levels, while these regions keep working at the same time in that room?

Tanks!
#9
Thank you very much Crimson Wizard!

Actually looked for it in the manual as I already saw this "obsolete commands" thing many times before while searching there. Maybe I searched it wrong this time, because I couldn't find it.
I'll have this in mind, as some of the best tutorials in Youtube are a bit outdated.

Now my credits run smoothly.
Thanks!
#10
Hi there!

I followed the instructions from this 2008 video on youtube https://www.youtube.com/watch?v=79yTq3BQo14 to make my credits centered, but I guess one of these functions is outdated:

Code: ags

function  ShowTextCentered(String text) 
{
  int centerX, centerY;
  int textWidth, textHeight;
  int x, y;
  
  centerX = System.ViewportWidth / 2;
  centerY = System.ViewportHeight / 2;
  
  textWidth = GetTextWidth(text, eFontTumbleText);
  textHeight = GetTextHeight(text, eFontTumbleText, textWidth + 7);
  
  x = centerX - (textWidth / 2);
  y = centerY - (textHeight / 2);
  
  textOverlay = Overlay.CreateTextual(x, y, textWidth + 7, eFontTumbleText, 65535, text);
}


When trying to run it, the error " 'ViewportWidth' is not a public member of 'System' " shows up.
What should I write there instead? Or is there any better way to code this in the newest version?


Thanks in advance!
#11
Ok, solved in less than a minute... and felt a bit stupid here  (roll)
A month without coding, and I mistake custom properties for global variables.

Thanks for your infinite patience, Khris!!
#12
Hi!

I have this ticking looping sound I want to associate to a wall clock, that plays just when you're in that specific room, and permanently stops when you pick up the object (there's background music playing on a loop in the meantime).
I've tried with a custom property, which has worked perfectly for me in many other occasions, but here this "So_Rellotge" gives me the undefined token error all the time.

Code: ags

function room_Load()
{ 
 if  (So_Rellotge)
  {
    aRellotge.Play();
  }


And I really don't know what am I doing wrong, as there are other properties in the exact same function, all working fine, except this one.


Thanks in advance!
#13
Quote from: Crimson Wizard on Mon 20/07/2020 14:22:48
Quote from: Nadarian on Mon 20/07/2020 14:19:33
The error reads:  Error (line 674): undefined symbol 'eModeLookat' in the VerbGui.asc

eModeLookat is a default cursor name for "look" command. Have you renamed existing cursor(s)?

That's exactly what I did, and didn't remember I did, and.... that was the cause of all my problems   :~(
Thanks Crimson Wizard..!! Now I noticed I ALSO messed all the button ID's, so I erased EVERYTHING including inventory, inventory scroll buttons... and remade everything again.

Now my GUI is working perfectly, and learned that the best way to get rid of all the action verbs i didn't need was simply... to turn them invisible  (roll)


After all this, I'm back to trying to solve my main concern: I started writting and scripting my game in my mother tongue, which isn't English, it's Catalan. I have translated almost everything already into English and Spanish too, but I'm having a bad time trying to guess how to change the language in two elements in the main game (I'm posting a pic).

In one hand, verbs sprites. Although I use the sprites where the verbs are written in Catalan, the game always shows the English version (no matter what language I choose in the setup). How can you set what sprites are shown depending on the language you set to play the game? The template offers you verbs sprites in many different languages, but they never change.

And on the other hand, I'd need to change the language in another thing in the main game, so I can translate it later into the other languages. This is, the verbs that are shown next to the cursor when you point things after selecting an action. They are also shown in English by default, and I don't know where in the script I can rewrite them without messing everything again.

Pissarra" border="0
#14
True, sorry about that!!

The error reads:  Error (line 674): undefined symbol 'eModeLookat' in the VerbGui.asc

Then, line 674 reads what I posted earlier. This happened after erasing all the buttons in the GUI, creating new verbs, and then erasing everything again and trying to create the same buttons with the same properties copied from a new template. But clearly there's something I'm missing.
#15
Hi there again!

My very first game was about 90% completed (I had to ask some things here, but got it quite fast with near zero scripting knowledge!), but then after the lockdown here in Spain, I had to go back to work and left the game as it was.

Now I wanted to polish some final details... and completely messed the verbs GUI. I started from a Tumbleweed template, and in the end I saw I was only working with 3 verbs: Use, Pick up and Look at.
I erased all the other buttons and tried to customize the 3 I was using, and then I noticed the mess I did in the crazy long VerbGUI script. To make things worse, the game was saved with no other backups to restore my progress before the mess.


Then, I created a new Tumbleweed template game, and tried to remake all the buttons in my game copying the exact same parameters from the new template. After that, when I try to play the game, there's still an error in the VerbGUI script, line 674:

Code: ags

  else if (new_action == eGA_LookAt) mouse.Mode=eModeLookat;


So I guess there's something more I have to change to the new Look at verb I created, but I really don't know what is it.

If I finally get my game running again... I'll have to ask a couple things more about this topic, and see if I can add the changes I'd like to add. (roll)


Thanks a lot in advance for your time!
#16
Yes! I guess using rooms for title and credits screens wasn’t the best option from the beginning, so I’ll give that a try!

Thanks Slasher and Cassiebsg!!
#17
Ok, silly me. Problem SOLVED
I simply had set FadeIn(1) in second place inside the Room First Load function (it was playing music in the first place). Just put it in first place, so the first thing to happen was the slower fade in, and problem solved.
Now music crossfades AFTER the long fade in and not during it as I'd love to, but i'll live with that  (laugh)
#18
When you run the game, first room is Title screen. At any click, you change to the actual first room in the game.
First time running that room, main character presents himself, the situation, an so on, before you get to control him.

Also, the first time you run that room (so switching from title screen to the game initial room), I'd like the Fade in to be longer. It's str¡ctly necessary, but I think it adds a bit of drama to the situation!
#19
Well, from the previous room I try to SetRoomTransition to Instant, but still doesn't solve the problem.

Now, instead of doing a first normal Fade in and then the slower one, it instantly pops the room for a fraction of a second, and then it runs the slower fade in from black. How can I make it run the long Fade in (i set on room first load) before it even shows the room?
#20
Hi!

I'm having problems at setting a slower speed fade in the first time a room charges. Setting this:

Code: ags

function room_FirstLoad()
{ 
      FadeIn(1);
}


makes the room fade in the usual (quite fast) speed, and then immediately fades in again, but at a slower speed. Is there a way to just slow down the first fade in?


Thanks!
SMF spam blocked by CleanTalk