Guizmus's Recent Forum Activity

  • Hey !

    Yes, you can save the variable, and set what you don't want to save. You should take a look to this tutorial where Ashley explains how this works, step by step.

    How to make savegames

  • Demonchest I only created 1 text object, and used it 5 times in the layout, that's all. They are all the same text objects for the answers.

    I created also a text object for the question, and a last one for the output, those are different.

    The events are commented, but don't forget to look at the Answer object proprieties : it has a variable used in the events.

    As for going from 1 text object to 5... it all depends on how you implemented it in the first place. I didn't know you only used one, sorry for this.

    I want to help you to implement this, but it would be easier if I had a screenshot of the events or a capx.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you feed your array with datas just like the txt files, you should have the question in index 0, answers 1 to 5 in index 1 to 5, and the answer in index 6.

    I don't exactly know how you use those datas to display on screen, but it should be a text object per answer if I'm right. If this is the case, the solution is simple :

    • add a "answer Index" variable to each text
    • when you want to display a new question, empty all the text elements and set their answerIndex to 0
    • then, for i = 1 to 5, select a random instance of a text element that is currently empty, and set it to "ans"&i. Put the "i" loopIndex in the "answer Index".

    This way, you will have the answers randomly appearing on screen, but will still keep track of what answer is the right one.

    I'll send a capx soon to illustrate.

  • So if I understand right, the bike stops reacting to inputs, and the enemy don't slow down. Could you share the capx ?

    There may be something with the enemy movement. How do you move them ? Using the platform behavior and simulate input ?

  • Easiest way : use an array. Put all your names in this array, and then take a random element from it.

    Take a look here :events capture

    In the first event, I just put names into the array.

    In the second one, I select a random number, between 0 and (numberOfNames-1). This will be the index of the random name I want to use. I then set some text, but this was to show you how to access the array, and how to have the firstName or the lastName.

    Hope this helps !

  • I don't know about this plugin you are looking for, sorry.

    If I was to do a custom list, it would go like this :

    • have a variable (an array ?) with the list options,
    • have a variable linked to the list, "SelectedOption"
    • use a 9patch for the design of the list (when not clicked) and a text for displaying the SelectedOption
    • have a sprite on the right of the list (the arrow to show all options) that calls a function to show the list
    • showing the list would be building multiple "option" objects, each one being a text, and then have a tiled background for the background of the list. Each option would have a "mouseover" to add some sort of focus (bold, new background, ... your choice)
    • clicking an element in the list would update the value of the selectedOption on the list, change the main text, and destroy all options
  • Platform and Physics are two "moving" behavior, meaning they can handle movement for your sprites.

    When you activate platform, if you let the controls to Default (you can change this in the behavior parameters), it will capture the keyboard, and use the arrows to control the Platform sprite (here, your enemy).

    Doing this, you loose control of the bicycle.

    The solution is simple : change the parameters of the behavior to "Custom controls", and all should be good.

  • You can't post link, but you can post the URL (in text format).

    Without more information, it could be anything.

  • It doesn't work because you use the events "On key pressed", witch is triggered only when the key starts being pressed.

    What you want is "on key down" witch will be triggered as long as the key is down. You would want to keep the "On key pressed" to handle the mirroring and change in animation though.

  • The Fade behavior can't be modified during runtime. So if you configured it to fade out after 1 second, during 2 seconds, with no destruction (example), you can't use that same behavior to fade in.

    What you can do is add another fade behavior, set to fade in, and inactive on start (btw, you can rename behaviors so it's easier to know witch does what). When the player dies, you then use an action like "Character : restart FadeIn"

    EDIT : you found the exact solution I was describing ><

  • If I understand right, in the image :

    Angle(World,Player) = 45

    Angle(World,Enemy) = 270

    (By the way, usually, angles are handled counter-clockwise)

    What you want is Angle(Enemy,Player). Let's decompose angles then :

    Angle(Enemy,Player)

    = Angle(Enemy,World) + Angle(World,Player)

    = - Angle(World,Enemy) + Angle(World,Player)

    In the schema's case :

    Angle(Enemy,Player) = - 270 + 45 = -225? = 135?, seems about right.

    Then, hit location is just a switch case.

    If the angle(Enemy,Player) is between -45 and +45, it's the front side.

    If the angle(Enemy,Player) is between 45 and 135, it's the right side.

    If the angle(Enemy,Player) is between -45 and -135, it's the left side.

    If the angle(Enemy,Player) is between 135 and 225, it's the back side.

Guizmus's avatar

Guizmus

Member since 26 Mar, 2013

None one is following Guizmus yet!

Trophy Case

  • 11-Year Club
  • x4
    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

15/44
How to earn trophies