How would I set this function up?
![Evergazer](http://forums.gamesalad.com/applications/dashboard/design/images/defaulticon.png)
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.
Please help!
BTW, if you could include a detailed instruction sequence for me that would be great.
Best Answers
-
guilleface Posts: 1,014
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. -
guilleface Posts: 1,014
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. -
tatiang Posts: 11,949
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
could you like write a step by step process?
https://dl.dropbox.com/u/46439975/pass through wall.zip
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