Nimtrix's Forum Posts

  • I assume this is top-down and you're moving along the X axis.

    Make a variable "position" and a variable "speed", on start of layout set the "position" variable to the players X position, set the speed to 1 in the beginning. On left or right click, add or subtract 160 to/from the position variable. Then every tick set player position to:

    lerp(Self.X, position, dt*speed)

    If you need help understanding lerp (linear interpolation) I recommend the links in the FAQ in this subforum.

  • Whiteclaws

    Well, his character IS falling in the gif, so it should work. And he probably doesn't want you to be able to kill the enemy at the start of a jump (on the way up).

  • You can use beta versions without buying a license, however I'm afraid you'll need a license to use families, which is what you'll need to do the "Generic sprite touched" thing. Add all objects to a family, then make an event based off that family.

    As a workaround to families, you can use one object with different animations (if they are not animated you can simply use frames in the same animation). This way you can make events for the object, then separate them based off which animation/frame they have.

    Edit: I recommend downloading release 134 (even if you don't care about the capx I posted), apparently 135 has some issues with alt+tabbing. To save time looking for the release page, click the link in my signature.

  • Hmm, looks fine to me. Any chance of uploading your file to dropbox and post a link here so I can have a look?

  • There are ways to do everything you have described in this thread, but you need to understand; This is not programming in a traditional sense. Though if you understand how to use C2, your programming skills will come in very handy.

    On to the questions: Setting a value depending on which button is pressed is pretty simple. Many ways to do it, but I would recommend using an instance variable:

    ButtonsSimple.capx (r134)

    As for your other questions, I'm unsure what you mean by "trigger", a button, an action, an event, a condition? All these could be described as triggers, but I haven't used that term, so I'm unsure what you mean by it. And in the last post there's too much back and forth in your explanation, I have no idea what you're looking for.

    By the way, have you read the Beginner's Guide? Even if you don't feel like a beginner because of your programming experience, it's important to understand how C2 operates. You can do almost anything in C2, but the approach is often different compared to programming from scratch.

  • Happy to help. A setup similar to this should do the trick for you I believe:

    PlatformMirror.capx (r134)

  • Hmm, what kind of behaviour are you using? Seems to me the platform behavior sorts this out automatically. Maybe you could upload your file to dropbox and post a link here so I can have a look?

  • Check out my example in this thread, that should do the trick in your case as well, comments inside the .capx.

    PS: If you searched the forum for "cooldown" that thread would have been in the search results.

  • When calling a function, you can also pass parameters. These are simply numbers or strings that are made available to the function.

    For simple questions about what the different features do you should just look it up in the manual.

    It's also a bit difficult to imagine exactly what happens with that screenshot since we know nothing about the position of the objects or what they are there for. It's easier if you share your file, so we don't have to spend ages interpreting your event sheet and just guessing what it looks like in your layout.

    If you don't want to share your file for some reason, you can recreate the bit you need help with in a smaller project.

    Anyway, I'd love to help, but I'm not really sure what the problem is, and what your events are meant to do, and I'd rather not spend the next 30min trying to figure it out when I could just press the preview button and see it in a few seconds. <img src="smileys/smiley2.gif" border="0" align="middle">

  • You could add another, inverted condition to the event so that it doesn't move if both keys are pressed:

    +Left Arrow Down

    +Right Arrow Not Down

    • > Move left

    Invert conditions by pressing I on the keyboard or right-clicking.

  • Hi, welcome to the community.

    1. There are many ways to move things around in C2, but how you do it depends very much on what kind of movement you have in mind. Maybe you could be a bit more specific? The beginner's guide covers a lot of the basics as well, so you might want to skim through it if you haven't already.

    2. This one's probably slightly more complicated, first we need a variable to use as a timer, then we can adjust the opacity of the object based off that variable. Here's an example (comments inside):

    FadeOverTime.capx (r134)

  • You have 3 columns and 3 rows, so you need a (3,3,1) sized array.

    The default height is 1, it can't be 0 or the array would always be empty, so if you want to add two to the height, that makes 3.

  • How about something like this for the touch end?

    TouchRelease.capx (r134)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I would just use global variables for things like score and time, but you could also make an object global by setting it in the properties to the left (if default setup) after selecting the object.

    By the way, you can keep all the global variables in it's own event sheet if you have a lot of them, then include that event sheet wherever you need to use the variables.

  • Yeah, use "System -> Create Object" instead of selecting the player object and using the spawn action.

    Then you just set "sprplayer.X + 40" to position it based off the origin, or "sprplayer(1).X + 40" to position based off imagepoint 1.