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

Topics - Nadarian

#1
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!!

#2
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. :-\
#3
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!
#4
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!
#5
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!
#6
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!
#7
Hi there!

This is de situation: My main character has to go through a few regions in the middle of the scene, where there's a strong lightstream. Those regions continuously adjust his LightLevel to add a realistic touch when he's walking under that light, but here's the problem: If the character walks over those regions because the player clicks on an object or hotspot on the other side of the lightstream, the character goes through it completely unaffected by regions.

How could I solve this? ???

Thanks in advance!!
#8
Hi again!

New newbie question...! I’m trying to change a property in a Hotspot from the General Script, when combining two different items.
When doing so, an error pops up because GeneralScript can’t find that Hotspot. I read something about importing/exporting things between script pages, but I really don’t know how it works nor if this is the way to solve my problem.

Thanks in advance! :)
#9
Hi there!

Though I started using AGS just a few weeks ago for the first time, and my scripting knowledge was near zero at that time, I'm really happy with my first game. Something I'd love to use for my students in the "Analog Photography" subject!


Well, this said, what I'm trying to do in my game (which I really didn't know how to look for in the forums, nor what keywords to use in the subject), is that very recurrent thing of showing something really close when the player looks at an inventory item, an object, a hotspot... That is for example, looking at a book, and having it appearing fullscreen (or just partially), so you can read a page. Then right-clicking to go back to where you were. Or even putting an "Exit" or "Back" button.

I think I read something about Overlays or Dynamic Sprites that maybe could be this, but I'm really not sure about how to make this. In one case, I'd like this to happen when the player looks at something in the inventory, so it should happen no matter where he/she is.


Thanks a lot in advance!!
SMF spam blocked by CleanTalk