cincipon's Recent Forum Activity

  • Player.8Direction.VectorY < 0 -> Player>Set X>Player.X+(0.01 * Player.8Direction.Speed)

    Player.8Direction.VectorY > 0 -> Player>Set X>Player.X-(0.01 * Player.8Direction.Speed)

    The 0.01 * Speed is because if you just do a linear value, it makes an S shape as you accelerate/decelerate.

    If you want to tweak the amount, start by trying 0.015 or 0.005. It is that sensitive =P

  • Open up your animation editor, and set your origin point on each frame to the bottom center of the cherry itself. Then correct the collision polygon around your cherry, or better yet, use the Platform tutorial version of an invisible platform bounding sprite, and a pinned art sprite!

    The origin is the crosshair icon on the bottom left of the sprite editor.

    The poly editor is right below that icon.

    Good luck!

  • I'm a lot lazier, so I would probably build the inventory as a container in the layout editor, and then only programmatically set the sprites for the items (as zatyaka and I both said), and control visibility of the container to show/hide the inventory, as opposed to rebuilding it via a function.

    I'm unsure whether or not you could get away with changing the inventory slot "animation" on item acquisition only, or if you should check the values every time you open the inventory, but it would probably be safest to recheck them every time the inventory is opened, especially if you expect the inventory to change a lot (e.g. droping items, drinking potions and the like.)

  • My first tactic would be to make the sprite for the square of inventory have an animation for each possible inventory item. The animations would be named exactly like the array stores the values, and then on change of the array set the animation of each sprite instance x,y to array[x,y]. (maybe have to cast array[x,y] as a str, I dunno offhand)

  • I'm not quite sure about what it is you want the sprite instances to do differently, but I'll take a crack!

    If you just want two or three identical sprites to behave differently, you can use their unique IDs to select them to tell them what to do.

    You can use instance variables in your sprite object, so you could check that to see what the object should "do". Like:

    If Cat.Sleeping, do nothing. If Cat.Meowing, meow; and so forth.

    That is just for boolean instance variables you create. You can make number variables and text variables as well, so you could theoretically make:

    Check out the man page here =) I'd Link it, but I'm a potential spammer, so they don't let me post links.. yet. mwahahah.

    scirra.com/manual/73/instance-variables

  • I second this. I've just learned about the System>Compare paradigm, and meh.

    So my current solution, since I just MUST see the little platform guy next to my platform events, was to hack the platform behavior's javascript files to add my own custom comparison conditions.

    The good news: this took about a minute.

    The bad news: I'll have to re-patch it every. single. update. and it will make sharing .capx impossible.

  • DING! Thank you so much!

    I come from a more object-oriented background where things are very encapsulated, so it never occurred to me to check in System to compare a value for the player object...

    Shifting my thinking is proving difficult, so I will definitely be back with more poorly-worded, yet ultimately easy-to-answer, questions.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the reply!

    Believe me, I have scoured the manual in regards to expressions, platform, and the like. What I need is the understand of HOW to access that. How do I do what you just said?

    What I am trying to do is click a button to add an event/condition that checks the Player.VectorX to see if it is below, at or above zero.

    It seems to give me no option to do this.

    I say this because if I create a condition to check some random thing I can THEN see the expressions pane and choose to see if something ELSE (That random thing I selected) is set to Player.VectorX, but I cannot access this pane when selecting the first part of a conditional check.

    (Platform has things like CompareSpeed exposed! SPEED, but I need a velocity for my purposes. I even hear that VectorX and VectorY are Accompanied by Angle and Speed for Polar use, but I cannot find Angle either...)

    This is why I am worrying about having to make a global const for ZERO and then checking to see if IT is greater than, equal to or less than Player.VectorX.

    To me that seems like such a horrible and backwards way to access this information, and I don't want to stray too far from best practices before my character can even turn around fluidly, but it is as of yet the only way I can figure out how.

    I thank you in advance!

  • yes, but my very newbie question is how do I check to see in which direction the character is moving?

  • Hi!

    I am brand new to Construct2, and am having a hard time wrapping my head around how to correctly access instance variables (perhaps this is the wrong word).

    I have an done everything as suggested in the 2d platformer tutorial, and it works, after a fashion, but it doesn't suit my needs.

    When changing direction, I want to set the Mirrored flag based on velocity. I hear this is dx. That makes sense. I cannot find how to check this variable. In a perfect world there would be a transition from running right->changing direction/slowing down->running left and vice versa based on dx (and other things like IsOnFloor or what have you).

    So how do I do this? I've figured out how to check to see if something ELSE is >= to dx, but not if dx is <= 0. Please tell me I don't have to make a 0 CONST and check my CONST to see if IT is greater than dx.

    I need it spelled out.

    --Frustrated, and graciously awaiting your help.

cincipon's avatar

cincipon

Member since 27 Feb, 2013

None one is following cincipon yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies