Make the screen 'unpressable' when NOT grounded?

Hey guys,
this is my first post as i'm completely new to GS and have managed to get quite far with my current game using tutorials, forum posts etc. but I've finally ran into a wall. the game that I'm designing uses a power bar (same as the cannon physics template) to determine how far/high the actor jumps. but when i click when my actor is in mid air, he stops and drops straight down. i figured the best way around this would to make the screen 'unpressable' while the actor is in mid air. is this even possible? any help would be greatly appreciated. :) Thanks!

Best Answer

  • tatiangtatiang Posts: 11,949
    Accepted Answer
    You can use a boolean attribute that you create, for example game.unpressable. Set it to false (unchecked). In your actor that you don't want to be pressable, place all of those rules inside of a rule that says When attribute game.unpressable is true.

    In your cannon/power bar actor or another actor, have a rule that changes game.unpressable to true once the actor is launched.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Answers

  • MarpCarkMarpCark Member Posts: 121
    oh my god thank you so much! this has been bugging me for a good 6 hours! took me a while to get my head around what you were trying to say (only started using GS 2 days ago), but i finally got it and it works perfectly! thanks for responding :)
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Hooray! It'll all make sense in time... :)

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.