brendanpoke's Forum Posts

  • to show the range to the player you can create a "circle" object and increase its size for towers with longer range.

    To define when the towers can start shooting you can use distance.

  • I was looking for a solution and discovered this thread.

    I have the same problem and I can't go and add the layer to those 500 layouts every time.

    Has a feature been added for this issue?

    construct.net/en/forum/construct-3/how-do-i-8/replicate-new-global-layer-149322

  • If you need this to save/restore sprites on the layout, you can use Family.AsJSON expression. It will save all object properties, including the values of all instance variables. However, there will be unique codes instead of variable names.

    Or you can retrieve all instance variables with this script:

    > const o = runtime.objects.Family.getFirstInstance();
    
    for (var key in o.instVars) {
    console.log(key + ": " + o.instVars[key]);
    }
    
    

    I tried the second method (the script), because I didn't understand how to use the first one.

    That's not what I meant anyway.

    I would like the console.log to also write the object variables not related to the family.

    I put up some screenshots.

    I also modified some variables in the layout view of the objects (related to the family) but in the console the 4 variables are always 0 and "" and false. (probably because it's not correct how I made the events and how I included your script. I don't know how to do.)

    Sorry for the strange names, but I'm Italian and I program half Italian and half English.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm trying to write all the information of the sprites contained in my layouts with JSON.

    Including size, angle and even instance variables.

    But I do this by using a family that contains all the objects.

    Previously I had inserted objects in the layouts that have specific variables, for example:

    (items to collect):

    grenades (variable "ammo" and variable "damage".

    (enemies) :

    ufo ( variable "lifepoints" and variable "attackpoints" .

    These variables are specific to each type object.

    Is there a way to access it using scripting?

    I want JSON to also write all the variables and values ​​for each type object that is part of the family.

  • You know, that makes a lot of sense.

    Right?! Why would you still pay for C3 if you have to learn JS anyways? Very observant, with a simple and logical conclusion.

    I wonder if more people think that way?

    I think so too, but I have to say something else:

    When I started programming (4-5 years ago with Construct3) I did so because I had no idea where to start with javascript, (I didn't even know what it was), instead I knew something but little about html.

    But not knowing where to start, I looked for html guides (and the complexity scared me).

    In short, not knowing how to do it, I found Constrcuct3 by chance and I started with that, thinking: maybe if I start from something simpler I will be able to learn the code in the future.

    and that's exactly what happened. Construct3 helped me and made me learn a lot, and it's thanks to it that now I can understand javascript code, html etc... also because I trained my mind, memory and logic. even I don't use code. So it was a go-between and I'm glad I started that way.

  • It's entirely up to you which you use. If you're experienced with both, event sheets and JavaScript code still have their own strengths and weaknesses. For example in my Command & Construct game project, I mostly used JavaScript coding, but I still used event sheets for the menu systems, because it's quicker and easier than having to write code for a menu system.

    honestly I want to do the hardest thing and that allows me to do more. That's why I thought that javascript (at least I think) is the basis of Construct3, i.e. if so, maybe with javascript I could create a program identical to Construct3?

    Perhaps it would take too much work time considering that Construct3 was made by a team maybe years of work.

    But the point is that javascript is at the core, so learning that (even if it takes a long time) when I've learned it I'll be able to do everything I did with Constrcut3 anyway. And maybe much more and faster.

    You talked about strengths and weaknesses, what are the weaknesses of javascript?

    I'm following a video tutorial course for javascript (and also html and css), and it seems to me that in terms of organization, variability of elements, it's more efficient.

    with javascript can I do everything I do with Construct3? Like making a spaceship that moves etc...? My games are Anime style, I like to put artistic images and it's animated, but I'm not interested in big special effects like 3D.

    If you want I can put the link of a free video game that I made and published on the play store, to give you an idea of ​​how I want the style of my games to be, even if my game is still incomplete and scarce in terms of content (not to mention of so many bugs there are).

  • Lately I've been wondering, since I've learned to do more and more complex things in Construct3, and I want to make complete and long-to-finish games, like a real game such as pokèmon etc...,

    If it's convenient, if it's better to learn javascript code in a complete way and program my games only with the code (if it's possible).

    Since I have so much work to do, and I want to improve and become faster, I have to figure out how to save time and optimize my work. Could I do the same things I do with construct3 with just my code? Consider that for example "behaviors" or effects I've never used in Construct3, because they limit what I can do even if they are faster.

    I generally always prefer to do everything starting from 0 for several reasons.

    If learning javascript well was a good idea, even if I have to study more, I would.

    What do you recommend?

  • Thank you!

    I haven't tried it yet. but it seems to me the perfect solution to use "drawing canvas", also because the brown circles could be in "destination over" mode and show the underlying layer, ie the wall of the planet.

  • Hi everyone.

    In my game there is a planet with tunnels (many in proportion to the size of the planet).

    But they must all have the same thickness, scaling the image happens like in the screenshot at left, is there any way to avoid this?

    Tagged:

  • I didn't know about this feature yet. Thank you :)

  • I would do like this, example:

  • I would like to distort an image like in the screenshot below, i don't know how to explain it with words. Is it possible with construct3? How can i do it?

    Tagged:

  • Sorry if i asked too simple a question or i lack some basics of javascript or html. But could you give me at least a short answer?

    Maybe it's not possible to do this, or I didn't explain myself well.

  • Nice game, the idea of ​​slowing down time and hitting the ball while it's flying is original, I've completed all the levels. I recommend you to make new ones and improve the graphics though, something more artistic would be better. in my games I also insert some drawings made by me ;).

  • Hi everyone.

    I was looking for a way to insert a gallery of images which are the objects collected in the game by the player.

    using HTMLElement plugin I found the solution as in the image below:

    this way HTMLElement loads the image "diamond.jpg".

    "diamond" is one of the keys of the plugin dictionary, which contains all collected objects.

    so I have to insert dictionary.currentKey instead of "diamond" and I can't in any way because everything inside "" becomes a string.