Triggerable invisible sprites

gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
edited November -1 in Working with GS (Mac)
Hi, I've been investigating the Basic Platformer template in GS. One element of this is Invisible Guides, an actor that should be seen in Editor view, but which presumably is invisible when the game is running, although still able to register a collision so that certain behaviours can be applied to whatever. In another Mac game-making prog I used to use, these were called hotspots, rectangle bounding boxes with anchor points for resizing/shaping; showing in the editor but completely invisible in the game.

Sorry, my point is that the graphic as actor used as invisible hotspots in the Basic Platformer game still can be seen in the running game. Can anyone shed any light on how I can make invisible hotspots when the game is running, which can be triggered by a player, etc, but which are visible in the editor please?

Amendment: I see that sprites are called actors in GS, whoops! And I'm wishing that there were hotspots instead of graphic actors, but as there isn't, wondered how to use actors to the same end. Apologies if I sounded confusing.

""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

Comments

  • AfterBurnettAfterBurnett Member Posts: 3,474
    You need to disable visibility for the actor (double click on the actor in the inspector and under graphics, un-tick the visibility box). Unfortunately, this can make it tough to see when manipulating in the editor as they will be invisible unless selected. Best practice is to manipulate the actor in the editor and when happy with it, turn off the visibility.

    By the way, was the other game creation tool the Power Game Factory? I have that somewhere...
  • RattleheadRattlehead Member Posts: 485
    What I do is keep my actor that I want running 'invisible' inside the game is keep the alpha channel set to 1 so I can continue moving it inside the editor. Then I add a Change Attribute to change it to 0 when the game is running. I have this one some powerups I have in my game and when another actor collides with them I then fade the actor back so the alpha is equal to 1 again.

    It has been working for me so far.

    On the other side of the coin though, I have been having trouble doing this same thing with the visibility flag. Not sure why...yet.

    Hope that helps.
  • firemaplegamesfiremaplegames Member Posts: 3,211
    @rattlehead: you cannot change visibility during runtime.
  • RattleheadRattlehead Member Posts: 485
    That's what I thought. Thanks for confirmng it FMG.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi guys, thanks for your replies.

    POLYGAMe: unfortunately turning visibility off doesn't work: I tried a test with an actor colliding with another actor I would want to be the hotspot. On collision, I get a sound played. All fine until it's made invisible, then there's no collision detection to trigger the sound, or any other event required. But thanks for the suggestion anyway!
    POLYGAMe said:
    By the way, was the other game creation tool the Power Game Factory? I have that somewhere...

    Yes, PGF it was. Also an excellent game creation prog, I'm sure you'll agree, but unfortunately Jesse the software author/designer ceased work on it a least a year and a half ago now; he even released the source code for free (RealBasic) for anyone who wanted to have a tinker with it. And of course, there wasn't any sort of conversion interface for the game app into Objective-C for Apple Apps like there is with GS. Sad to leave it behind; but happy to have found GameSalad!

    Rattlehead and firemaplegames: ah well, not to worry.

    I've got a solution that I think I'll stick with, which should work OK. It's a bit of a workaround, but unless or until hotspots or trigger areas, whatever they'll be called, is added as a feature to GS, it'll have to do.

    For every hotspot that can trigger an event by the player colliding into it, I'll make a small square image as a small section of the background it covers. Then for ease of finding/editing, each one I'll mark with a green blob image. When the game is ready, delete these blob markers. I'll see how that works out when I start experimenting.

    Thanks all again.

    :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi again Rattlehead: it's just clicked with me what you wrote about the alpha; just did a little test and that seems to work well. I could use the spot marker system with that also, i,e make the alpha 0.01, then mark them in the Scene Editor so I know they're there; deleting the spot markers when finished. Either matching background or using alpha though, still involves multiple actors - a different one for each different sets of rules - as you're aware. I'm going to keep fingers crossed for a dedicated "Hotspot Actor" in the future...

    :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

Sign In or Register to comment.