Turaco's Recent Forum Activity

  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Any way to change that?

  • I have a movement set up for my character that makes it use custom movement + path finding. Custom movement when mouse button is down, and path finding when once clicked.

    I made it work perfectly as I wanted, but there is one problem with path finding: my character lags when he stops walking and i click him to move again. The character then moves in a very slow speed towards position for like 0.5 seconds and then starts moving normal speed again. This doesn't happen every time, but very often.

    Now, how do I fix this lag? I tested different cell sizes, tried turning off custom movement. But nothing helped.

  • My goal:

    Have all sorts of character attributes (strenght, intelligence etc.) stored which can be increased by leveling up your character.

    General conditions:

    I want to have it set up the best way possible, without bugs / lags and without hundred hours of work if something is missing out.

    My question:

    I thought about using Arrays (maybe CSV plugin?), general variables, instance variables, dictionaries etc.

    I tried different things, but still can't find out how to do it the best way.

    Sorry for my bad english.

  • I know this thread is already old, but I can't find out how to add value to my csv entries.

    I tried this: CSV set value at ("Strenght", "Mage") to CSV.At("Strenght","Mage")+1

    My starting value is 10 and i want it to add +1 whenever i click a button. So it should be 11...12...13...14... and so on. But it ain't working. What's the problem?

  • Yep, it works:

    On C pressed

    • System compare two values: CharacterWindow.count < 1 --> create CharacterWindow
    • Else destroy Character Window

    Thanks for your help

  • Whoops yes I made another very common beginner mistake. Actually I recommend not using wait - it is the cause of a lot of headaches. Add ELSE to the second event.

    I forgot about that. If you use else, you might not need a variable at all.

    On C pressed, if CharacterWindow does not exist - Create CharacterWindow

    ELSE On C pressed - Destroy CharacterWindow

    Can't add "Else". Probably because I have the condition of pressing C which cannot have "else". Any ideas?

Turaco's avatar

Turaco

Member since 17 Jul, 2014

None one is following Turaco yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies