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

#1
Yes FE4 is correct, will try it out, thanks

Quote from: Crimson Wizard on Tue 16/02/2021 01:26:21
Quote from: cAlien_Interact on Tue 16/02/2021 01:18:51
The wall is an object, and it works to draw on it, not outside it, problem is the lines drawn is not continous, cant hold down...click click

To fix that you'd simply need to move the drawing code into room's "repeatedly execute" event.

But then you also need to test if the mouse is above this object:
Code: ags

     if (Mouse.IsButtonDown(eMouseLeft) && Object.GetAtScreenXY(mouse.x, mouse.y) == FE4)
     {
          DrawingSurface* ds = Room.GetDrawingSurfaceForBackground();
          ds.DrawingColor = Game.GetColorFromRGB(255,100,255);
          ds.DrawRectangle(mouse.x - 1, mouse.y - 1, mouse.x + 1, mouse.y + 1);
          ds.Release();
     }


Here I assume that the object is called FE4, if not, just change the name in condition.
#2
The wall is an object, and it works to draw on it, not outside it, problem is the lines drawn is not continous, cant hold down...click click
#3
it's just a wall i have inside a room. i want to be able to draw on it
#4
Code: ags

function FE4_Interact()
{

if (Mouse.IsButtonDown(eMouseLeft))
     {
          DrawingSurface* ds = Room.GetDrawingSurfaceForBackground();
          ds.DrawingColor = Game.GetColorFromRGB(255,100,255);
          ds.DrawRectangle(mouse.x - 1, mouse.y - 1, mouse.x + 1, mouse.y + 1);
          ds.Release();
     }

}
//and next

function g5g_AnyClick()
{
  aBlop.Play();
  Display("Nice drawing...you dig great");
  player.ChangeRoom(1, 90, 160, eDirectionRight);
 
}


this is the code I have for drawing on my surface, it does not let me draw, only click-draw, pixel by pixel(click by click)
How do i change this so u can draw holding down leftmousebutton as you would in Mspaint, instead of clicking pixel by pixel?

If anyone knows, that could help out, thanks alot!!! :cheesy:
#5
Quote from: newwaveburritos on Thu 11/02/2021 19:53:21
Yeah, you would just set a timer to start when you click on it, and then in repeatedly execute you would check to see if the timer has expired and then set gGUI1.Visible to false.

Will look into it, thx
#6
Is it possible to, have picture be displayed for like 1 second after it pops up,automatically closing?
#7
Roomscript on the Object,
Code: ags

function POSTER_AnyClick()
{
aPAPER.Play();
{
mouse.IsButtonDown(eMouseLeft);
gGui1.Visible = true;
}


}

with THIS on Globalscript:
Code: ags

function gGui1_OnClick(GUI *theGui, MouseButton button)
{
 if (gGui1.Visible && (button == eMouseLeft || button == eMouseRight)) {
    gGui1.Visible = false;
    return;
  }
}

And set them to Visible:False on Gui properties

I did it this way, but mabye I overcomplicated it?
What happens now is when I press my Object, the Gui(the image) pops up, and when the Gui(image) is clicked on it dissapears! Perfect..

Thanks for some help in the start
#8
Quote from: Matti on Thu 11/02/2021 17:17:43
If you want to make the GUI disappear if the player clicks outside of the picture you could check if the player presses a mouse button inside the room's repeatedly execute function:

Code: ags

  if (gGui1.Visible && mouse.IsButtonDown(eMouseLeft)) gGui1.Visible = false;


trying,thx
#9
The image is there, and I adjusted where it shows up,
Just need to know, how to make it vanish, sorry i'm quite new to this program,
Thank for the help,I appreciate it!
#10
Thanks,I tried this,


{gGui1.Visible = true;}

How do I make it disappear


#11
This is not what i'm looking for ;ShowPlayerCharacter - if checked, the player character will not be visible in this room, and the Walk mode will be disabled. Useful for close-up displays of control panels and so forth.
That would be a new room.
#12
This is the script (see below)that I have for a poster(object)in a room,
I want an image to pop up as I click on the poster,
how do I set it to show up and be able to click away from it once finished looking at it.


Code: ags

function POSTER_Interact()
{
  aPaper.Play();
}


Thanks! :=
SMF spam blocked by CleanTalk