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

#21
@eri0o
Quotethis Keyboard Movement code is around 20 lines of code at least different from the one in Ash Pines. Is anything different there?

Yes, there's a small difference and it has to do with the number of views in that game. In Ash Pines, the player only has a left and right view rather than my latest/previous games where they have up, down, left, and right views.

Would you like to try a current demo game with your debugger? I can send you a build if you like?
#22
Well, strangely I did convert the system to on_keypress and didn't seem to find that issue (besides the very jittery/slow/clunky movement of the player character). If I could convert it to run as smoothly as on repeat_exe I would to be honest but this still may cause other problems down the line, possibly for others. I did also notice that it halted an animation after moving to another room  and partly froze the game too whilst doing the same thing (Holding ANY keys down during interactions or cutscenes e.c.t)
#23
Having a strange problem since updating to the new beta, I think it may have something to do with the new keyboard handling system. I reverted back to the old via General settings but still doesn't seem to fix the problem.

My keyboard movement script is entirely done in repeatedly_execute(), which previously never interfered with hotspot.runinteraction, strangely if you hold down a movement key while interacting with a hotspot after the interaction completes the player is jolted in the direction of the key being held across the room. Seems to only happen if the game has entered a blocking sequence of some sort, maybe remembering key inputs during the hotspot interactions and playing them right after.

Keyboard Movement Script:
Spoiler
Code: ags

// Main script for module '8 Direction Movement'

import int  KeyUp[2];
import int  KeyDown[2];
import int  KeyLeft[2];
import int  KeyRight[2];
import int  KeyAction[2];
import int  KeyBack;
import int  KeyMenu;
import int  KeySprint[2];


//required values

int xm;
int ym;
int _xspeed=9; //Player Speed
int _yspeed=9; //Player Speed
int xwidth=1;
int ywidth=1;
int slide=3;
int a;
int c;
int dir;
bool diagslowdown=true;
int walkanispeed=2;
bool thrust;
int walkingani=2;
bool disablemove;
bool nodirset;
bool eightdir = false;
int animticks;
int animticks2;
bool standing;

static function EightDir::SetSpeed(int x, int y) {
  _xspeed = x;
  _yspeed = y;
}

static function EightDir::SetSize(int x, int y) {
  xwidth = x;
  ywidth = y;
}

static function EightDir::WalkViewSpeed(int speed) {
  walkanispeed = speed;
}  

  static function EightDir::SetWalkView(int view) {
  walkingani = view;
}  

static function EightDir::SetSlide(int value) {
  slide = value;
}  

static function EightDir::Disable(bool value) {
  disablemove = value;
}  

static function EightDir::NoDirSet(bool value) {
  nodirset = value;
}  

static function EightDir::DiagSlow(bool value) {
  diagslowdown = value;
}  

static function EightDir::Thrust(int x, int y) {
  xm=x;
  ym=y;  
  thrust=true;
}  

static function EightDir::EightLoopsMode(bool value) {
  eightdir = value;
}

static function EightDir::IsMoving() {
  if ((xm!=0)||(ym!=0)) {return 1;}
  if ((xm==0)&&(ym==0)) {return 0;}
}

static function EightDir::IsThrusting() {
  return thrust;
}

bool isInactive() {
  if(player.Room == 0) return true;
  return false;
}

int moveto(int val, int incr, int target)
{
  bool lt = val<target;
  bool gt = val>target;
  int old = val;
  if(lt) val += incr;
  else if(gt) val -= incr;
	if(((old<=target && val>=target) || (old>=target && val<=target)))
		val = target;
  return val;
}

#sectionstart repeatedly_execute  // DO NOT EDIT OR REMOVE THIS LINE
function repeatedly_execute() 
{
if (!InDialogue)// <-----This was a test to see if I could use a global variable to stop being able to move/take inputs in whilst in an interaction...didn't work as well as I'd hoped 
{
int wasdir = dir;
int wasx = player.x;
int wasy = player.y;


  if(isInactive()) return;

  bool up=false;
  bool down=false;
  bool left=false;
  bool right=false;


  if ((IsInterfaceEnabled()==true)&&(IsGamePaused()==false)) 
  {
  
  if (IsKeyPressed(KeyRight[0])||IsKeyPressed(KeyRight[1]))
  {
    right=true;
  }
  else if (IsKeyPressed(KeyLeft[0])||IsKeyPressed(KeyLeft[1]))
  {
    left = true;
  }
  else if (IsKeyPressed(KeyUp[0])||IsKeyPressed(KeyUp[1]))
  {
    up = true;
  }  
  else if (IsKeyPressed(KeyDown[0])||IsKeyPressed(KeyDown[1]))
  {
    down = true;
  }   
  else
  {
    walkanispeed=1;
    return;
  }
  }
 
  if(!up && !down && !left && !right)
  {
    return;
    player.StopMoving();
  }

  if ((IsInterfaceEnabled()==false)||(disablemove==true)) {xm=0;ym=0;}
  
  bool speedup = false; 
  
  if(IsKeyPressed(KeySprint[0])||IsKeyPressed(KeySprint[1])) speedup = true; 

  
  
  int xspeed = _xspeed;
  int yspeed = _yspeed;
  
   if(speedup)//RUN_________________________________RUN
  {
    if (player.View!=68)
    {
      player.LockView(68);
    }
    walkanispeed=4;
    xspeed = 15;
    yspeed = 15;
  }
  else
  {
   if (player.View!=2)
   {
     player.LockView(2);
   }
   walkanispeed=2; 
  }
  
  int accel = 20;

  if ((player.Moving==false)&&(IsInterfaceEnabled()==true)&&(IsGamePaused()==false)&&(disablemove==false)) {

    int b=0;
    
    if ((xm==0) && (ym==0)) {thrust=false;}


    //moving values

      while (b<slide){

        if (thrust==false){
          
          if ((right==true) && (xm < xspeed))  {xm=moveto(xm,accel, xspeed);}   //right
          if ((left==true) && (xm > xspeed*(-1)))  {xm=moveto(xm, accel, -xspeed);}   //left

          if ((down==true) && (ym < yspeed))  {ym=moveto(ym, accel, yspeed);}   //down
          if ((up==true) && (ym > yspeed*(-1)))  {ym=moveto(ym, accel, -yspeed);}   //up

          if ((left==false) && (right==false)) xm = moveto(xm,accel, 0);
          if ((up==false) && (down==false)) ym = moveto(ym,accel,  0);
        
        }  

      if (thrust==true) {
        
        if (xm != 0){xm=moveto(xm, accel, 0);}
        if (ym != 0){ym=moveto(ym, accel, 0);}
      }

    //slowdown

    if (thrust==false){
      if (xm > xspeed){xm=moveto(xm, accel,  xspeed);}
      if (xm < xspeed*(-1)){xm=moveto(xm, accel, -xspeed);}
      if (ym > yspeed){ym=moveto(ym, accel, yspeed);}
      if (ym < yspeed*(-1)){ym=moveto(ym, accel,  -yspeed);}
    }

  b=b+1;
  }

  //diagslowdown

  if (diagslowdown==true){

    int slow=0;
    while (slow <slide+1){

     if ((right==true)&&(down==true)) {
       if (xm>(xspeed*70)/100) {xm=(xm*70)/100;}
       if (ym>(yspeed*70)/100) {ym=(ym*70)/100;}
     }

     if ((left==true)&&(down==true)) {
       if (xm<((xspeed*70)/100)*(-1)) {xm=((xspeed*70)/100)*(-1);}
       if (ym>(yspeed*70)/100) {ym=(ym*70)/100;}
     }

     if ((left==true)&&(up==true)) {
       if (xm<((xspeed*70)/100)*(-1)) {xm=((xspeed*70)/100)*(-1);}
       if (ym<((yspeed*70)/100)*(-1)) {ym=((yspeed*70)/100)*(-1);}
     }

     if ((right==true)&&(up==true)) {
       if (xm>(xspeed*70)/100) {xm=(xm*70)/100;}
       if (ym<((yspeed*70)/100)*(-1)) {ym=((yspeed*70)/100)*(-1);}
     }
   slow=slow+1;
   }
  }

  //right

  int loop=0;

  if (xm>0){

    while (loop <xm) {
      a=a+1;
      if (a>9) {a=0;}
      if (a==5){
        player.x = player.x +xwidth;
        if (GetWalkableAreaAt(player.x - GetViewportX(),player.y - GetViewportY())>0) {player.x=player.x +1;}
        player.x = player.x -xwidth;
      }
    loop=loop+1;
    }
  }


  //left

  loop=0;

  if (xm<0){

    while (loop > xm) {
      a=a+1;
      if (a>9) {a=0;}
      if (a==5){
        player.x = player.x -xwidth;
        if (GetWalkableAreaAt(player.x - GetViewportX(),player.y - GetViewportY())>0) {player.x=player.x -1;}
        player.x = player.x +xwidth;
      }
    loop=loop-1;
   }
  }


  //down

  loop=0;

  if (ym>0){

    while (loop <ym) {
      c=c+1;
      if (c>9) {c=0;}
      if (c==5){
        player.y = player.y +ywidth;
        if (GetWalkableAreaAt(player.x - GetViewportX(),player.y - GetViewportY())>0) {player.y=player.y +1;}
        player.y = player.y -ywidth;
      }
    loop=loop+1;
    }
  }


  //up

  loop=0;

  if (ym<0){
    while (loop >ym) {
      c=c+1;
      if (c>9) {c=0;}
      if (c==5){
        player.y = player.y -ywidth;
        if (GetWalkableAreaAt(player.x - GetViewportX(),player.y - GetViewportY())>0) {player.y=player.y -1;}
        player.y = player.y +ywidth;
      }
    loop=loop-1;
    }
  }


  //outpush

  player.x = player.x -xwidth;
    if (GetWalkableAreaAt(player.x - GetViewportX(),player.y - GetViewportY())==0) {player.x=player.x +1;}
  player.x = player.x +xwidth;

  player.x = player.x +xwidth;
    if (GetWalkableAreaAt(player.x - GetViewportX(),player.y - GetViewportY())==0) {player.x=player.x -1;}
  player.x = player.x -xwidth;

  player.y = player.y -ywidth;
    if (GetWalkableAreaAt(player.x - GetViewportX(),player.y - GetViewportY())==0) {player.y=player.y +1;}
  player.y = player.y +ywidth;

  player.y = player.y +ywidth;
    if (GetWalkableAreaAt(player.x - GetViewportX(),player.y - GetViewportY())==0) {player.y=player.y -1;}
  player.y = player.y -ywidth;

  //outpush #2

  player.y = player.y -ywidth;

  player.x = player.x -xwidth;
    if (GetWalkableAreaAt(player.x - GetViewportX(),player.y - GetViewportY())==0) {player.x=player.x +1;}
  player.x = player.x +xwidth;

  player.y = player.y +ywidth;
  player.y = player.y +ywidth;

  player.x = player.x -xwidth;
    if (GetWalkableAreaAt(player.x - GetViewportX(),player.y - GetViewportY())==0) {player.x=player.x +1;}
  player.x = player.x +xwidth;

  player.y = player.y -ywidth;



  player.y = player.y -ywidth;

  player.x = player.x +xwidth;
    if (GetWalkableAreaAt(player.x - GetViewportX(),player.y - GetViewportY())==0) {player.x=player.x -1;}
  player.x = player.x -xwidth;

  player.y = player.y +ywidth;

  player.y = player.y +ywidth;

  player.x = player.x +xwidth;
    if (GetWalkableAreaAt(player.x - GetViewportX(),player.y - GetViewportY())==0) {player.x=player.x -1;}
  player.x = player.x -xwidth;

  player.y = player.y -ywidth;



  player.x = player.x +xwidth;

  player.y = player.y -ywidth;
  if (GetWalkableAreaAt(player.x - GetViewportX(),player.y - GetViewportY())==0) {player.y=player.y +1;}
  player.y = player.y +ywidth;

  player.x = player.x -xwidth;



  player.x = player.x -xwidth;

  player.y = player.y -ywidth;
    if (GetWalkableAreaAt(player.x - GetViewportX(),player.y - GetViewportY())==0) {player.y=player.y +1;}
  player.y = player.y +ywidth;

  player.x = player.x +xwidth;



  player.x = player.x -xwidth;

  player.y = player.y +ywidth;
    if (GetWalkableAreaAt(player.x - GetViewportX(),player.y - GetViewportY())==0) {player.y=player.y -1;}
  player.y = player.y -ywidth;

  player.x = player.x +xwidth;
 
 
  
  player.x = player.x +xwidth;

  player.y = player.y +ywidth;
    if (GetWalkableAreaAt(player.x - GetViewportX(),player.y - GetViewportY())==0) {player.y=player.y -1;}
  player.y = player.y -ywidth;

  player.x = player.x -xwidth;

 
  //animations

  //set direction

  if (eightdir==false){

    if ((left==true)||(right==true)||(up==true)||(down==true)){

      if (thrust==false){

        if (ym>0) {if ((left==false)&&(right==false))  {dir=0;}}
        if (xm<0) {if ((up==false)&&(down==false))  {dir=1;}}
        if (xm>0) {if ((up==false)&&(down==false))  {dir=2;}}
        if (ym<0) {if ((left==false)&&(right==false))  {dir=3;}}

        if ((ym>0) && (player.Loop==3))  {dir=0;}
        if ((ym<0) && (player.Loop==0))  {dir=3;}
        if ((xm>0) && (player.Loop==1))  {dir=2;}
        if ((xm<0) && (player.Loop==2))  {dir=1;}
      }
    }
  }


  if (eightdir==true){

    if ((left==true)||(right==true)||(up==true)||(down==true)){

      if (thrust==false) {
    
        if ((xm>0)&&(ym==0)) {dir=2;}
        if ((xm<0)&&(ym==0)) {dir=1;}
        if ((xm==0)&&(ym>0)) {dir=0;}
        if ((xm==0)&&(ym<0)) {dir=3;}

        if ((xm>0)&&(ym>0)) {dir=4;}
        if ((xm<0)&&(ym>0)) {dir=6;}
        if ((xm<0)&&(ym<0)) {dir=7;}
        if ((xm>0)&&(ym<0)) {dir=5;}
      }
    }
  }
}
  
  bool any = (left==true)||(right==true)||(up==true)||(down==true);
  
	if(any)
  {
    if(dir != wasdir || player.Loop != dir || standing)
    {
      player.Loop = dir;
			
			//only reset this if we were standing previously
			if(standing)		
			{
				//NOT 0 -- start nudging forward rather than slide in walk frame
				player.Frame = 1;
			}
    }
    else
    {
      animticks++;
      if(animticks>=walkanispeed)
      {
        animticks=0;   
        animticks2++;
        
        int limit = 2;
        if(speedup) limit=1;
                 
        ViewFrame* tmp = Game.GetViewFrame(player.View, player.Loop,  player.Frame);
        
        if(animticks2 > limit)
        {
          animticks2 = 0;
          player.Frame = player.Frame+1;
          if(tmp.LinkedAudio != null)
          {
            tmp.LinkedAudio.Play();
            if(player.Frame >= Game.GetFrameCountForLoop(player.View,  player.Loop))
              player.Frame = 1;
          }
        }
      }
    }
  }
  else
  {
    player.Frame = 0;
		standing = true;
		animticks = 0;
		animticks2 = 0;			
		return;
  }
  if(any) standing = false;

  if (player.Moving==true) {dir=player.Loop;}

  if (nodirset>0) {dir=player.Loop;}

  if (IsInterfaceEnabled()==false) {dir=player.Loop;}
  
  //LogMessage(String.Format("%d, yspeed=%d",player.y, yspeed));
}
else
{
  return;
}
}
#sectionend repeatedly_execute  // DO NOT EDIT OR REMOVE THIS LINE

[close]
Interaction Script:
Spoiler
Code: ags

//----------------------------------------------------------------------------------------------------
// on_key_press
//----------------------------------------------------------------------------------------------------
import int  KeyUp[2];
import int  KeyDown[2];
import int  KeyLeft[2];
import int  KeyRight[2];
import int  KeyAction[2];
import int  KeyBack;
import int  KeyMenu;
import int  KeySprint[2];
import int KeyInventory[2];

function on_key_press(eKeyCode keycode) 
{   
 
 if (IsGamePaused()) keycode = 0;

    // Action Key--------------------------------------------------------------------------------------------------------------
    if (keycode == KeyAction[0] || keycode == KeyAction[1]) 
    {
      int px = player.x - GetViewportX(),py = player.y - GetViewportY();
      Hotspot*h = Hotspot.GetAtScreenXY(px, py);
      Object*o = Object.GetAtScreenXY(px, py);
      if (h.ID > 0 ) {
        if (player.ActiveInventory != null)
        { 
          player.StopMoving();//These may be redundant 
          h.RunInteraction(eModeUseinv);
        }
        else
        {
          player.StopMoving();//These may be redundant 
          h.RunInteraction(eModeInteract);
        }
      }
    }
}
[close]
#24
Awesome news about the beta! Loving the new AGS features :D
#25
Ok, temp build fixes keyboard issue, great! :)

Strangely when I started a fresh empty game and make a list box and a dialogue both with translated lines they worked. However, when I made a game out of a template they didn't work, I compared both versions' TRS files and didn't find any differences, both had UTF-8 encoding on them. Strangely I changed the Text Format under general settings to UTF8 and it worked?
Screenshot:
Spoiler
[close]

However, this didn't work on my game, only on the test game so there's isn't much for debugging.

QuoteSo, if I understand correctly, translation in dialog options did not work in 3.6.0.17 too?
That's correct, it didn't work on that version either

QuoteI remember that previously you had issues with some languages, but they were fixed?
https://www.adventuregamestudio.co.uk/forums/index.php?topic=58976.msg636644048#msg636644048

I thought that would've been the case but it seems to still show those symbols when I applied that particular fix to this problem.

QuoteDo you use the same font as on labels there, or a different one?
Yes, everything has the same fonts.

Something is telling me that it may be an issue with my scripting somewhere. I'll look into it further but here's the test build I quickly made: http://www.fileconvoy.com/dfl.php?id=gd863cb389b33e2171000418743282b849981e52b80

EDIT:
QuoteStrangely I changed the Text Format under general settings to ASCII then back to UTF8 and it worked?
Only the dialogue worked not the listbox

BREAKTHROUGH: I think I found the problem, the list box fonts are not changing when I change translations

I'm using this script to change all fonts in game but it seems to be missing listboxes:
Spoiler
Code: ags

function ReplaceFontOnAllGUIs(int old_font, int new_font)
{
  int i = 0;
  while (i < Game.GUICount)
  {
    ReplaceFontOnGUI(gui[i], old_font, new_font);
    i++;
  }
}
[close]

Yep! That's definitely the problem! Still not sure how to fix it, unfortunately.
Found it:
Spoiler
Code: ags

function ReplaceFontOnGUI(GUI *g, int old_font, int new_font)
{
  int i = 0;
  while (i < g.ControlCount)
  {
    Button *b = g.Controls[i].AsButton;
    if (b != null)
    {
      if (b.Font == old_font)
        b.Font = new_font;
    }
    Label *l = g.Controls[i].AsLabel;
    if (l != null)
    {
      if (l.Font == old_font)
        l.Font = new_font;
    }
    ListBox *lb = g.Controls[i].AsListBox; //HERE!
    if (lb != null)
    {
      if (lb.Font == old_font)
        lb.Font = new_font;
    }
    i++;
  }
}
[close]
#26
@Crimson Wizard

The error code is something new as I loaded a backup on 3.6.0.17 and the dialogue navigation works fine, however, the text is still not being translated in list boxes and dialogue, everything else works fine (labels, buttons e.c.t).
Example of labels working fine:
Spoiler

My text box is a label.
[close]

UTF-8 Encoding has been  set in the TRS file, I also tested it with another font but it still shows the same symbols

Example:
Spoiler
[close]

@eri0o I'll get to work on a small build for you to test soon :)
#27
I've encountered a problem with translations in list boxes and dialogue options displaying symbols rather than being translated, not sure if a bug or my mistake but here's what I'm referring to:

Screenshots:
Spoiler

Happens with all listboxes and dialogue


This happened when I tried navigating the dialogue options via keyboard, never ran into it in the previous alphas only 3.6.0.20


[close]
My Dialogue Script:
Spoiler
Code: ags

// new module script

//int dlg_opt_color = ;
int dlg_opt_acolor = 2047;
int dlg_opt_ncolor = 65535;
int DlgCursorPos = 1;

import int  KeyUp[2];
import int  KeyDown[2];
import int  KeyLeft[2];
import int  KeyRight[2];
import int  KeyAction[2];
import int  KeyBack;
import int  KeyMenu;
import int  KeySprint[2];
import int KeyInventory[2];


function dialog_options_get_dimensions(DialogOptionsRenderingInfo *info)
{
  // Create a 200x200 dialog options area at (50,100)
  info.X = 30;
  info.Y = 100;
  info.Width = 256;
  info.Height = 256;
  info.ActiveOptionID = 1; // set to first option
}

function dialog_options_render(DialogOptionsRenderingInfo *info)
{
  btnCoverUp.Visible = true;
  DialogOpen = true;
  //info.Surface.Clear(dlg_opt_color);
  int i = 1,  ypos = 24,  xpos = 0; 
  // Render all the options that are enabled
  while (i <= info.DialogToRender.OptionCount)
  {
    if (info.DialogToRender.GetOptionState(i) == eOptionOn)
    { 
      if (info.ActiveOptionID == i)
      {
        btnPointer.SetPosition(xpos+26, ypos+95); //Cursor Position 
        info.Surface.DrawingColor = dlg_opt_acolor;
      }
       else
       {
        info.Surface.DrawingColor = dlg_opt_ncolor;
       }
      
      info.Surface.DrawStringWrapped(5, ypos, info.Width - 10, 
      eFontfntSnatcher, eAlignLeft, info.DialogToRender.GetOptionText(i));
      ypos += GetTextHeight(info.DialogToRender.GetOptionText(i), eFontfntSnatcher, info.Width - 10); 
    }
    //aClick.Play();
    i++;
  }
}

function dialog_options_key_press(DialogOptionsRenderingInfo *info, eKeyCode keycode) 
{
  switch (keycode)
  {
  case KeyUp[0]:
  case KeyUp[1]:
  aCursor.Play();
    // check all options upwards until found an active one
    for (int next_opt = info.ActiveOptionID - 1; next_opt >= 1; next_opt--)
    {
      if (info.DialogToRender.GetOptionState(next_opt) == eOptionOn)
      {
        info.ActiveOptionID = next_opt;
        break;
      }
    }
  break;
  case KeyDown[0]:
  case KeyDown[1]:
  aCursor.Play();
    // check all options downwards until found an active one
    for (int next_opt = info.ActiveOptionID + 1; next_opt <= info.DialogToRender.OptionCount; next_opt++)
    {
      if (info.DialogToRender.GetOptionState(next_opt) == eOptionOn)
      {
        info.ActiveOptionID = next_opt;
        break;
      }
    }
  break;
  }
  
if(CanPress)
  {
    switch(keycode)
    {
      case KeyAction[0]:
      case KeyAction[1]:
      aSelector.Play();
      DialogOpen = false;
      btnPointer.Visible = false;
      btnCoverUp.Visible = false;
      info.RunActiveOption(); 
      break;
    }
  }
}

function dialog_options_repexec(DialogOptionsRenderingInfo *info)
{
  btnPointer.Visible = true;
}



[close]
#28
Thanks for the reply, Khris. I had the same thought, just didn't know about being able to view either character's inventory.

QuoteThe only thing you need to watch out for is that interacting with other characters' inventory items is not that simple. You can't make them the ActiveInventory without giving at least one item to the player for instance.
Just a thought, what if I were to change the playable character when opening different inventories? Would that work as well as I'm thinking or could cause issues down the track?

#29
Hello everyone,

This is more of a trial and error sorta thing as I haven't yet added anything like this to a game, but what I'm intrigued about is if it is possible to make multiple separate inventories for the one character/player?
My idea was to have the player's normal inventory, then another for say like a particular group of items, sorta similar to the old pokemon games how they separated their inventories into categories if that makes sense.

Like normal items then key items...and so on, but I'm not sure IF you can do this in AGS using the inbuilt systems(which would be nice!)

Any help would be greatly appreciated :)

#30
That was the problem! Thanks, CW! I can't believe I missed that  :-[ Everything works fine now  :-D

Edit: the difference was that "Default" was the AGS font I was using during the development "All" was the one that contained the customer symbols and such for different languages
#31
Quote from: Crimson Wizard on Wed 02/03/2022 08:20:01
I cannot answer this question without knowing more details - what script you have, which fonts you have, and so on.

My apologies, here's the script:
Spoiler
Code: ags

// new module script

//int dlg_opt_color = ;
int dlg_opt_acolor = 30719;
int dlg_opt_ncolor = 65535;
int DlgCursorPos = 1;

import int  KeyUp[2];
import int  KeyDown[2];
import int  KeyLeft[2];
import int  KeyRight[2];
import int  KeyAction[2];
import int  KeyBack;
import int  KeyMenu;
import int  KeySprint[2];

import bool CanPress;

function repeatedly_execute() 
{
  btnDialogCursor.Visible = false;
  btnOptionsBox.Visible = false;
}

function dialog_options_get_dimensions(DialogOptionsRenderingInfo *info)
{
  // Create a 200x200 dialog options area at (50,100)
  info.X = 30;
  info.Y = 50;//50
  info.Width = 256;
  info.Height = 256;
  info.ActiveOptionID = 1; // set to first option
}

function dialog_options_render(DialogOptionsRenderingInfo *info)
{
  //info.Surface.Clear(dlg_opt_color);
  int i = 1,  ypos = 24,  xpos = 0;
  // Render all the options that are enabled
  while (i <= info.DialogToRender.OptionCount)
  {
    if (info.DialogToRender.GetOptionState(i) == eOptionOn)
    { 
      if (info.ActiveOptionID == i){
        
          btnDialogCursor.SetPosition(6, ypos+42); //Cursor Position 
          btnDialogCursor.Animate(5, 0, 5, eRepeat);
      }
       else
       
        info.Surface.DrawingColor = dlg_opt_ncolor;
        info.Surface.DrawStringWrapped(5, ypos, info.Width - 10, 
        eFontfntDefault, eAlignLeft, info.DialogToRender.GetOptionText(i));
        ypos += GetTextHeight(info.DialogToRender.GetOptionText(i), eFontfntAll, info.Width - 10);   
    }
    aMenuSelector.Play();
    i++;
  }
}

function dialog_options_key_press(DialogOptionsRenderingInfo *info, eKeyCode keycode) 
{
  switch (keycode)
  {
  case KeyUp[0]:
  case KeyUp[1]:
    // check all options upwards until found an active one
    for (int next_opt = info.ActiveOptionID - 1; next_opt >= 1; next_opt--)
    {
      if (info.DialogToRender.GetOptionState(next_opt) == eOptionOn)
      {
        info.ActiveOptionID = next_opt;
        break;
      }
    }
  break;
  case KeyDown[0]:
  case KeyDown[1]:
    // check all options downwards until found an active one
    for (int next_opt = info.ActiveOptionID + 1; next_opt <= info.DialogToRender.OptionCount; next_opt++)
    {
      if (info.DialogToRender.GetOptionState(next_opt) == eOptionOn)
      {
        info.ActiveOptionID = next_opt;
        break;
      }
    }
  break;
  }
  
if(CanPress)
  {
    switch(keycode)
    {
      case KeyAction[0]:
      case KeyAction[1]:
        btnDialogCursor.Visible = false;
        btnOptionsBox.Visible = false;
        btnPopUp.Visible = false;
        btnPopTalk.Visible = false;
        info.RunActiveOption();
      break;
    }
  }
}

function dialog_options_repexec(DialogOptionsRenderingInfo *info)
{
    btnOptionsBox.Visible = true;
    btnDialogCursor.Visible = true;
}
[close]

Here's the font I am using too: https://opengameart.org/content/lanapixel-localization-friendly-pixel-font
The game is keyboard-only based so I used the custom choice scripting found in the manual. I also use this same font with other languages too and it works fine with them.
#32
Thanks for the update and fix CW  :-D

I also found this, not sure if it's a bug either but when running custom dialog options via scripting I get these errors:
Spoiler


[close]

the first one is in Turkish, which just seems to show some displacement of the letters and the other two are Russian which doesn't show up at all, I've tried a few different fonts with Russian but still, the same result.
The rest of the GUI and regular text seems to work fine :)
#33
Hello everyone,

I have a strange bug when saving and loading a game.

If I have a room with a background with more than one frame and save it, when it loads the background animation just plays. Now, I figured that I can now turn off background animations via the room setting, however, I was working with day/night cycles, and if I save at night and load it's day (or background frame resorts to default which I think is 0). Basically, it's not saving room background frames (Not sure if this is affecting other frame animations, haven't tested it with views yet)


I'm not sure if this is an actual bug and I have to code it some other way, just thought I'd report it just in case.
#34
Hello :)

I'll give you a hint as I don't really want to spoil anything just yet but:

Spoiler
Once you hit Ash Pines, you're almost basically free to go where you wish but certain places/events will progress the story, likewise in the hospital. The dialog from the janitor mentions a spare key that unlocks the same door in the motel somewhere ;) You can also find the password in the motel, anything symbolic in the text will be placed in (brackets) for now, until I find a better solution :) Hope this helps in some way
[close]
#35
This looks great! Love the cyberpunk theme you got going on here, the 3D voxel art really makes this unique. I'm curious, did you take say a "Donkey Kong Country" approach? (3D Models converted into sprite work?) If so, I've always wanted to try this in a future game, it looks stunning!
#36
Glad you enjoyed the demo and that is a very close coincidence 😅. I enjoy those things myself hence why I added them, apart from the video editing, ha!

Also, thank you for pointing out those errors, I'll add them to my fix list in preparation for the next update 🙂

P.S "Bea" is a shorter nickname, I had a friend in highschool that had a shorter nickname from an already existing nickname hence why I added it...just a weird little quirk :)
#37
Such a catchy song, too! The development is planned to be released in parts to help funding my other projects, part 1 is complete and ready to play, I've estimated that part 2 should be done in another month or so. 
#38
Thank you @eri0o, that was the aim of the design, also wanted to keep it as simplistic as I can for both gameplay and development :)
#39




Introduction


Hello everyone! I present my next AGS project Just Ignore Them: Brea's Story.

On her way to cover the biggest story of her career, Brea Tena fumbles her way into a dark mysterious
town called Ash Pines, the birthplace of the tragic events that took place in Just Ignore Them. Brea's Story is a
prequel to my previous game Just Ignore Them, taking place right before her interactions with Mark.

This adventure game is heavily stylized after Hideo Kojima's classic title Snatcher and Snatcher SD, combining
the two elements together to give you a more unique, yet retro experience.

Features



  • Top-down styled gameplay, like classic rpg's (This game is not an RPG by the way!)
  • A farmilliar yet simple keyboard-controlled, text-based interface
  • An expansive/emersive world in a tiny pixelated style.
  • Multiple paths branching paths
  • Achievements(In progress!)
  • Original soundtrack done by yours truly :)
  • Definately made in AGS!

Screenshots


Spoiler







[close]

Sample Soundtrack


https://soundcloud.com/stranga-studios/jit-breas-story-hospital-heist?si=65ffddcbc4194f6f89816eb6efc81ac1&utm_source=clipboard&utm_medium=text&utm_campaign=social_sharing

Progress


Story: 40%
Scripting: 100%
Graphics: 40%
Sound/Music: 40%

PART 1 is completed and can be purchased, and a free demo is available, check the links below!

Website


You can find all information, social media, and stores on my website:
strangagames.com

Download Demo/Part 1


Gamejolt:https://gamejolt.com/games/jit_breastory/661294
Itch.io:https://stranga.itch.io/jitbs
Steam coming soon!
#40
Apologies for the delay in responding. Yes, it was custom properties I set up for  "Description"/"Name" of Items to be specific, but I'm sure it obtain the same result for any custom properties.
SMF spam blocked by CleanTalk