Discord
Login
Community
DARK THEME

How can I add a secret link easter egg in my game?

I will make it short, I've got two projects on my plate. One is pretty easy, while the other is a spooky Halloween special that's seriously challenging. Now, here's the question: How can I show the player a link to the Halloween special one? Maybe a pop-up page could do the trick if that's even possible when they do an action?

In one of the older Jam announcements I used a 'click link'. Hope it's of any help.

https://microstudio.dev/i/TinkerSmith/msjam3/

This is the part in question:

    if mouse.press then
      system.javascript("window.open(\"https://itch.io/jam/microstudio-jam-3\", \"jamlink\");")  
    end

Thank you very much, this should do it!

Edit : I adore you so much

I would like to add a link, after game over, to the streaming service where I can listen to the game's soundtrack...can anyone help me with this?

You can do what @TinkerSmith said, potentially linking it to a button of some kind, and you can copy it to the user's clipboard (only works when the project is open in its own tab):

//javascript
global.copy = function(text, callback) {
  navigator.clipboard.writeText(text)
    .then(() => {
      callback(true);
    })
    .catch(() => {
      callback(false);
    })
}

It's also possible to display copyable text by manipulating the page's HTML.

thx!

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community