Dragging an actor 'Not' through walls

enigmacubedenigmacubed Member Posts: 35
edited November -1 in Working with GS (Mac)
on one of my levels, you have to drag an actor outside of a box, however, you can just drag him through the walls making the task much easier, rather than dragging him through the exit.

ive tried adding in the collide rule, but it only seems to affect the actor when your not dragging him, if i let go of the actor on top of the wall, it moves him back inside, but whilst im dragging, i can just go straight through it.

basically asking, how do i made a object, that is solid and no actor can pass through it, regardless if its being dragged by the user's mouse/finger over it.

Comments

  • scitunesscitunes Member, Sous Chef Posts: 4,047
    unfortunately it isn't possible. I have created a demo that you can find in the new section of the GS creator start menu. It is called "Fake Constrain With Collisions". You can search for that.

    Hope it helps!
  • 0belisk0belisk PRO Posts: 189
    okay thanks for the information, suppose ill just change the way im making it, resolved, close this :)
  • enigmacubedenigmacubed Member Posts: 35
    I found this post here:

    http://gamesalad.com/forums/topic.php?id=33659

    And it describes my exact problem so I did exactly what scitunes said to do. It works fine in my game but it doesn't work that fast. The game I'm currently creating is all based on speed and so with this slow method, my game will not be possible.

    I originally made the game in Corona SDK but when I encountered problems through making different menus, I decided to try out game salad. Unfortunately Game Salad is not a physics based system, Corona is. So solving the 'drag without passing through walls' problem is not even an issue in Corona, because it works the way physics in real life work.

    Here's a video showing the difference:

    Also, when you drag in Game Salad with this method, the ball is not constrained to the mouse and for some reason it flies past it and loops back, you'll see it at the end of the video.

    What can I do to solve this problem. Is it impossible to fix? In which case The Game Salad Development Team should solve this problem. I don't understand how a concept so basic has been overlooked for so long. I almost cried when I saw that scitunes said: unfortunately it isn't possible.

    I mean, sorry for pushing the edge and trying a new concept... but this just makes me sad.

    Thanks in advance for any help provided.
    -Ben
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    enigmacubed said:
    I found this post here:

    http://gamesalad.com/forums/topic.php?id=33659

    I've reopened and merged that thread to this one.

    I did a demo of something like this a while back but I don't know what I did with it. I'll see if I can find something. If I remember right it basically was basically putting the Touch rules inside the otherwise of a When over laps or collides with wall actor. And then add a change attribute behavior to make it move back from the wall when it collides.
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Oh and on a side not to the sous-chef that closed the other thread. Just cause a user says "ok this can be closed" doesn't mean it needs to be closed. The reason is just like this. The thread was opened yesterday and closed but then today someone had more questions about the same issue. so they had to open a new thread when there was a perfectly good one started yesterday. Sorry to go on rant an of course its just my opinion.

    Back to the subject at hand...
  • enigmacubedenigmacubed Member Posts: 35
    Thanks guys for all the help. Cant wait to see what you come up with Tshirt. Sorry for jumping to conclusions that this had never been fixed before.

    And tenrdrmer, I already thought about doing it like the way you described but my level is made up of 5 walls since its a closed shape and therefore I would have to define a different rule for each one because after colliding with each of the 5 different walls, the ball would need to move a different way to get back to the track. This would get very tedious when I start making more complicated levels.

    here's what the walls look like when alpha is 1: http://i614.photobucket.com/albums/tt226/bnzproductions/Screenshot2011-10-22at102308PM.png
Sign In or Register to comment.