AllanR's Recent Forum Activity

  • Unconnected

    12 % 64 = 12

    because 12 goes into 64 zero times with 12 left over.

    so, you would have 12>=0 Then (12 - 12) else (12 - 12) - 64

    which is 0 or -64

    0 is the answer.

  • Try Construct 3

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

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

    The % symbol stands for MOD or modulo, which gives a remainder after dividing, so 197 % 64 = 5

    because 64 divides into 197 three times with 5 left over.

    TileXValue >= 0 ? (TileXValue - TileXValue%64) : (TileXValue - TileXValue%64) -64

    this is an if then else statement. The ? is the THEN and the : is the ELSE

    For what you are trying to do , I would use: Round(number/multiple) * multiple

    anything .5 or above will round up, and anything .499999... or down will round down.

    (oh! ROJOhound beat me to it again!)

  • Animatect

    I didn't look at my code very closely, I just know that I have learned a lot over the last year. The zooming in and out doesn't feel as smooth as I remember, so I think something there could be improved. Also, the invert check box doesn't actually do anything, and I seem to remember making that change which direction the screen scrolls, but I couldn't find any other version of the capx...

    anyway, good luck with your game!

  • Animatect

    Here is a scroll-able, zoom-able map example I did last year for someone asking similar questions. I might do some things different now, but this should give you lots of ideas to work with.

    you can use layout zoom if you want - just disable zooming for the UI layer by setting its Scale rate to zero.

    Tile maps are a very good idea for big maps - if you can build the map from a reusable tile set.

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

  • beardman

    here is the version that I modified... http://www.rieperts.com/games/forum/Uru.capx

  • igalencar

    sounds like an audio scheduling type of problem. Which is something that was added in release r225. I haven't played around with it at all, but you may have to read up on that, and try the example to see if that will solve your problem.

  • beardman

    just took a look at your capx, and when the Roc is flying to the left, it is never hitting the centerline, or the farleftPt. The path ends before it makes contact with the line, so it never sets a new path. Probably because of where origins are... or something like that. Also, the Roc doesn't seem to want to fly very close to the left edge of the screen.

    So, I moved the farleftPt out from the edge (set its x to 25). And when finding a path to the left, I told it to subtract 50 from the x of the target to make sure it was going to hit the line: Find Path to (centerLine.X -50, centerLine.Y) or Find Path to (FarLeftPt.X -50, FarLeftPt.Y)

    I didn't have to change the path finding when it was flying to the right.

    After those changes it continuously flew back and forth just fine.

  • LaDestitute

    ok, I took a quick look, and the problem is in the Main event sheet - On Start of Layout. You create the Rupees object on layer 4. But your HUD layers are now 5 and 6. (Since you probably inserted a new layer to be the Shadows layer). Create Rupees on layer 5 or 6 and it works fine.

    It is a good idea to always reference layers by name, not their id number. That way you don't have to worry about inserting new layers... So, create Rupees on layer "BottomHUD" instead of 5, and then it will always work regardless of how many layers you add or delete (unless you delete the bottomHUD layer of course, lol)

    One time while testing and going into one of the houses I ended up out side the house some how... I did look at the code but there is some bug in there somewhere when you enter a house. (it only happened once - although, I didn't try very many times).

  • djohoe28

    Oh, ROJOhound beat me too it! I was going to suggest that, as well as saying you could also use "Pick top instance" because the last one created would be the highest in the z-order (unless you manually change it).

    You could also save the UID in a global variable every time you create an instance. Then you have that available any time you need the sprite without having to make C2 loop through all the instances.

  • dondosh

    When you left-click and move Sprite3 over the blue box, the object collides with the box for several ticks, so the impulse is applied multiple times - and that makes it fly off so fast you can't see it move.

    so, you need to find a way to apply the impulse only once - by moving the object just above the box (so it will fall on it like the way the right-clicked ones do), or use an instance variable that gets set when the impulse is applied that prevents it from happening again.

    Also, the angle of impulse you are using (150) is down to the left (180 would be straight to the left). Your picture shows you want an upward impulse, so I was using 255 degrees and an impulse of 4 to get something close to what you are after. I also set the velocity to 0,0 just before applying the impulse and that gave more consistent results.

  • fathijack1999

    chipmunk physics is a plugin made by RojoHound, and is better than the built in physics (has more features).

    if you have trouble installing the plugin, just look at the older version I posted above. It doesn't leave the trail of dots after the shot, or allow zooming, but is close enough to give you an idea of what can be done. (and it doesn't use chipmunk physics.)

  • Ach3rryontop

    I helped someone last year with a coloring example - not quite what you are after, but uses Rojohound's canvas plugin...

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

AllanR's avatar

AllanR

Member since 21 Nov, 2013

Twitter
AllanR has 23 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
  • 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

20/44
How to earn trophies