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

#1
Hi everyone,

I would like to know if there is a way to 'store' actions in a chronological sequence (the sequence the player input them) and than have the character execute them in the same order, possibly in a non blocking way.

Thanks in advance.

#2
Hi guys,

I want a function to loop through a Gui buttons checking if one of them has a given graphic.
If so, switch the graphic with a second given graphic, for a sort of 'what-to-do-notepad-GUI'
with a better look than a GUI list box.

Here's my code

Code: ags

function Assegna_appunto(int imagineA, int imagineB)
 {
 int i=0;
 Button *bottone[30]; //Max number of buttons allowed in one GUI
 while(i<=gBlocco.ControlCount)
   {
    if(bottone[i].Graphic==imagineA)
      {
       gBlocco.Visible=true;Wait(40);
       bottone[i].NormalGraphic=imagineB;Wait(40);
       gBlocco.Visible=false;
      }
    else i++;
   }  
 }


But when the game calls the function I receive a 'null pointer referenced'.
What exactly am I doing wrong?

Thanks in advance.

EDIT:

Meanwhile I brainstormed and came up with this working code:

Code: ags

function Assegna_appunto(int immagineA, int immagineB)
{
 int i;
 while(i<gBlocco.ControlCount)
  {
   if(gBlocco.Controls[i].AsButton.Graphic==immagineA)
    {
     gBlocco.Visible=true;Wait(40);
     gBlocco.Controls[i].AsButton.NormalGraphic=immagineB;Wait(80);
     gBlocco.Visible=false;
     return;
    }
   else i++;
  }  
}



Cheers
#3
Hi everyone,

I was improving the walk cycle of my character, in particular I was centering the position of all frames (in the transparent rectangle) because I noticed that, when walking, my char seem to flicker.

After the centering procedure, well, it's still flickering, but only when the room is NOT scrolling.

Better said:
when the char walks across a static room (i.e left -> right) it flickers but when the room is scrolling while the char is walking it doesn't flicker.

It's clear that I do not have 'empty' frames in the walk cycle and, when checking the preview animation inside the editor the char doesn't flicker.

What can be the cause?

Any ideas?

Thanks in advance.
#4
Hi everyone.
In my mini-game, that I'm stubbornly handling INSIDE the actual game (because of an arcane and obscure reason), I have a little problem with the function AreThingsOverlapping.

When the Hero and a closed treasure box are overlapping I want the trasure box to open with an animation (with also floating scored points) and then add the score and consider that specific box as already collected (until the next game)

Ok, here's my piece of code (in room_RepExec())

Code: ags


  if(AreThingsOverlapping(ISLANDHERO, 1000) && oScrigno1.Graphic==457) // 'Closed' sprite
     {if(Scrigno1==false)  // The box haven't been opened, GameDoOnceOnly is not suitable for my purpose        
          {oScrigno1.SetView(17, 0, 0); // The 'opening' view
              if(!oScrigno1.Animating) // The box isn't animating           
                   {oScrigno1.Animate(0, 6, eOnce, eNoBlock, eForwards);} // Start the animation
          }
      }

  if(oScrigno1.Graphic==465) // 'Opened' sprite && final frame of the animation    
    {if(Scrigno1==false)       
        {Scrigno1=true; // The box have been opened        
          punteggio=punteggio+400;} //add score
     }



Actually all the stuff (animation and scoring) begins when the hero and the treasure are NO MORE overlapping.

If I just stand in front of (overlapping) the treasure nothing happens, until I leave (outside the sprite border)... ???

I want the stuff running even if the hero is still overlapping the treasure.
What am I doing wrong?
What's the thing I don't understand?

Thank You all in advance.

EDIT: Modified the layout hopefully in a tidier way

#5
I searched the forum and checked the dynamic help but it seems that i can't find a proper answer.

Since I already encountered the 20-objects-per-room limitation (due to my lack of experience - i.e. handling doors with 2 different objects instead of 1 object with 2 sprites and appropriate coordinates...), this question popped up in my mind.

The fact is that I'm thinking about a sort of minigame/puzzle implemented using several GUIs, buttons, labels and cursors, instead of handling it with rooms, objects, hotspots, inventory items and text overlays.

Each one of the methods have its own scripting issues but I think that what I have in mind will be easier/shorter to handle with GUIs.

But I don't want to unexpectedly run out of GUIs before completion!

Another related question, is there, in the same way, any limitation to the number of buttons a GUI can have?

I thank you all in advance for the answers.
#6
Hi everyone!

This is my first game with AGS.
It will be a medium lenght game, I'm programming it in Italian but an english/american version is already in plan, hopefully with the help of someone that can adapt the jokes and the bad language in english...
It is in 16-bit colour with 800x600 res

The story:

An ordinary day our nameless hero enter his kitchen to have a cool beer but, unexpectedly, he can't find any.
Unluckily he soon realize that is Sunday and the nearest supermarket is closed, so he decide to
ask his absent-minded granpa (that lives with him); pointless since he's absent-minded!
But nothing's lost, our hero is an inventor and suddenly remeber that, among his crazy inventions, there might be one that comes in handy to retrieve his lost beer...
This little absence of beer, along with the unbearable thirst, will lead our hero to experience the biggest adventure of his life, filled with nonsense (hopefully funny and laughable) and strong language...

Some pics:

























Release date expected: A.S.A.P.  ;)

EDIT: I resized and updated all the thread screenshots and added all the picture to this post
SMF spam blocked by CleanTalk