semarc3's Forum Posts

  • 12 posts
  • UPDATE:

    I've solved it by setting the canvas property "resolution mode" to "Fixed". This way it won't be reset by resizing the screen and the content will be preserved.

    Reading the manual accurately has helped a lot ;-)

  • Hello Constructors !

    I'm making an RTS game and I'm working on the FOW (fog of war ).

    Using a Canvas and pasting a sprite on it with "Destination Out" works fine and looks good.

    However, when I resize the window, the canvas is reset and all the discovered areas of the map are black again.

    By searching on the net I've found out that by resizing the window, the event "on resize" will fired, causing a complete reset of the canvas.

    The question: is there any way to prevent this behavior, or at least to save the content of the canvas by the "on resize" event and then load that content again ?

    I'm aware that there are other methods for a fog of war ( for instance, a tiled background ), however, since I find using the canvas pretty straitforward, I would like to follow that path.

    Any help and suggestion would be greatly appreciated.

    Regards,

    Sergio

  • Progress:

    using two different objects - both with the Turret behavior - works as expected. The turrets does not affect each other.

    So far, so good.

    Still, in my opinion the Turret behavior should be indipendent also by instances of the same object. Or at least, give the opportunity to set the behavior in that way.

    I find the Turret behavior really useful. If only were indipendent by different instances of the same object, would be indeed great.

    Thanks for your attention.

    Sergio

  • Hello Constructors !

    I have a question about the turret behavior. I'm using C3 with the R485 beta.

    The scenario: an object - a tank - is a container. It contains a tank body, and a tank turret. The tank turret has a turret behavior.

    Now, I create two instances of this tank object. One for the player, and one for the computer.

    But while the tanks are different instances, it seems to me that all turrets share the same comportament when I for example isolate a single tank instance and clear its turret targets.

    It seems that the "clear targets" command does not only clear the targets for that turret instance, instead it clears the targets for all the turrets with no regarding to the tank currently picked by UID.

    I wonder if my explanation is correct.

    In other terms, if I want to have two tanks, each with an indipendent turret (behavior), I have to create two different turret objects as well - for instance, playerTurret and computerTurret.

    In this case, if I clear the targets for the playerTurret, it should not affect

    the targets for the computerTurret. Am I right ?

    Thanks for your attention and have a nice day,

    Sergio

  • This has worked like a charm, many thanks Ashley, appreciated !

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Dear all,

    when I start C3 from the desktop, it shows the version "R476.3 stable".

    Sadly, this version does not allow me to load my project, and shows an error message stating that it was saved with a new version ( the 483 beta ).

    In the error message there is a clickable link to the version R483.

    By clicking on that link, a new instance of C3 starts, with the version R483 beta. With this version, I can open my projects.

    The problem is, I have to repeat this process every time I run C3.

    The question: how can I have on the desktop the newest version of C3, so that I don't have to repeat that process again ?

    I've posted a video showing the issue on the official discord channel:

    https://discord.com/channels/116497549237551109/116497549237551109/1499299561015873596

    Any help would be greatly appreciated.

    Best regards,

    Sergio

  • Anyone about custom behavior ?

  • Thank you, it worked !

  • Hello Constructors !

    I read that in C3 there should be a hierarchy property/behavior somewhere, which should allow parent/child connection between objects, but I can't find it. Could someone point me in the right direction ? Do I need some add-on ? ( I'm using a licensed C3 plan )

    Another question. I'm making a rts game ala C&C and I need to give a tank different behaviors depending on the situation.

    I'm aware that there are some "out-of-the-box" behaviors that I may use, like pathfinding (which I'm using), turret, and so on.

    I'm also aware that I could activate/deactivate entire group(s) of conditions/events, thus simulating a complex behavior, but I wonder if there is a way to create a custom behavior using the normal conditions/events like in a event sheet, so that I can apply this behavior to other objects too.

    There is indeed a behavior named "custom" under the "Movement" behavior category, but this is not what I mean.

    Thanks for your attention and have a nice day,

    Sergio

  • Yes, booleans are cumbersome to work with in Construct. I suggest using number variables instead - 0 for false, 1 for true.

    Thank you dop2000 :-)

  • Here an image of the function:

  • Dear all,

    I have a function named "createTank" in Construct 3 wich accepts integers and booleans as parameters: posX:int, posY:int, isPlayer:bool, justCreated:bool.

    With this function I create an object at posX and posY using the given parameters: createTank.posX and createTank.posY.

    Now, to the just created sprite I would like to set its boolean variable "justCreated" by passing the value from the function, but when I select in the sprite action menu the action "set boolean", I can only choose true or false from the top down menu. I don't find a way to set the sprite boolean instance variable with createTank.justCreated on that panel.

    I have circumnavigated the "problem" by using "System" and check if the boolean value of the function parameter is true, and set the sprite boolean inst. variable accordingly.

    The question: am I doing something wrong here ? Is there another direct way to use that function parameter to set a boolean sprite variable ?

    I've read also from a c3 blogger that he suggests to avoid the use of booleans in C3, and use integer insteads. But I find the use of booleans also helpful, that's why I would like to use it.

    Thanks for your attention and have a nice day,

    Sergio

    P.S.

    Apologize for my terrible english.

  • 12 posts