Turaco's Forum Posts

  • What I need:

    Character has sprites for 8 directions. He is a turret and can shoot in 360 directions. How do I make this look good?

    Is there a way to rotate/skew sprites to adjust the direction of pointing?

  • What I'm trying to make:

    Have 4 texts. Arrange them in order by moving them with mouse/touch.

    So far I got the drag & drop working, also tried out by comparing Y between instance variables to call functions that trigger the texts to move to pre-set positions. But the whole thing is inconsistent and has many bugs that I can't seem to fix.

    Has anyone done something similar or knows of a good solution? Thanks!!!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Have been struggling with this for like 4 hours.

    What I need:

    Pick 4 random numbers between 0 and 64. All of those numbers can't be duplicate of another number.

    What is the easiest way to solve this? Please, anyone!

  • Hi. Your hex plugin isn't working properly. It leaves open space inbetween tiles vertically.

    Here:

    http://imgur.com/a/fy9SF

    Although I solved it (hopefuly without consequences) by setting HexTx width to 64 and height to 48.

    And I have a question. I tried picking a tile by using "Chess.LX, Chess.LY" but it didn't work. How can I create a tile on top of another tile, where my chess object is currently standing?

  • AllanR Thanks a lot. Although I think I'll keep using the plugin because it's simpler (you just set boundaries to image points of an object -background picture). Also I noticed when I zoom in in your project I always get to the middle of the layout and not the point i clicked.

    My problem is that my zooming in isn't instantaneous but over time. So when I zoom onto target location where my boundaries cut off, I get kinda shaky animation of zooming in.

    Thanks for the effort tho.

  • I've found a solution myself. I'm using the "Boundary" plugin by rex. Not 100% perfect but it works.

  • Let me explain my problem.

    This is how my lookout looks like:

    http://i.imgur.com/nIkYi91.png

    • On start of layout the camera is scrolled to the middle of the black rectangle (1080x1920px).
    • When double tapped you zoom in to an area (2x) and are able to move around. Double tap again to set zoom to 1x and scroll to the middle of the black rectangle again.

    I've figured out the 2 things above. But I don't know how to limit zooming in and scrolling around to the black area only. I don't want the player to see the white area at all.

    Anyone knows a good solution for this? <img src="{SMILIES_PATH}/icon_e_confused.gif" alt=":?" title="Confused">

  • Lets say I have a sprite 200x100px. I want it to be 100x50px in game. Should I scale it down and import at correct size, or should I import the larger file and scale it down with the engine?

    Any tips are appreciated!

  • Use the length len() expression in the system object to get the length of the text and if its less then 9 allow more characters to be added.

    compare 2 values

    len(textobject) < 9 add number

    Thanks, worked perfectly

  • I have a text object to which I can add numbers. I don't want the player to be able to add an infitine amount of numbers obviously. I want the text to stop at 9 characters. How?

  • I'm making a quiz type game, where every round one of thousands of random questions appears and you'll have to type in the answer (a number). Then the programm compares your number with the answer, and gives your percentage of accuracy.

    I was gonna use the array function, but setting all the values by making thousands of different actions is going to be chaotic and maybe cause some lag (?). Is there an easier way? I'd imagine typing the questions and answers in a text file and importing it into construct 2... or smthing like that but I have no Idea how to do it.

    P.S. this is gonna be for a mobile game.

    Sorry for my bad english

  • >

    > >

    > >

    > > Try setting the bullet to the angle the turret is facing and add in your random spread

    > >

    > > Set bullet angle to turret facing angle+random(-20,20)

    > > Turret facing angle >20

    > >

    >

    > I tried setting the bullet angleofmotion to static 50 degrees. It changed nothing, the bullet still fired to its target

    >

    > Edit: I found out that if a bullet has no speed itself, it will only move in the angle the turret is shooting. So what I did was change the angle of turret by -10 to 10 degrees at the moment its shooting. it looks funny, kinda like recoil. But I like it.

    >

    That s basically the same as adding random spread to the bullet just using the turret angle instead.

    Glad you got it figured out!

    Thank you for helping me

  • Try setting the bullet to the angle the turret is facing and add in your random spread

    Set bullet angle to turret facing angle+random(-20,20)

    Turret facing angle >20

    I tried setting the bullet angleofmotion to static 50 degrees. It changed nothing, the bullet still fired to its target

    Edit: I found out that if a bullet has no speed itself, it will only move in the angle the turret is shooting. So what I did was change the angle of turret by -10 to 10 degrees at the moment its shooting. it looks funny, kinda like recoil. But I like it.

  • When you say it doesn't work what is it doing when you run that event?

    If you are using 360 degree rotations you will need to determine if bullet is at 0 degrees or subtracting 20 from 0 will not give you the right degree.

    Add bullet angle >20 and it should work.

    Whatever I do, the bullet still shoots at the exact position of the origin point, every single time...

    http://imgur.com/a/WVUB6

  • You can add a random spread to the bullet or add sine to the enemy which makes it tougher to hit the target.

    I use sine for a lot of enemies as it creates a more natural AI.

    How do I add a random spread to the bullet?

    I tried:

    On Bullet created -> Set Bullet angle of motion to Bullet.Bullet.AngleOfMotion + round(random(-20,20))

    but it doesn't work