Dragging-but not always

liefkeesliefkees Member Posts: 11
edited April 2012 in Working with GS (Mac)
Hi everyone,

I created a scene that is draggable (thanks to Tshirtbooth's YouTube tutorial). However, I want the scene to remain static when a spawned actor (in my case: a flower) is moved by the user. Otherwise it becomes very difficult to place the actor on an exact spot. I tried several options, including placing them on a separate layer, but it doesn't have the effect I want. Does anyone know the solution?

I added the scene to make sure you understand the problem...

Thanks!

Maaike

http://www.mediafire.com/?1h5yrd1mlf8rkyh

Best Answer

  • GreenHavenGamesGreenHavenGames Posts: 62
    Accepted Answer
    Create a game attribute Boolean - Dragging Object

    In Cam put all the rules inside one rule that says: if attribute game.Dragging Object is false (this makes it so the camera won't move with you're touching an object)

    Inside each actor, above the other rules, make a rule: change attribute Game.Dragging Object to true
    In the other wise portion make a rule: change attribute: game.Dragging Object to false


    Are the objects supposed to scroll with the existing fence background once placed?
    Let me know if you need more or better details on this.

Answers

  • liefkeesliefkees Member Posts: 11
    It works perfectly, thanks The objects are indeed supposed to scroll with the existing fence (they are to stay put in the spot the user placed them). They now don't move along. How do I do this?
  • liefkeesliefkees Member Posts: 11
    Create a game attribute Boolean - Dragging Object

    In Cam put all the rules inside one rule that says: if attribute game.Dragging Object is false (this makes it so the camera won't move with you're touching an object)

    Inside each actor, above the other rules, make a rule: change attribute Game.Dragging Object to true
    In the other wise portion make a rule: change attribute: game.Dragging Object to false


    Are the objects supposed to scroll with the existing fence background once placed?
    Let me know if you need more or better details on this.
    Hi GreenHavenGames,

    I keep struggling with the objects: your advice worked out brilliantly but, like you already guessed, the objects are supposed to scroll with the existing fence background, and they don't (as they don't move at all when you scroll). Ay advice on how to change this - without having to change the entire programming?


Sign In or Register to comment.