Vector X Distance problem(Capx)

Get help using Construct 2

Post » Wed Dec 26, 2012 3:44 am

Hey guys, I'm having some trouble using the Vector X Platform.

I'm trying to get my player to go further to the right(playerCollisionBox.Platform.VectorX+9000) while not mirrored by pressing U.

The problem is that it goes the same distance as when the player is Mirrored to the left(playerCollisionBox.Platform.VectorX-2000) even though there is a big difference within both codes.   

If i'm not explaining too well, here is a screenshot of the code and the capx file. Thanks     [email protected]/8308510947/, on Flickr

I'm still not allowed to post pictures? Iplaygames2012-12-26 03:45:34
Posts: 46
Reputation: 3,036

Post » Wed Dec 26, 2012 9:00 am

The speed of the platform behavior is always limited by the Max speed property.

One way to make it work is to do something like:
[code]playerCollision: Is animation attack playing
    local number attackSpeed = 0
    local number defaultSpeed = 0
    playerCollision: [invert] Is mirrored
        ->System: set attackSpeed to 9000
    playerCollision: Is mirrored    
        ->System: set attackSpeed to -2000
    -> System: set defaultSpeed to playerCollision.Platform.MaxSpeed
    -> playerCollision: set Platform maximum speed to attackSpeed
    -> wait 0.2 seconds
    -> playerCollision: set Platform maximum speed to defaultSpeed[/code]
Be carefull, since you probably didn't know about the max speed issue, you probably set the speed way to high since it was always clamped to max speed which default to 330...

Yann2012-12-26 09:00:55
Posts: 1,488
Reputation: 16,594

Return to How do I....?

Who is online

Users browsing this forum: Google [Bot] and 65 guests