oosyrag's Recent Forum Activity

  • Two options -

    Use containers if every enemy has a field of view rectangle. If they are in a container, there will always be a pair and they will always be linked in terms of picking and actions.

    https://www.scirra.com/manual/150/containers

    Second is to assign an instance variable with the UID of the object it is associated with. So if EnemyInstance spawns ViewRectangle, in the same event set ViewRectangle.InstanceVariable to EnemyInstance.UID.

  • A loop will start and finish in the same tick. If you don't get another tick, you won't get an update.

    You can use a counter variable to increment your for loop to break up your loop into multiple frames

    Lets say you need For Loop from 0 to 20000.

    CounterVariable=0

    You can do For Loop from CounterVariable*1000 to (CounterVariable*1000+999)

    CounterVariable<20

    Add another event after to increment CounterVariable by 1 while CounterVariable<20 (this should NOT be in the loop).

    This will break your 20000 interations into 20 ticks - 0 to 999, 1000 to 1999, 2000 to 2999, ect.

    Change the amount of iterations you want to process per frame for different resolutions of progress.

  • To prevent cheating that system, you'll need a back end web server to host persistent data while the client is not running, and sync with client when they log in.

    Otherwise, you might be able to do something by parsing out system time, but a user can just change that on their own system.

  • The origin point of a sprite is by default in the middle of the sprite. 0,0 is the top left of your layout. Try setting the sprite position to 960, 540, or going into the image editor and moving the origin point to the top left.

    https://www.scirra.com/manual/63/image-points

  • An alternative method - this one uses a variable flag for your direction, in case your system doesn't use a held down key for controlling the snake, also does not rely on the angle of the sprite.

  • Update to the latest stable then.

  • All behaviors use dt. Wait uses seconds as a base, so it is framerate independent by nature. You generally do not want to use dt with the wait x seconds action.

    https://www.scirra.com/tutorials/67/del ... dependence

  • Well the point of mentioning Unity and Unreal is that they are accessible 3d engines that can handle 2d as well, whereas C2 is 2d only.

    Of course as times change new engines and languages will grow in popularity, but those two are relevant today and the near future in that if you are looking to get hired at a larger developer, knowledge of them will be more valuable than knowledge of C2.

    But then we are straying from the topic of the viability of using C2 in class, which I think is an excellent idea tool for beginning programming incidentally. I'd prefer C2 over Visual Basic (my first class) for sure.

  • I think Construct could be a excellent tool for teaching higher level logic and thinking for the high school level. You can touch on a lot of useful real world application data manipulation basics like parsing, loops, arrays, or even pathfinding. C2 has all the capabilities at least.

    So I think the question would then be is Construct be superior than say, a traditional entry level programming class using Visual Basic?

    I imagine a lot depends on how comfortable you yourself are using and teaching Construct 2 versus another programming language or engine. Licensing models and future accessibility are also considerations.

    From another perspective, I personally believe knowledge of Unity/Unreal Engine would be more relevant as we move towards the future (I'm a huge C2 fan, haven't actually touched 3d yet). The C2 event engine has a lot of small quirks and considerations that are NOT transferable to other languages - picking objects properly, for example, is a huge part of C2 specific logic that you will need to teach.

    Basically given the choice between a Construct 2 class and a Unity class in high school, I would definitely rather pick Unity.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Quick hack idea, open up an image with outlines of the resolutions you are targeting in a tab. Resize briefer window to fit the lines, change tabs to your game.

  • Your link got truncated, try taking out or breaking up the http://www part.

  • You don't need to disable any keys. All conditions need to be true for an event to run, so you add conditions to your movement events to check if they can be run. Here are a few ways to do this, I've given two examples.

    The first says if sprite is within 100 degrees of 0 (facing right) and right arrow is pressed, then move right. If the sprite is facing left (180 degrees), this event will not run.

    The second is inverted, which you can access by right clicking a condition. The condition is that this event can run if the sprite angle is NOT facing 270 degrees (up).

    To answer the question of how to find the angle specifically, you're going to use "Expressions". In this case, Sprite.Angle will give you the angle of the sprite. Here is more about expressions - https://www.scirra.com/manual/78/expressions

    Regarding why people give advice logic first instead of straight code, there are many reasons.

    One is that there are usually many ways to go about achieving something, and without seeing what you have done or what approach you have tried, a certain method/example provided may or may not work for you. This is why it is recommended to post your own capx when asking for help - tips-for-posting-in-the-quot-how-do-i-quot-forum_t62843

    People generally want you to figure it out on your own first so that you can really learn it instead of just copy pasting code. We hope that a logical hint can get you moving in the right direction, as many problems stem from a logical misunderstanding - like when you were trying to disable keys (which is a possible solution by the way, just more complicated).

    Also we literally can't just copy and past code from Construct, we need to make it, take a screenshot or save a capx and then upload it. I myself don't always work on a device with Construct on it, so I can give logical advice but not provide an example right away. Another reason to provide your capx, so we people don't have to recreate your problem from scratch.

    Another reason may be because your questions were too general. Again, there can be many solutions to a given problem. If you ask a general question, you'll get general advice. This usually leads to more specific questions which will get answered. Again, yet another reason to post your capx or what you have worked on yourself first.

    EDIT: tl;dr version: You have the highest likelihood of someone responding with a specific capx example if you provide your own capx first.

    From your first post, you asked how to fix the space between body parts. What space between body parts? We have no way of knowing what your snake looks like, or why there is space to begin with.

oosyrag's avatar

oosyrag

Member since 20 Feb, 2013

Twitter
oosyrag has 38 followers

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

21/44
How to earn trophies