How can I Freeze the mouse cursor when the game display a text? [NewQuest]

Started by I<3Pindorama!, Mon 01/12/2014 06:28:24

Previous topic - Next topic

I<3Pindorama!

Hi friends ... :-D

This is my first question in the forum.
Usually i take solutions for my doubts searching other posts.
Unfortunately I was not able to find ( or understand ) a solution to my problem .

Every time I use a command like a:

Code: ags

function oIma_Look()
{
 Display("This is a beautiful doll.");
 Display("She can sing..."); 
 Display("AND WALK!");
}

I see that when the game run, this command lines create a break waiting for a mouse click to follow the next text.
But the mouse cursor continues to move across the screen. I would like to know what command I can put to the mouse cursor stay frozen, but that the buttons still working.

I'm a lover of adventures , playing since i was a child (probably like a 95 % of the members of this forum :P).
I already knew about this wonderful tool , but only now i decided to make use of it.
I'm making a game with my daughter. She draws and I (try) programming. She has talent for pixel art... and i... we're having fun!  :-D

Thanks for the help!
I just hope That my English does not seem so silly as my question... (roll)

I<3Pindorama!

Me again...
Searching others many, many times
i finally found in the forum a satisfactory
solution for my problem:

---> mouse.setbounds

Good bless all the old questions and their respective answers! ;)

Crimson Wizard

You could also do Mouse.Visible = false to completely hide mouse cursor.

I<3Pindorama!

It's true!

I try this comand before but... (i dont know if my poor english leave reasonably understandable)
Some people (my wife) that play the demo instinctively was completely in despair...(laugh)
She was shaking the mouse trying to find the mouse cursor and worse: even in invisible mode the mouse cursor keep moving.
So when i used  the command to visible mode the mouse cursor apperead in a random place and i saw that this solunction (in this case in particular) caused another torment.
I try to include the command  mouse.SetPosition but the damage was done.
In addition, sometimes, when she was shaking the mouse the cursor went to the work area...and there... the chaos was complet.

I can not speak for everyone and every situation , but this episode made †‹†‹me consider that display a static mouse cursor in the screen brings some kind of emotional balance to the player, allowing it focus, increasing its concentration  on the screen. The cursor is practically your candle and anchor ... even without light and even an unattainable depth.

The funny thing is that I'm being all careful but i making a click and point about a little and cute lady duck ...(laugh) but i like !

Thanks pal!

selmiak

what CW said, don't forget to turn it on again afterwards:

Code: ags
function oIma_Look()
{
Mouse.Visible = false;
Display("This is a beautiful doll.");
Display("She can sing...");
Display("AND WALK!");
Mouse.Visible = true;
}

Mandle

Quote from: I<3Pindorama! on Mon 01/12/2014 10:15:49
I can not speak for everyone and every situation , but this episode made †‹†‹me consider that display a static mouse cursor in the screen brings some kind of emotional balance to the player, allowing it focus, increasing its concentration  on the screen. The cursor is practically your candle and anchor ... even without light and even an unattainable depth.

Sheer poetry right there...And I totally understand what you are saying and your setbounds solution will stay in my memory as I anticipate a similar problem where I will need to do exactly this in a current project later on...

Thanks for the thread!

(And good call in testing it on your wife...I'm going to do the same on my project...They will always be harsh but true...)

I<3Pindorama!

Cw, Selmiak and Mandle your attention to me was like to receive a "Welcome!"
I'm glad for this receptivity, care, tips and pricipally this patience with
my simple quest in my porly (google) english...;)

Reading some topics and mutual collaborations between the members i can fell
that exist a great passion and respect for this wonderful art.
Questions ... answers ...shares... all kind of works make me realize that
there much to learn here.

About the wives you are completly right pal.
Really... they are extremely generous demanding the best
in everything that we do ... thanks lord! :P

selmiak

Hey pindorama
are you new to coding after all. Then please start indenting you code NOW! You will not regret it, rather will you regret not indenting it and also getting used to not indenting code. Especially when nesting brackets it get confusing without indentation. I mean something like this:

Code: ags
function oIma_Look()
  {
    Mouse.Visible = false;
    Display("This is a beautiful doll.");
    Display("She can sing...");
    Display("AND WALK!");
    Mouse.Visible = true;
  }

I<3Pindorama!

Indentation is a new word to me.

I confess that it was difficult for me to understand its meaning. ???
My knowledge of English is as basic as my programming knowledge.  lol
So when the "beast catch" ("o bicho pega") i appeal to google translator.
In this case even google was not able to help me a lot, on the contrary,
i was even more confused.

Was precisely when i compared your example of encoding with that i had put
there in the beginning that i was able to finally understand the totality of your
explanation.

Well... today I will "pierce the night," aligning the game codes.  (nod)
I always organized my scripts in a peculiar way, i took care to identify the
purpose of each command line using "//", not a mess after all, but i was
sinning by the lack of elegancy and a truly efficient organization,
clear and clean.

Selmiak , thanks again for your generosity. :-D

I<3Pindorama!

Hi friends!

Could someone help me to build a command that automatically place the cursor next to the text box of the DISPLAY command?
like this:



I started using only the mouse.setbounds, but manually is too time consuming.
Because to align i have to calculate the number of characters + character format + the size of the icons (look, talk, interact).

Code: ags
function hJanelaCL_Interact()
{
 mouse.SetBounds(530, 295, 530, 295);
 Display(" Melhor não abrir.");
 mouse.SetBounds(705, 295, 705, 295);
 Display(" Um vento forte poderia desmanchar o ninho.");
 mouse.SetBounds(0, 0, 0, 0);
}


If someone knows another way more pratice to include a command to place the cursor freezed next to the text box and waiting for a click would be a great help.

The game resolution is 800x600.


[imgzoom]http://s28.postimg.org/82dm8dwzh/pata.png[/imgzoom]

thanks  :-D

SMF spam blocked by CleanTalk