Laurent's Forum Posts

  • Thank you for your replies (and sorry for late answer)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In my game, travelling distances are important. They are stored in an array names ArrayDistances like this :

    At some points of the game, I have to retrieve the values in the table but instead of using numbers for coordinates (I know how to do that), I need to use places names (chateau, village, etc).

    So my code won't be :

    Value = ArrayDistances.At(2,3)

    but

    Value = ArrayDistances.At(cell X coordinate where value ="tour", cell Y coordinate where value="village")

    Any idea on how to do that ?

    Tagged:

  • Thanks !

    Interesting, indeed

  • Sure, I'm aware of that but I know there is a more direct way.

    I managed to achieve this using Sprite IID.

    The syntax of the "set text" is :

    "Hitpoints : "&sprite(2).Value

    where 2 is the sprite IID and Value is the instance variable.

    So if Value=40, the code above displays for sprite IID=2 "Hitpoints : 40" in textbox.

    Instead of using IID, I would like to use another instance variable, for example Type="zombie"

    So the code would be something like :

    "Hitpoint : "&sprite(Type="zombie").value

    I tried many syntaxes but came up with nothing.

  • Hello,

    How do I add to a text box the value of an instance variable ?

    Example :

    - Sprite has 2 instances variables : ID and Value

    - There 3 instance of Sprite on screen : ID = "Gold", ID="Health", ID="Time"

    - There is a textbox on screen

    - How do I set textbox's text to Value of Sprite instance ID="Health" ?

    something like :

    set text : "Player's hitpoints : "& sprite(ID="Health").Value

    I suspect some complex expression formula is involved here...

  • Hello

    Thanks for your answer.

    could you be more specific ?

    I think I get your point but it is still a bit blurry.

  • Hello

    My game is a top down game with a huge map scolling under the player's sprite that has a scrollto behaviour attached to it.

    So far, the sprite is at the middle of the screen but I would like it to remain at the center of a window that is a bit offset from the screen center.

    Is there a way to offset the scrollto behaviour in order to achieve that or do I have to make a routine from scratch ?

    Here's a image of what i want to do :

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • So much CSS subtilities !

    Thank you for this :)

  • In my game, everytime the player does a significant action, this action is added as a new line in a HTML Element window. But when content reaches the bottom end of the HTML box, the box content doesn't scroll up as I would like to to show the new added line.

    Is there a way to do that ?

    Tagged:

  • Thank you !

  • Thank you very much !

    I already spotted that there seems to have a very special logic about sub events but understand now that it is more subtile than I thought. Is there a simple logic about that or a tutorial somewhere that tells everything about it ?

  • Well the input events are run top to bottom.

    You have it so if you tap on either red circle it closes the menu, then third event runs because it’s not tapping on anything.

    I thought maybe rearranging the events would be an option but that causes the menu to be instantly destroyed so you don’t see it.

    But here’s this for a solution. Have one on tap event and have it do just one thing depending on what was tapped on.

    on tap
    -- touch is over sprite1?
    -- -- close menu
    -- else
    -- touch is over sprite2?
    -- -- close menu
    -- else
    -- — close menu
    -- — create menu

    Hi R0J0hound

    Thanks for the answer !

    I tried you suggestion but it doesn't seem to work either.

    Here's link to this version : dropbox.com/s/7lr8j1pxzz2dsbr/Bubble%20menu.c3p