marlon667's Forum Posts

  • I tried it on ly PC and everything seemas to work fine, unless you dont want the character to turn upside down?

  • Your Welcome :)

  • Can you post a screen shot of your events please?

  • If you want to use the origin image point, use the X and Y expressions for the sprite. If you want to use an image point, use the ImagePointX and ImagePointY expressions.

    Create a new image point and call it something, then use the ImagePointX and ImagePointY expressions. Could I see a screenshot of what you want to do?

  • Yeah, It would be easier to use conditions instead of clamp, one for zero HP and one for max (make a global variable called MAXHP, makes it easier for level ups and stuff).

  • 1) Create a Global Variable called Rotating. Set the initial Value to 0

    When the key is pressed, set the variable to one. When the layout has finnished rotating, set the variable to 0 again.

    In the condition where the key is pressed, add another condition "System: Compare Variable: Rotating = 0" That way, the event wont be triggered while the thing is rotating. If you want a qued system, where it waits untill the rotation has finnished, let me know, that may take a little more explaining.

    2) As far as I know, you can only rotate the point of origin. You can do this using the Angle actions in the particle that you want to rotate.

    Hope this helps :)

  • May I ask, what do you use Clamp for?

  • delgado I think it would be easier if you didn't use Clamp and instead used "HP - (SmallMonster2.attack - DEFENSEPlayer)"

    You should also set a condition for when the Player's Defense is larger than the Monster's attack, otherwise the player will be healed every time it gets hit with an attack that is weaker than the Player Defense. Look at my psuedo code above^^^

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • delgado Ok you can use the Accelerate Towards Position Action in the CustomMovement Behaviour.

    For the X and Y parameters, open the Expression Window and navigat to the Sprite that you want to follow, there is an expression under Size and Position that says ImagePointX and ImagePointY (for the X and Y co-ordinates of the image points). Replace the ImagePoint in the place holder with the image point you want it to follow. I don't know about locking rotation though, sorry.

  • Could you upload a capx file, or a screen shot of your config please?

  • I've been able to open many instances of C2 at the same time, but I only do that to copy and paste functions from other projects when i cba to do it manually :P

    I think it just has the effect of taking more RAM. I would personally use separate windows because two or more projects in the same window would clutter the tab bar.

  • Here comes psuedo code:

    DEFINE Globals:(

    HP as Numner

    PlayerDefense as Number = 15

    EnemyAttack as Number = 10

    )

    On Colision with a Sprite DO:(

    • IF PlayerDefense = EnemyAttack THEN

    -- HP = HP - 1

    • ELSE IF PlayerDefense > EnemyAttack THEN

    -- Output("Player sustained no damage from the attack!")

    • ELSE

    -- HP = HP - (PlayerDefense - EnemyAttack)

    )

    Something like that I think :P

  • On an Event Sheet, click Add Action > System and scroll to the General section, There you will find the Go To Layout action

  • Two things:

    Try playing around with the CustomMovement Behaviour on the Sprite you want to move. Also you need to add the "Touch" object to your project to allow recognition of touch.

    You also need to understand how to use expressions in your C2 project. I suggest looking in the tutorials for information on expressions.

    If you need more information, just ask :)

  • There is a function in the System Object that says "Go To Layout". It asks for which Layout you want to go to.

    Also, you should check if your behaviours are set on each instance in your other layout, this is done automatically but it cant hurt to check.

    Can you upload a .capx file so we could look at the problem first-hand? It would also be useful if you put a little more description into your request and let us know which version of Construct 2 you are using.

    You can upload to places like DropBox (a C2 favorite :D) Google drive or SkyDrive, then post the link here :)