Make an object visible when click on

0 favourites
  • 11 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • Hello,

    I have two questions:

    1) I would like to have an object invisible at the start of a game. I want it to then become visble once the mouse clicks on it. I can't for the life of me get this to work. can anyone help?

    2) Also, is it possible to set the game up to automatically forward to a URL once the game is over? if so, is it possible to have it forward to different url depending if the game was a successful win or a total loss?

    Thanks in advance for your help

    Dave

  • Sprites have a visibility setting in Properties (a tick box)....'invisible on start' ...tick it ! !

    To make it reappear you will need to create an event to turn it's visibility back to 'on'.

    Example:

    + MouseKeyboard: On Left Clicked on cover

    -> cover: Make Visible

    .

    ------------------------------------------------

    Can't answer the URL question.

  • With construct classic

    Use the expression System.Run Script

    "import webbrowser
    webbrowser.open('http://python.org')"

    (It is python code)

    On Construct 2 you can use the browser object and its action "Go to url".

    Also, those type of question would be better if asked in the Help & Support using Construct Classic section (if they are targeted at CC) or Construct2 General section if they are targeted at C2.

  • Pretty sure you can't click invisible objects, try opacity instead.

  • Pretty sure you can't click invisible objects, try opacity instead.

    ------------------------------------------------------

    You can click on an invisible object to make it visible again (if you can find it !)

    Might be a 'Find the invisible object with click' game?

    <img src="smileys/smiley5.gif" border="0" align="middle" />

  • You don't need python scripting for the url, simply use the file object, execute file, then put the url in quotes.

  • > Pretty sure you can't click invisible objects, try opacity instead.

    ------------------------------------------------------

    You can click on an invisible object to make it visible again (if you can find it !)

    Might be a 'Find the invisible object with click' game?

    <img src="smileys/smiley5.gif" border="0" align="middle" />

    Strange, I could swear invisible objects weren't draw, and couldn't do collision detection.

  • Hmmm.. I thought it should be that simple too. But for some reason that didn't work for me. Here's what I did, maybe I am missing an important step.

    1) I created a sprite object and set the "initial visibility" to invisible

    2) I added a mouse object

    3) I went to the event list and set Mouse --> On Left Button Clicked --> Sprite Set Visible

    when I go to run the game, I click all over the screen and nothing happens

    am I missing something?

    thanks

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Newt,

    Opacity worked thanks!!

    Thanks to everyone who tried to help, I really appreciate it!

  • daveryaaziem / Newt

    I know you resolved it, but here's the cap i tested using invisible 'off'

    option.

    Invisible

  • Yeah I know it works now, but I think in past versions it didn't.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)