Lucatiel641's Forum Posts

  • 9 posts
  • > I did the way you said and works like a charm now!

    > But why? Isn't the common way supposed to work too?

    >

    It's not supposed to. I'm not sure but I think it depends on your code and how your variables are set up. The text object is made only to display text, so you can use str() to convert anything into text.

    Oh, okay then. I'm not really used to game programming at the moment, didn't know about this cast in Construct 2. Thank you for your time!

    EDIT: Thanks for your time too, MACPK.

  • They're instance variables from the game object itself (I have two towers with 2 different health bars).

    They are triggered in various events, for example, when a fireball collides with them, a minion shoots at them. It's basically a Clash Royale for study purposes.

    But the numbers are changed only with random events, sometimes the fireball does, and sometimes doesn't.

    I'm also double checking the triggers to see if there is a problem, but the variable in the debugger is OK.

    Here is a simple example in my game capx.

    http://imgur.com/jSKKiXq

    reads: thunder > on collision with tower01Player02 > is not invulnerable > subtract 25 from HP > set text to variable

    The 'invulnerable' variable is only set to true when the player uses a shield, so it's always false.

    Also, here it is the capx with the example (that works and updates fine) from a trigger I got in my game.

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

    Weird thing is, I have a catapult-like character that shoots projectiles at the tower, and strangely, this works very well. But the fireball neither the thunder works.

    [quote:3o4gdtrk]Post by andreyin » Sun Nov 27, 2016 3:00 am

    Instead of using "set text to baseDeus01.vida" try using "set text to str(baseDeus01.vida)"

    If the vida variable is a number it should work if you convert it to a string to use in the text object.

    I did the way you said and works like a charm now!

    But why? Isn't the common way supposed to work too?

  • Hey,

    The problem is simple, I'm trying to set a text to a variable that is equal to the health points of a game object. But, the text is not being updated properly, it seems it's just not updating at all, or having a big delay between changes (even if I use it at Every tick).

    Also, I see in the debug that this variable is being changed normally. The problem is only in updating the text. Anyone know why this is happening? Never had this problem before with variable in texts. Thanks in advance! =)

    http://imgur.com/L8u63Aw

    Image for better explanation:

    • HealthT1D1 and others: text I want to set
    • torre01Deus01.vida and others: variable of health points

    P.S: The first ones (manaDeus01 and manaDeus02) is working normally.

  • Yes, indeed. I will keep trying to get it to work with this in mind a couple of times this night. Otherwise, I'll just disable the multiplayer group.

    I read the tutorials, but I sure missed something. I'll re-read now more carefully.

    Thank you! =D

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes, it is still bouncing. I am testing locally atm. I already knew the object is moving only by the peer side, and the changes are being overwritten by the host, but still don't know how to sync both. Also, I'm using MoveTo plugin, and the objects are not associated with any players, I don't know if this helps.

    About abandon it, I said this because I need to send to my teacher on Monday as my college task. I'm trying to export for mobile too (part of the task), so there's really no problem if the computer multiplayer works or not, it's a bonus. I was just curious about multiplayer in Construct 2, then I decided to learn it. =P

    Thanks for your time, though!

  • Hey! Thanks for the answer!

    Now I don't know if the problem is in my capx or in the server. The game object seems to just bounce back and forth like it is with high latency or lost connection. So, should I abandon this multiplayer project?

  • Hi, guys

    I'm a newbie Construct user (less than 8 months experience) and it's my first time with the Multiplayer in Construct 2, so be patient, please.

    I have read the whole tutorial for Multiplayer concepts, and I understood that the peer needs to send informations to the host in order for the game to work (like in Pong or Game example that comes with Construct).

    I just didn't understand how this can be done. In my capx (link attached at the end of this post), the game object in the peer side tries to move, but moves back instantly because no information was sent to the host.

    To be more specific, the game is turn-based. The attacker will choose an item from the menu, this item will move right to the front of the soldier, and then the turn will change to the defense player. But this is not happening, because the game objects are not moving and variables are not changing. The items from the peer side are not even showing on the menu. Modifications are being overridden by the game objects positions in the host screen, so the peer can't play at all, and can't see the changes mades from the host too.

    Can someone give me a little help with this? Thanks in advance, and sorry for any gramatical errors, english is not my native language. =)

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

    P.S: Already saved an test alias for debug, so you can go right to the game layout, the game will automatically connect to Scirra server.

  • Problem Description

    It seems like Physics Behavior is crashing in the middle of gameplay (after killing the first enemy and waiting a couple of seconds/minutes).

    This is a game level I REALLY NEED to show tomorrow tonight in level design class. So please, help me fix this bug, I can't have this bug to appear in the middle of the presentation.

    Attach a Capx

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

    screenshot of the error: http://imgur.com/dL4EYjt

    Description of Capx

    This is only a prototype of level design. It have some enemies, controllable character, sounds, damage, deathscreen, checkpoints, keys, various sprites and some animations.

    Steps to Reproduce Bug

    • Step 1: Open the game
    • Step 2: Kill the first enemy and wait a couple of seconds/minutes
    • Step 3: Suddenly and randomly the game crashes (returning Physics Behavior things I don't understand yet).

    Observed Result

    The game freezes, and I have to press F5 to restart layout.

    Expected Result

    The game to run normally from the start till the end of the level.

    Affected Browsers

    • Chrome: YES
    • FireFox: DIDN'T TESTED
    • Internet Explorer: DIDN'T TESTED

    Operating System and Service Pack

    Windows 10 Education

    Construct 2 Version ID

    Release 227

  • Hi, I'm new in Construct2, I need to make a game that uses Physics, and I'm trying to make a game that shoots a cannon ball in the direction and force that players want. Ex.: The longer I hold the mouse button, the faster/stronger the cannon ball will be.

    I'm trying to do like this, but the variable Força (force) doesn't change, it keeps always zero, and the cannon ball force is constant. Any tips, please?

    imgur.com/YwP29Jm

    Thanks in advance!

  • 9 posts