inquiesco's Forum Posts

  • jminfantem Not sure how you set-up your project, but it doesn't support Mouse input objects, only Gamepad input. If you make a new standard SD/HD project and shift all your assets across (unless there's an easier way someone else might know?) , then you can add the Mouse input object and create click events for the controlUp, Right, Down and Left objects.

    Also, please try to make one post instead of three when they can quite easily be one, .

  • Haven't downloaded the file as I'll only download from Dropbox, but you should just require a collision detection. If they won't move through an object check if the object is solid and whether collision is on, as either the solid state or collisions need to be turned off. If you wanted to trigger an animation itself when touching the block, that requires checking a collision event when the player touches the blue square, and then to start an animation of a sprite you've made and named.

  • RookieDev If I'm understanding what you're trying to do... I think my idea could work. This is not written in Construct 2 Event code as we're discussing logic but it's a concept made while thinking of the capabilities of the engine functions:

    1) Add two objects, one of the far left of your screen and one on the far right, called LOScheckObj1 and 2. Make them transparent and with the Anchor and LineOfSight behaviours. Face the object down to the ground and give it the cone of view angle you want. Make a check on them for whatever spawn timing you're wanting (every second, two, etc.).

    2) In the above condition you want to check if a floor object is within LOScheckObj's sight angle. Then, on the floor object, you'd need a condition for if in LOS of LOScheckObj, and if so, then that floor object can spawn an enemy of your choosing.

  • No problem, keep up the good work, .

  • I notice you made that in the latest beta build (r179) and I'm running stable r178. Have you tried in the stable r178 build in case there's issues in the beta program itself? If you can do that and still have issues, resubmit the .capx and I'll take a quick gander and see if I can try to find what's going wrong, .

  • Epiconnn While not being able to open it in the game, if you're running it in a web browser you can add a Browser object and can do the following:

    Browser -> Page is visible

    Keyboard -> On G pressed (an example key)

    Then add Browser -> Open URL in new window -> and enter the URL of the forum you want and the title of that window. Now, whenever the game tab is active and visible, if you hit G it'll open up a new tab or window with your forum topic in it.

  • fscopel To be honest, since you're using exact measurements for checking distance rather than rounding them up, the chances of you getting equal distance between two cannons is very, very low. I tried in your example to get somewhere in the middle of 290.181271743284 (or something equally hard, ha ha) and I couldn't even equalise the .18 part because of mouse sensitivity. If you were rounding up the numbers to whole numbers then yeah, it'd be more of a problem and require solving.

    As for bullets per cannon, you can give each cannon an instance variable of bullet_count, then give them 500 or however many you're wanting. The logic of the engine when objects are in a family is that they interpret the objects in them individually, so only objects meeting the required conditions you've put to the family are triggered. Based on that you should be able to then just set fam_cannons -> Subtract 1 from bullet_count. It's a bit different moving from programming languages where we need to explicitly check each object to see if it meets conditions, which is a good thing, I think, . Though I still get caught out sometimes wanting to write JavaScript to pick out specific objects and have to hunt down the equivalent method of thought, lol.

    As for your game mechanics, looks fun, I like those games as I'm heavily nostalgic, . Hence why I'm making a space shooter, and possibly an RPG after, ha ha. Keep up the good work!

  • TrapInc Fixed it for you, you needed a check for when the player is not moving and is not holding the down arrow. Because you stop moving when attacking the idle movement took precedence. No else statements are required.

  • fscopel I'll have to check this out as a possibility, I ended up binding my ship movement to left mouse button hold to achieve the smooth movement, so that's an option too unless you'd prefer keys, .

  • One method you could try is giving the family the LineOfSight object behaviour, and then set the range to 500 or so. LineOfSight automatically checks range and will apply it to each cannon, so if your cannons were 100 pixels apart, each cannon farther away wouldn't see a target because they're 500 plus the 100 pixels to the next cannon away. You can then replace all those cannon distance checks with a check for Cannons -> Has LOS to object and set the object to be checked to be a family of enemies. You can then spawn Bullet1 off Cannons and it should automatically spawn it at the cannons which actually have range on the target.

  • Remove the Set angle to 0 degrees, and instead of having System create the object of the bullet, set it so that the Player object spawns the bullet. It should then travel from the player and their facing direction.

  • I'm guessing you want the camera to follow a character as it slides down? If it's a platforming game, get the Y value of your normal floor level and store that in a variable. Give your player character the ScrollTo behaviour and set it to Disabled in the player properties window. Then when you enter a sloping floor, you obviously go up or down gradually, so as soon as the player hits that block (on collision check maybe) set player -> Set enabled (in the ScrollTo section) and select the enabled state. Then you just need to add an else statement to it turning it off.

    Hope this helps, .

  • Have a text object called dc_xxxxx_input or something you think makes sense for easy code readability. Also make a form button that matches whatever naming scheme you're using but _button at the end. Then use the following Event code:

    dc_input_xxxxx_btn -> On clicked

    Then add a sub-event of:

    dc_xxxxx_input -> Compare text

    Set the compare value to be "325".

    Then, add the success events you want to happen. Also add an Else for if it fails and you have fail events. If you wanted to keep track of the correct codes, such as if the player can discover the code, it should be in a text instance variable for the dc_input_xxxxx_btn, and instead of doing the dc_xxxxx_input -> Compare text, you want to instead do:

    dc_input_xxxxx_btn -> Compare instance variable

    Then check if dc_input_xxxxx_btn is equal to dc_xxxxx_input.Text, then have success and fail events.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'll explain what he was meant by using arrays, .

    Arrays store data in an orderly fashion, and you can call and insert data wherever you want. Arrays always start from 0, so the first spot for data is 0. To apply this to how you want to save data, you need to make an Array object. This is handy because you can store your level data in the order of levels, making it easy to select data and add it to an overall scoring list, for example. We'll call it array_name for ease of example, . On the Array properties window you'll see a Width, Height and Depth. Width is the total amount of levels you want minus 1 (since it starts at 0, so 13 levels is 12 in the array), and it also represents X, whereas the Height and Depth represent Y and Z respectively. Once made, in an overall Event sheet (one you include on each local Event sheet for each layout) you need to click the following then read on:

    System -> Set at X - NOTE: this is found under the Array section

    Arrays can hold up to three parts of data in one section, for example 'array = [0,01,02], [1,11,12]'. Each has a X, Y, Z number, but you can use only the X, or the X and Y... totally up to what you need to store, but for what you want you just need X, so you use the above Event code for Set at X. For the X value, put the level number. For the value, put the score variable from that local Event sheet. Let's say the score variable is user_score and represents 16. You should now have the following Event code once you hit the Done button:

    array_name -> Set value at 0 to user_score

    The above score of user_score (16) is now set to be array_name[0] in terms of positioning. If you want to grab it from the array to have on the screen to check the score, all you have to do is have an element of your choice set the value to array_name.At(0) (0 is the X, if you had three, you'd need 0, 0, 0 or whatever positions you're wanting to grab) and it will retrieve it. That will retrieve the score which is 16 in this example.

    Hope this helps!

  • If you wanted to save having to transfer through what is essentially a blank layer, spawn the spikes on the menu screen but hide them. When the layout loads, set them to Visible and the positions should be loaded, and you save the user a meaningless click, .