Change position whit another position

Hello,

I need to create a sort of teletransport of my main actor. I tried to create a rule like:
self.position.x < 100 and self.position.x > 50 and self.position.y < 200 and self.position.y > 150
change alpha = 0
change self.position.x to 900
change self.position.y to 500.

The actor changes only the alpha and when it needs to change the position it doesn't work because it stop also the parent rule. I already tried with a timer with "run to completion" but it doesn't work!!

Any idea?

Comments

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    I made a quick file and It's working for me...

    Are you saying that the rule you posted above will not work because of the parent rule? What is the parent rule?

  • patapplepatapple Member Posts: 873
    edited March 2013
    @Braydon_SFX
    Here is my rule. I have also tried with a log debugging statement and it reaches only the 2 and it doesn't run the behavior with the log debugging statement 3!
    image
    image
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited March 2013
    It may be the apostrophes (') are causing the code to stop. Take them out... GameSalad numbers should not have any punctuation unless they are real attributes and are using decimals with a period (.).

    Also, and more importantly, your rule only triggers when self.Position.Y is between 630 and 640, but you then change self.Position.Y to 412, so at that moment that rule is going to stop working.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • patapplepatapple Member Posts: 873
    @tatiang I am not using apostrophes. It is GameSalad that do this with number > 999

    @uptimistik Will check this out
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    @patapple I didn't realize that. That doesn't happen with the version of Creator I'm using (10.2 Mac Creator in the U.S.).

    I also have a demo if you're looking to swap actor positions: http://forums.gamesalad.com/discussion/comment/385870/#Comment_385870

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • patapplepatapple Member Posts: 873
    @tatiang It isn't what I was looking for. At the moment I changed the order of the behaviors and it is working...sometimes GameSalad is really weird :)
Sign In or Register to comment.