dop2000's Forum Posts

  • maxlive2010 Animation is easy, but I don't know how to make a seamless gif from it, sorry.

  • Matte78

    It depends on how these objects are created and at what moment do you need to pin them.

    Do you put them on the layout in editor? Or are they created in runtime?

    If you have instance variables on both Nations and Cities families that cal help to link them together (say, Nations.Name="France" and Cities.NationName="France") then it's easy:

    Nations Compare instance variable Name=Cities.NationName -> Cities pin to Nations

    If the only way to identify each pair is their order of creation, you can do something like this:

    System-> For x=0 to Cities.count-1
       System -> Pick Nth instance of Cities instance=loopindex
          System -> Pick Nth instance of Nations instance=loopindex   :   Cities Pin to Nations
    [/code:e31akpof]
  • Is this TextBox object or Text object? If it's textbox, what happens with the sprite if user moves cursor pressing buttons Left, Right, End, Home? Or decides to select text holding Shift?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • And it never will. Also, how are you going to move the sprite if user presses keys like Left, Right, End, Home?

  • No I don't.. Maybe with CSS?

    https://www.scirra.com/tutorials/1283/c ... -textboxes

  • Text set opacity to (100-distance(text.x, text.y, character.x, character.y)/10)

    At 1000px distance the text will be fully transparent, at 0px fully opaque.

  • This will limit the number of characters to 20:

    TextBox on text changed

    System Compare two values len(TextBox.text)>20 : TextBox set text to Left(TextBox.text, 20)

  • Well, did you try the capx I posted above?

  • You can't do this - animationsList&"_points" - with variable names.

    You'll need a temporary variable s and a bunch of events like:

    If CategoryNumber=1 Set s to Category1_points

    If CategoryNumber=2 Set s to Category2_points

    Or you can store your lists of points in a dictionary, under keys "Category1_points", "Category2_points" and do this:

    s=PointsDictionary.Get("Category" & CategoryNumber & "_points")

    Add int(tokenat(s, Sprite1.animationFrame, ",")) to totalPoints

  • Did you set "Force own textures=Yes" on the layer? Some blend modes don't work without it.

    https://www.dropbox.com/s/c2tf92q8o5dmq ... .capx?dl=0

  • "Set effect parameter" takes values from 0 to 100 and for setting red, green and blue channels you need three actions, for example:

    Sprite-> Set effect "SetColor" parameter 0 to 50

    Sprite-> Set effect "SetColor" parameter 1 to 70

    Sprite-> Set effect "SetColor" parameter 2 to 100

  • bbjGames

    "For Each" loop is working and it does process each of the Brain instances.

    The problem is with the sub-events. I believe you need to reset the variables to their initial values (x=4, y=0, z=-1) in event #36.

    Alternatively, you can move variables declaration inside the "For each" loop, then they will be reset automatically.

    You might also want to reset them in between "Repeat 30 times" and "Repeat 16 times" loops.

    The "mutate" variable always equals 5, so all events with condition "mutate<=2" will never work.

    There may be other mistakes in those loops, I really don't understand what are you doing there.

  • I'm not sure what's going on in your code, but the For each loop is working and it does change each of the 5 Brain arrays.

    You can check it yourself - run the game in Debug mode, select one of the arrays and see the values changing every 5 seconds.

    You can also add Browser->Log to this loop to output debug messages.

    For example: Browser Log Brain.UID, you'll see that all 5 Brain UIDs are processed.

  • GabrielIq

    You need to save the skin in a global variable (or a dictionary). On start of another layout, set animation frame to skin variable.

  • Yes.

    And also, I suggest you replace "Pause timer" with "Remove timer" in event #8 too.

    Then you will be able to check if the timer is running by comparing Timer1.ElapsedTime("UpgradeTimer")

    If ElapsedTime=0, the timer is not running, if it's >0, then it's running.

    You could remove the OnUpgrade variable and all those events where you save/load it to local storage.