MangoPolo's Forum Posts

  • There will be absolutely no difference between the total.points and green.points |

    They both receive the amount which is called bu pressing button. And they both are a number variable of the same object.

    In my project, I have 25 object which will need to be added to this string. Each object has a .name , .weight and .points variables.

    In one string, it is easy, only the total of all added is shown. In another, the total of weight. But each time their name is pressed, they are added into the first string, in the pressed order. A and each time, x2 is pressed, in the last 2 strings, the number is added to the total, and it is very simple. But In the first string, the value before x2 remains, and it is not nice at all. It is confusing. The way you last described, will it have the power to make any change to the value of each element in particular from the first string? The only way that works, is create a global variable for each element and create a different string in front of each name placed in the 1st string.... it is a week of working, and it doesn't seem efficient enough.

    Is there any command, expression or whatever it is called, that can do this? :

    On button press - Add green.points to Global2

    Add ( or Set ) green.points to Global1

    On x2 pressed - Add green.points to Global2 ( creates total of all points of all objects added to this string )

    Add ( or set ) green.points to Global1 only to the green.points variable? Replace it!

    What is the difference between points and totalpoints? Why is it so hard to change a number.variable inside a string? Because it contains text?

    Isn't there any command/expression that locates this number.variable inside the string and changes it to what I say?

  • No, guys, really, I need a small assistance here... please...

    It doesn't work the method you said.

    I changed in first string like this:

    Set name to name&Green.Variable1&points ( points is the global variable where total is created )

    On touched Button1

    String1 = Green; 30; String2 = 30;

    On touched x2 - Add green.points to Points

    String1 = Green-x2; 30; String2 = 60;

    So even if Global points is set as Second text in String 1 , no changes are made to its numbers on touched x2. What is this? I am starting to get crazy...

  • In my string, there is a newline after each object.name. I have the text showing on screen during the game, while words are placed. Also, I send this string to an e-mail. When it reaches, I figure out that between these words, there are only simple breaks ( spaces ) in the email. What do I add in the Set Value besides &newline in order to make line break work in usual exported texts?

  • this looks and works soooo nice!

    thank you!

    now I know even more about c2

  • works great. thank you!

    now I am trying to enter a subevent saying -

    if text is less than 6 set button invisible, but the button becomes invisible exactly after I eneter the first digit. How do I combine these two conditions?

  • I have a text box where digits are required to be entered. A button uses the condition "On text changed" to be created. How do I create a condition for the button to appear only if at least 6 digits are entered in this text box?

  • NO, I do not get to the point... anyhow! I've tried ten different combinations. The most logical was :

    Add Global.points to Global1 but it just ads the whole number from the second global into the first one, and it is totally not what I am looking for.

    Let me try to ask in a different way.

    So, we do it that way:

    On touched Button1 - Green.points are set to Global1 ( Green; 30; )

    Green points are added to Global2 ( 30 )

    On touched x2:

    Global1 changes to - (Green-x2; 30)

    Gloabl2 to - (60)

    On touched Button2:

    Blue.points are set to Global1 ( Green-x2; 30; Blue; 25; )

    Blue.points are added to Global2 ( 85 )

    On touched x2 under Blue we get:

    Global1 changes to- ( Green-x2; 30; Blue-x2; 25 )

    Global 2 changes to - ( 110 )

    So, what command do I have to insert for the first global to suffer changes in the numbers variables? And become

    ( Green-x2; 60; Blue-x2; 50 )

    I don't believe Javascript doesn't allow such a thing!

    If I create a command like:

    Set to Global1 Global1&Green.points&Global2 it will add after Green.points the total points from the Global2. I need to be added only the called amount....and not be placed after the texts already writen there, but replace the initial number.

    Can anybody write a short code here for the noob of me to understand where I get wrong? Please.

  • pressing x2 doesn't double all the numbers from the Number Global. it doubles only the value of the selected object. Maaan, I am so stuck now )) I hope I will figure it out , as it is the last step of my whole project.

  • I undersrtand the logics... but I can't quite reinterpretate them now... I don't know what actions to use to make Global points be added to a specific object value in another string. I will play now with the events, and try to figure it out...

  • If you could see, I already a second string where math is being performed, with a total of points from pressed objects. But in the first string it is a set of Sprite.names but each followed by it's particular score. And when x2 is pressed under one object, not only it's score is added to the second string, doing the total, but also replaces the value in the first string, of that object. It is not possible?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ok, I've played with the period and it worked. Thank you for the answers!

  • Sine works fine. And how do I increase moving speed? I tried the built in feature from the Action menu but it doesn't change a thing...

  • Anybody, please?...

  • I have a sprite which is an arrow, pointing to a specific position on the layout. I want this arrow move left and right, 10 pixel left and 10 px right, for a specific time. Until an action destroys it. What recommendation would you give? Custom movement or is there anything simpler?

  • I guess, the first thing for this will be a window inside the app, where you can add HTML code. It's the same as prompted when exporting an project - C2 offers to add a space for external HTML code. So basically,it should be absolutely possible even before exporting, to add such a "window"