nimos100's Recent Forum Activity

  • Since C2 runs 60 ticks every second. You have to divide the amount of degree you want to rotate every second with that. You don't need a loop you can just do it every tick.

    Action:

    Rotate <Something> clockwise = 90 / 60

    Will rotate it 90 degree every 1 second.

    Rotate <Something> clockwise = 180 / 60

    Will rotate it 180 degree every 1 second etc.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You should be able to do it with a pin behaviour, If you enable it every time the player drag the board and disable it again when they don't.

  • To explain picking, you can look at it like a sorting machine.

    Imagine you have 30 different coloured boxes.

    30 - Boxes

    10 - Red boxes

    10 - Blue boxes

    10 - Green boxes

    Pick all boxes - (Will pick 30 boxes)

    Pick Red boxes - (Will pick 10)

    and so on.

    Imagine that each of these boxes have a variable that hold a number from 1 to 3, which are random for all the boxes no matter what color they have.

    If you have an event like this.

    Pick all boxes who have a value of 1 (Lets assume that it pick 8 boxes)

    --- (Sub event) Boxes need to be red (This will pick all red boxes of those 8, so it might pick 2 boxes.)

    --- (Sub event) Pick all Boxes (Will pick all 30 boxes because it is a system command)

  • Im not sure I understand your question, what exactly do you want converted and into what?

    You have a string that you want to convert into Lvlidx and levelXlocations?

    Can you show an example of a string that you want to convert and what you would like it to look?

  • You can also just use "Pick nearest Enemy to Hero" and use it together with the distance check you already have.

    The reason it picks everyone, is because you haven't told it which "Evil" you want to check the distance to hero. So it just take all of them or a random one, not sure.

  • If I were you I would try to run your game in Debug mode, and check the timer variable. Compare it to the main event sheet where you say it works.

  • My best guess from what i can see in the screenshot is that its caused by Timer <= to 0, and would expect that your timer either gets stuck on 0 or lower, and therefore this keeps being true. And it will keep switching between your states. (60 times a sec) which probably explain why you say it goes crazy

  • I dont think adding a layout for each type of question is good, as it might lead to some confusion.

    Since you already know the rules of your game before hand, for instant. If its a "Yes", "No" question there will 2 options, if its a multiple choice question there might be 4 options, and if its words there might be 5 options.

    In that case I think I would go for a dynamic generated question sheet or what to call it. Meaning that you use the same elements for all the questions and answers and then just replace the texts with what is needed.

    And actually it might be easier to simply store each question with its answers as a small sprite object of something like 8x8 pixel.

    So each sprite would have the following attributes.

    Question = "The question it self": "What is 2 +2 ?"

    Answer 1 to 5 = "If there should be max 5 answers"

    Correct_answer = "Hold the number of the correct answer"

    What you can then do when you have created all your questions etc. is to simply tell C2 to pick a random Object of question, and then you read that question objects attributes into your question sheet, that the player sees on the screen.

    Each of the buttons on the question sheet should have a variable going from 1 to 5 matching the answer. So Answer 1 from a question goes into button 1, answer 2 to button 2 etc. You can just do that before hand.

    And then you check if what the player pressed matches the variable in the "Correct_answer" of the question.

    That way whenever you feel like making a new question you simply copy/paste a question object and changes the settings to match what you like, and the code will automatically include it into the game.

  • Wrote a small example here, that you might find useful.

    https://www.scirra.com/forum/viewtopic.php?t=97305&p=743528#p743528

  • While nimos100 might have posted good advice, I don't believe any of it will have any measurable effect on performance.

    Ohh...my post have nothing to do with performance, its was solely meant for organization of projects. Think I missed that part from the OP

  • [quote:2csun37y] I Know than folders and subfolders haven´t impact in performance, but what happen with sheets?... example now I am working in a game will have 30 scenes/levels. I am working with: Functions sheet, Variables sheet, Controls sheet, Bug sheet, quick reference function sheet and a lot of more...plus 30 SCENES sheet!!!! thats a lot of sheets... or I can use only one sheet for all scenes???

    I know Guizmus said that if you works fine you include only what you need where you need (CPU friendly) but I am a n00b already... so I don't know if I must works with decens of sheets lol

    Organizing sheets sounds really easy, but it can actual cause some problems, since its not uncommon that events/functions involved several things, so where should they go, or should you make a new sheet etc.

    The way I would do it, is to think about key elements or functionalities of your game. And turn these into event sheets.

    I wouldn't add a event sheet for every scene/level in a game, unless there are significant changes between them. Like level 1 is a platform game, and level 2 is a top-down shooter etc. Otherwise you might actually make several functions that do the same.

    Instead I would do something like this, it does of course depend on the game you are making.

    1. Game menu

    Will handle everything that have to do with the main menu of the game. Maybe not all the functionalities, but the initial settings. Like making sure that variable that should be reset are so, that rogue objects gets removed. Access to Load game so the player might only be able to press this button if there actually is a save game to load. Open game settings and exit the game.

    2. Game

    Will handle stuff that have to do with the general things that have to do when the player have started the game. This can be pause game, buttons that are on the game area. etc.

    3. Game functions

    Could add Hud updating here.

    4. Player controls

    Will take care of player controls.

    5. Player functions

    This can be functions such as reducing player health, player death.

    6. Enemy AI

    Will handle enemy movement.

    7. Enemy functions

    Same as player functions, except that its for enemies.

    8. Sound

    Handles sounds.

    9. Money / Score

    If you use a advanced system, that would require converting money etc. It can be useful.

    10. Map generator

    Will handle generating maps.

    11. Map functions

    If you need to manipulate the map, like destroying something etc.

    So instead of using 30 sheets for 30 levels, you will make use of several different sheets included into the game sheet. Since all 30 levels use some kind of the same things, like enemies, player etc. These are included, so your actual game area might have 8-9 sheets included.

    That's what Guizmus meant, since there are not reason to include the game menu into the actually game area, if the player shouldn't be able to start a new game from here or include it into the enemy sheet, as it have nothing to do with enemies.

    But yeah there will be a lot of sheets, but it doesn't really matter, if they are organized so you can quickly find what you need, it will be a lot better, that messy sheets, with no comments, no groups etc. Where you will loose overview at some point

  • There are several ways of dealing with this.

    First is that you can add a distance check, so only enemies that are within a certain range will attack.

    You can do that by adding a for each and use Distance(X1,Y1,X2,Y2) and check the distance between the enemy and the player.

    Another way could be to add a reload variable to your enemies, and whenever that is 0 it can shoot. But no matter what you need to add a For each, as of now you select all Enemies that meets these conditions. And since both enemies have line of sight to the player, and are selected with the "Is LOS = true" that will again trigger both.

    Btw you don't need that variable The EnemyShooter -> Has LineOfSight to player already does that. So you could simply add that one instead of the variable.

nimos100's avatar

nimos100

Member since 23 Sep, 2012

None one is following nimos100 yet!

Trophy Case

  • 12-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

16/44
How to earn trophies