Questions about Actor and Move

zzap64zzap64 Member Posts: 405
edited March 2012 in Working with GS (Mac)
OK, i'm having a brain freeze
I'm trying to get my actor to move to position on screen by touch, not teleport but walk to a destination, 8 directional. Like Secret of monkey island style gameplay.
I have searched the forum, looked at gs helper and youtube and there are close examples but not what i'm after.
I've tried self.position x & y to match the device.touch but doesn't work correctly.
Appreciate any advice
thankyou.

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    interpolate its self position x and y to touchx and y
  • zzap64zzap64 Member Posts: 405
    i did try that but i'm unsure of the shell around it, do i put it inside a rule ?
  • pinata14pinata14 Member Posts: 150
    edited March 2012
    hey gs community
    so I have yet another problem that I cant seem to figure out. I hope it is not one of those impossible to fix on GS ones :(
    I have an actor set to move to the touch position (X,Y) when att:clicked is true and att:move button pressed is true. It works only half the time though, and the other half instead of moving to the touch position at xxx speed, it instantly appears at that point. This confuzzles me as it does work, but will glitch too.
    Any help appreciated
    -Ryan
    P.S. Bot (previously "Box") Slayer 1.5.0.0 for web version is almost done, it features a few bug fixes and graphics levels*10000
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    There was an answer to this question 3 threads down.

    But you want to interpolate self position x to touchX and interpolate self position y to touchY when your click attribute is true
  • pinata14pinata14 Member Posts: 150
    There was an answer to this question 3 threads down.

    But you want to interpolate self position x to touchX and interpolate self position y to touchY when your click attribute is true
    I've tried this, but my actor will simply go through the objects it should collide with... I want the actor to move until it hits something, then try to find its way around it.
  • anchorsonanchorson Member Posts: 15
    Try using Accelerate instead of Move. It will not give the same kind of movement but should solve the problem.
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    edited March 2012
    I think the combined threads are asking slightly different questions. However, perhaps tshirtbooth's demo and explanation might help both:

    http://forums.gamesalad.com/discussion/34441/-constrain-to-mouse-and-keep-collision-with-walls-by-tshirtbooth/p1

    Instead of having the actor move toward the mouse, have it move toward any x,y point you designate.

    Hope this helps!
    RThurman
  • zzap64zzap64 Member Posts: 405
    step in the right direction thanks.
    for my project I need to be able to touch anywhere and then the actor goes to that point. In T-shirts project you have to keep the touch pressed down to move the actor around.
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    edited March 2012
    step in the right direction thanks.
    for my project I need to be able to touch anywhere and then the actor goes to that point. In T-shirts project you have to keep the touch pressed down to move the actor around.
    Right! Now all you gotta do is think of any way to change the rule so that it will remain true (so that the actor can continue to move without a mousedown)?

    RThurman
  • zzap64zzap64 Member Posts: 405
    actually, when i run it on the hardware it works much better than in GS preview.
  • zzap64zzap64 Member Posts: 405
    @RThurman, btw - is your response a quest for me to find out ;)
  • pinata14pinata14 Member Posts: 150
    yea, i have mine set to move towards an X,Y point not the mouse position. this point is an attribute that changes when to the touch position when the touch is pressed. this is no problem as it works to move, however half the time instead of following these rules it teleports??? interpolate goes straight through collideables, and accelerate doesn't have the right effect. I'm stumped... is it a GS glitch?
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    Here is a demo that might help. Pick it apart and see if it is close to what you want to achieve.

    http://www.mediafire.com/download.php?h3p7p4yczibu3e4

    RThurman
Sign In or Register to comment.