Constrain throwing to specific area

DuesDues Member Posts: 1,159
Hi guys!

Hope someone can help me with this one (to). :)

I have an actor that I can throw, but I only want to be able to throw him within a specific area ( like bottom of screen an x-pixels up. )
The purpose of this is that I do not want the player to be able to touch (pick up) and drag the actor across the scene. I want to force him to toss.

Hope u understand my question :)

Comments

  • famekraftsfamekrafts Member, BASIC Posts: 834
    edited December 2012
    Simply make an invisible actor and place it on the scene, make it collide with the actor you want to throw and same with the wall (use a collide attribute). So it will not go out of the area outside the wall. I am doing it for my game. if it still goes out, try to increase the density of the wall very high.
  • DuesDues Member Posts: 1,159
    But if I do that, then the actor won't be able to move outside that area at all? I want to be able to throw it across the whole scene but I want the release of the actor to be within the specific area
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Hey there,

    I've come up with a project file for you - shoot me an email.
    braydon(at)coyer(dot)net
  • DuesDues Member Posts: 1,159
    Awesome! Thanks guys! :D
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Notice that rule in the block actor - I just said when touch is pressed and if the self.Position X is equal or less than 240. You can change that value to whatever you need. Even for Self Y.

    If you go out of that area - it will automatically release and continue at the speed you were going. Hope this is what you were looking for.

    Bray
  • famekraftsfamekrafts Member, BASIC Posts: 834
    Basically use an attribute when the object is grabbed, it won't go outside the area, but when it's thrown, grab is false it will go out, once it is out of area say more than 250 x it will not be grabbed again.
Sign In or Register to comment.