How would I set this function up?

EvergazerEvergazer Member Posts: 6
edited July 2012 in Working with GS (Mac)
I have this object that cant get through a wall, but i want it to be able to pass through the wall freely by picking up a power- up. Kind of like an invisible power- up.
Please help!
BTW, if you could include a detailed instruction sequence for me that would be great.

Best Answers

  • guillefaceguilleface Posts: 1,014
    Accepted Answer
    create a game.atribbute called what ever, say "power up", now on the actor have a rule, when game.attribute.powerup is false and overlaps with wall
    do this "collide with wall"

    so when you pick the power up, the attribute "powerup" will change to true, so this makes the actor no longer collides with the wall. i hope this will help.
  • guillefaceguilleface Posts: 1,014
    Accepted Answer
    let me know if it works. because i forget to mention, on your actor set a rule
    when overlaps with your power ups to
    change attribute "power ups" to true.
  • tatiangtatiang Posts: 11,949
    Accepted Answer
    Worked fine for me. What version of GameSalad are you using? And OS X or Windows?

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

Answers

  • EvergazerEvergazer Member Posts: 6
    thanks!
  • EvergazerEvergazer Member Posts: 6
    ok could you make your answer a little bit more specific? I'm kinda slow... sry...
    could you like write a step by step process?
  • EvergazerEvergazer Member Posts: 6
    it doesnt work
  • EvergazerEvergazer Member Posts: 6
    i mean it wont open
  • EvergazerEvergazer Member Posts: 6
    Windows 7.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    From the FAQs:

    Q: Are Creator for Windows and Mac perfectly compatible?

    GameSalad Creator for Windows is currently at version 0.9.92 Beta, meaning that it is compatible with Creator for Mac 0.9.92. Please keep in mind that we expect Creator for Mac 0.9.93 Beta to be released very soon, and there may be a few hiccups with transferring files from Mac Creator 0.9.93 to Windows Creator 0.9.92. We are working to keep those hiccups to a minimum. Most behaviors should function fully as expected, though behaviors that have been modified for 0.9.93 on Mac may see some unexpected results in Windows Creator. Game projects are fully transferable from Windows to Mac, using the 'export' function.
    We will work to maintain version sync following the release of 0.9.93 for Windows.

    Now, that being said, let's see if we can get you past this stumbling block...

    The idea is that you need to change the value of an attribute that determines whether or not your object can pass through a wall. When you check for a collision, also check the value of that attribute. @guilleface explained it really well... I'm not sure how else to explain it and I don't have the Windows version of Creator available to me right now or I'd make you a demo. This is essentially how the rules would function:

    Object actor
    When actor collides with actor powerup --> Change Attribute self.invisible to true
    When ALL of the following are true: actor collides with actor wall AND self.invisible is false --> Collide with actor wall

    Stay tuned to @tshirtbooth's http://gshelper.com/category/windowsgsvideos for more tutorial videos.

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

  • EvergazerEvergazer Member Posts: 6
    Thanks! That's better for me.
Sign In or Register to comment.