AllanR's Recent Forum Activity

  • martinx09

    Ashley wrote a tutorial for this: https://www.scirra.com/tutorials/73/supporting-multiple-screen-sizes

    and I have seen templates that show rectangles for various resolutions that you can use as a guide to know where safe zones are that will always be on screen, and where you have to make sure you have enough background to cover unusual screen sizes.

    It is a common problem. It is up to you to decide how you want to handle it. It does sound like you want to do scale inner. Parallax can be an issue - UI layers should be set to 0,0 and you have to make sure import things are always visible on every resolution you want to support (always in the safe zone). You can use the Anchor behavior, or you can make a "camera" sprite with the scroll to behavior, or various other techniques to keep the desired parts of your game on screen.

  • Cedriking

    Yep, korbaach is correct. You should only have one else. Because the code executes EXACTLY the way it is written.

    If you read it through, you will see it first either sets it to the hand or normal for the AlertClose, then it will set it to the hand or normal for the AlertCancel, then it will set to the hand or normal for Rooms, then it will set it to the hand or normal for AlertAccept.

    So, if the mouse is over AlertClose, it WILL set it to the hand, but then the next three sections of code will all set it back to normal, because it will execute the three else clauses below the AlertClose block... (same goes for the AlertCancel and Rooms code). Only the last block doesn't get undone.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • fldr

    I haven't tried what you are doing, but I know you can get around confusion (ambiguous calls) between objects of the same type by using a family. Create a ShipFamily and put your Ship object in it. then:

    "if Ship has los to ShipFamily"->"shoot at ShipFamily" will help distinguish between who is shooting and who is the target.

  • goodeddie

    I tried Lordshiva's boomerang capx, and it launches when you click the mouse button, but it doesn't adjust the angle or velocity in relation to the mouse motion the way you wanted...

    Here is a sample I made for someone a couple weeks ago (it started as a project to show the dots for a trajectory, and ended up being an angry birds clone). You can launch red birds with the slingshot - it sets the angle and velocity based on how you pull it. You can also pick up a white bird and just toss it. It works with both mouse and touch (and works well on my iPhone). Obviously, you have to calibrate the velocity when you throw things to match how you want the gameplay to work...

    http://www.rieperts.com/games/forum/angry_birds.capx

  • matriax

    You could use functions. Create a function for each sound you want to play. Put all the sound functions in a Group.

    Then, where ever you want to play a sound in your code, just call the appropriate function.

  • Solomon

    Blackhornet is right - Pick Top/Bottom instance is the easiest way to get only one.

    you can find it way down at the bottom of the object add event screen - under Z-order.

    You can also use object.PickCount to see if you clicked on more than one. And you can do a For Each object to loop through all the instances clicked on and manually choose some other way which one (or more) to delete.

  • R0J0hound Thanks! that is good to know.

  • Ethan

    the problem is that the System > Create Object takes some time to actually create the object (or at least add the new instance to the list for that object - that seems to happen on the next tick).

    So, when the function is trying to Pick the Sprite2 nearest to Sprite, it doesn't know the one you just created exists yet. Therefore, it doesn't pick it, and then the Sprite.isChanged variable is not getting set to true, so the next time through the Repeat loop that Sprite is still available to have a Sprite2 created on it.

    Having a function re-loop through every Sprite while in a Repeat loop isn't an ideal way to do things. It would be better to pass the Sprite.UID into the function as a parameter, then in the fuction Pick Sprite by UID. Then you can do what ever you want to it - without having to loop through other instances. You can also pass the Sprite2 UID into a function and pick it as well. (trying to pick it using Pick Nearest doesn't work, but picking it directly by its UID does work).

  • tekkendp

    the image points do move as you change the size of the blue sprite. But the green sprites just stick to the original position where they were pinned - so you need to unpin them, move them to the new image point locations, and re-pin them when you change the size of the blue sprite.

    and since the green sprites are the same object, you will have to pick the first instance, move it to imagepoint 1, then pick the second instance, move it to imagepoint 2.

  • SowSow

    your ajax request is calling http://thefunkkystreet.livehost.fr/stars/login.php

    but I get a 404 page not found at that address, so it looks like you are calling the wrong page address...

  • justintime0185 Capx is just a Construct2 project saved as a single file.

    you say you are already moving the player to a new layer... if you are sure he is on the correct layer, then try setting him to the top of the z-order as well... if he is still behind something, then those objects are not on the layer you think they are (or the player isn't).

AllanR's avatar

AllanR

Member since 21 Nov, 2013

Twitter
AllanR has 23 followers

Trophy Case

  • 10-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
  • Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

19/44
How to earn trophies