Moving actor immediately to new point (rather than 'moving to')?

DigiChainDigiChain Member, PRO Posts: 1,288
edited November -1 in Working with GS (Mac)
Hi, when I click on my actor I want it to immediately jump 44pixels to the right (or left etc).
To do this I've been destroying the actor, and then spawning a new one with a x+44 attribute. Is there a better way to do this? I hear spawning is processor intensive and I'm spawning every time my actor moves.

I've tried the Move to attribute, but you can see the actor visually move on screen. I want it to immediately jump to new position.

Is there a better way?

Comments

  • simo103simo103 Member, PRO Posts: 1,331
    can you do a change attribute position X and positionY?
  • StormyStudioStormyStudio United KingdomMember Posts: 3,989
    simo103 said:
    can you do a change attribute position X and positionY?

    That'll do it...
  • DigiChainDigiChain Member, PRO Posts: 1,288
    Ok, so how would I change attribute to position x +44pixels? Rather than specifying 44 which always jumps to that pixel position in my scene.
  • AppsRacKAppsRacK Member Posts: 346
    change attribute position.x = position.x+44
    :)
  • DigiChainDigiChain Member, PRO Posts: 1,288
    Doesn't seem to be working - though makes perfect sense. I have it exactly as you have written (in the equation box typed "position.x+44".

    Why's it not working. I'm not having a good day with GS today!
  • simo103simo103 Member, PRO Posts: 1,331
    make sure you haven't typed position.x you must choose it from the pull down menus so it is change attribute self.position.x to: self.position.X+44
  • micksolomicksolo Member Posts: 264
    could be any number of reasons, could be a conflicting rule. Make sure nothing else is affecting the movement of the actor.

    If there are other rules that the actor is using they could be interfering. If its the first the actor does when pressing touch make sure the Change Attribute Rule is at the very top so its the first thing that is actioned.
  • DigiChainDigiChain Member, PRO Posts: 1,288
    Thank you guys, yes it was because I'd typed it and not selected it from the drop down menu. Hooray!
Sign In or Register to comment.