What am I doing wrong?

BackUpAndDownBackUpAndDown Member Posts: 685
edited November -1 in Working with GS (Mac)
I want a block that falls when the player walks under it.

I constrained the players X and Y cords to global attributes and used this rule on the block.

"if game.PlayerX = self.Position.X then Move direction 270 speed 300"

What am I doing wrong?

Comments

  • BackUpAndDownBackUpAndDown Member Posts: 685
    Bump
  • DimensionGamesDimensionGames PRO Posts: 993
    You could check out utopian games platformer demo he uses magnitude to create the effect.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi BackUpAndDown; I think the problem is trying to capture the PlayerX x coordinate to match to that of the block. So I was thinking that all you would need is an invisible "hotspot" actor, placed appropriately under the block, with a Rule (after making a boolean attribute called BlockTrigger):
    When actor overlaps or collides with actor of type PlayerX
    Change Attribute BlockTrigger to true

    and in your block Rules

    When BlockTrigger is true
    Move direction 270 speed 300

    Hopefully that should work :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • BackUpAndDownBackUpAndDown Member Posts: 685
    PossesiveGaming said:
    You could check out utopian games platformer demo he uses magnitude to create the effect.

    I don't have the money to afford it. Maybe once I finish this app.
  • DimensionGamesDimensionGames PRO Posts: 993
    Gyroscope solved that problem ;)
  • BackUpAndDownBackUpAndDown Member Posts: 685
    gyroscope said:
    Hi BackUpAndDown; I think the problem is trying to capture the PlayerX x coordinate to match to that of the block. So I was thinking that all you would need is an invisible "hotspot" actor, placed appropriately under the block, with a Rule (after making a boolean attribute called BlockTrigger):
    When actor overlaps or collides with actor of type PlayerX
    Change Attribute BlockTrigger to true

    and in your block Rules

    When BlockTrigger is true
    Move direction 270 speed 300

    Hopefully that should work :-)

    I was thinking about doing something like that but then I wouldn't be able to just drag and drop the block into the scene and I would need to create a bunch on scene attributes. If I can't figure out another way I may do that... thanks for the suggestion.
Sign In or Register to comment.