Drag and Drop and Contrain to another actor on the scene

cmw333cmw333 Member Posts: 76
edited November -1 in Working with GS (Mac)
Hi

I am a complete GS beginner. I am a teacher in China and looking at making an educational game where by the user can drag an actor to collide with another actor on the screen and if correct it contrains to the correct actor. If It is wrong it gets repelled the actor bounces back to the start position. I have found something similar but I don't want to be able to drag the actor once it has collided with the correct actor. Hope what I am writing makes sense. The best example of what I have seen is an app made my "EF" English First. I'm sure it is relatively simple to do.

regards

Chris

Comments

  • DrGlickertDrGlickert Member Posts: 1,135
    Hmm, sounds pretty simple. Just getting the right attributes and such correct is all it would take.

    You could drag the actor and use a rule that if it's correct it constrains to the correct actor.

    If incorrect you could use a pair of change attributes to change the self.position.X and self.position.Y to a predetermined point.

    On your "drag" actor you could use a self.attribute (either true/false or integer of 0/1). If it's correct then it'll change to true or change to 0 or 1. Make the "drag rule" contingent on the true/false or 0/1 of the self.attribute.

    I.E. When Touch is Pressed AND inside AND self.correct is 0 or FALSE then be able to drag...
    When it collides with the correct actor change this self.attribute to TRUE or 1 and then the player won't be able to drag it anymore and it'll be on the correct actor.

    let me know if you still have problems with this.
  • cmw333cmw333 Member Posts: 76
    Jesus Christ thanks for the lightning fast response. I will try my best to follow your explanation.

    Thank you so much

    Regards

    Chris
  • cmw333cmw333 Member Posts: 76
    Hi DrGlickert

    I cant get my head around what you you wrote down. Maybe it's passed my bedtime. I have something which is similar but I am not sure how I can upload it onto the forum. Can you advise me?

    regards

    Chris
  • DrGlickertDrGlickert Member Posts: 1,135
    What are you trying to 'upload'? A picture? video? the game project?

    If it's a video or picture, look in the stickies about how to post those to the forum, if it's a game file, you'll need to turn it into a .zip and you can email it or publish it by clicking on the Orange Arrow in the creator and post it to the website...

    Is that what you're asking?
  • cmw333cmw333 Member Posts: 76
    i'm trying to upload a project file. Is there no way I can email it to you?
  • cmw333cmw333 Member Posts: 76
    Hi Again

    I'm trying to upload a project file. Can I not send you an email?
  • DrGlickertDrGlickert Member Posts: 1,135
    DrGlickert@gmail.com is my email address. Put it in a .zip and send it on over. I'll see what I can do for it.
Sign In or Register to comment.