Drag and drop and camera control

BasGoodboyBasGoodboy Member, PRO Posts: 310
edited July 2014 in Working with GS (Mac)

Hey all,

So I have an actor, which can be dragged and dropped to anywhere in the map, it's a cursor, which will get followed by 'special elite' force actors. So the cursor goes and the forces follow.

Now I made the map bigger, put camera control on the cursor actor (drag and drop actor) and made the camera control smallest.

Problem is, altho the map is big, and the camera control works, i can't drag and drop outside the normal device lines somehow.. it get's blocked at the borders it seems. The map is really bigger and camera control is set good.

I think the problem is with the drag and drop actor.

The rules of this actor:

-camera control

-If actor receives event > touch > is pressed
constrain attribute SELFPOSITION X to game.Mouse.Position.X
constrain attribute SELPOSITION Y to game. Mouse.Position.Y

Any ideas please?

Goodboi Gamestudios | Monster Jumper now on the App Store

Comments

  • BasGoodboyBasGoodboy Member, PRO Posts: 310

    Up

    Goodboi Gamestudios | Monster Jumper now on the App Store

  • BasGoodboyBasGoodboy Member, PRO Posts: 310

    Up. Unfortunately still didn't figure this one out..

    Goodboi Gamestudios | Monster Jumper now on the App Store

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,879

    @BasGoodboy‌ -- you also need to take the camera's origin into consideration:

    Constrain Attribute: [ self.Position.X ] To: [ scene.Camera.Origin.X + game.Mouse.Position.X ]

  • BasGoodboyBasGoodboy Member, PRO Posts: 310

    Big awesome for you @RThurman! Gonna check tomorrow if it works proper.

    Goodboi Gamestudios | Monster Jumper now on the App Store

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,879

    @BasGoodboy said:
    Big awesome for you RThurman! Gonna check tomorrow if it works proper.

    You are welcome. It probably won't work entirely "proper" (because there are yet other things to take into account) but it will get you unstuck and on your way again!

  • BasGoodboyBasGoodboy Member, PRO Posts: 310

    @RThurman this works, after some small repairments, proper now! Only, I want the touch actor not to be able to move so fast, because now, if you drag the touch actor through the whole scene, it goes very fast. I want a speedlimit on this. I can't figure it out.

    Anyone ideas?

    Goodboi Gamestudios | Monster Jumper now on the App Store

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,879

    Yup -- Thats one of the 'other things' I mentioned. Have you looked over any of the templates and/or demos that used camera control? (There used to be a half dozen or so on the forums).

  • UtopianGamesUtopianGames Member Posts: 5,692

    Would this help?

    http://www.deepblueapps.com/drag-around/

    Darren.

  • BasGoodboyBasGoodboy Member, PRO Posts: 310

    @RThurman couldn't find it.
    @DeepBlueApps Just downloaded it but it's not exactly what I ment, altho the 10* rule got my attention, which seem to be the speed.

    But I can't seem to integrate it on the right way.

    All I want is a mouse actor to be dragged around a big scene with a certain speed, without the certain speed it all goes too fast, this mouse actor will be followed by 'special forces' actors.

    Goodboi Gamestudios | Monster Jumper now on the App Store

  • BasGoodboyBasGoodboy Member, PRO Posts: 310

    Anyone?

    Goodboi Gamestudios | Monster Jumper now on the App Store

  • Any solutions for this "going fast" issue? @BasGoodboy

  • pHghostpHghost London, UKMember Posts: 2,342
    edited October 2017

    @candemirag@candemirag.com said:
    Any solutions

    Please do not dig up more than three year old threads like this. @BasGoodboy hasn't been active on the Forums since August 2014...

Sign In or Register to comment.