Cavaron's Forum Posts

  • Yep, you could use hitboxes. You can make image points in your enemy sprite and attach the hitboxes to these points. Use a every x seconds (like 0.2 or something, you don't need to refresh this every tick/60 times a second - 5 or 10 times a second is enough) condition to update position and scale of the hitboxes. If you enemy has several animation, you would have to set the points for every image in the animation and update the condition with the framerate of said animation.

    Or you could do it like a boss and use a bone animator like spriter pro, which would allow you to build and animate your enemy in body parts. If you import this spriter animation with the construct plugin, you can click on each body part without additional hitboxes.

  • So I did miss something :) Works great now, thanks a lot dop2000!

  • gabmusic: I wouldn't use tilemaps for objects changing ingame and I wouldn't use collisions with tilemap objects. Tilemaps are more like static background. What I would do in your case is using sprites with two "animations" for objects that can be destroyed by the tank shells (like trees, walls...). If a shell hits a sprite, it changes it's "animation" (just one picture in this case, like from a whole tree to a broken tree).

    If a shell hits the regular ground (like gras), I would just spawn a crater-sprite. No need for collisions here. You can use like a 1 second timer to spawn a crater and destroy the bullet after it has been fired.

    A nice performance boost would be to limit collision checks to objects on screen or to objects in a certain range of the bullet.

  • Hi, thanks for your reply.

    I tried to recreate the problem in a less complex project. It's about updating the Z order. I succeeded in recreating it but I run into a second phenomenon.

    First effect remains: the Z order function will only work when called with something like a keyboard action.

    Second effect: the updated Z order will appear on screen only if you resize the window (using NW.js preview). Without pressing the key, the window resize won’t work, so the first effect is not affected by this.

    The indicator for an updated Z order is the lowest face, it will appear on top of all the others if working correctly.

    Project file:

    https://ufile.io/tondnq8m

  • Hi folks,

    I have problems calling a function from another function if said function has a "for each"-condition. I have no problem calling the function with something like "on p pressed". Anything I did miss here? Thanks!

    Tagged:

  • Of course, the "Regenerate Pathfinding Obstacle Map"-Event. Thanks a lot!

  • Hi, Im trying to spawn solid objects, but they apear to lose their solidness... The behavior and collisions are set to enabled and solid is on initial state enabled. I tried to enable bot with an event after spawning to be sure. Yet objects pass right through them and pathfinding doesn't go around. If I place them in the layout before starting everything works. Any ideas? Thanks!

  • Hi,

    I would love to know if there is a way to set just a certain color or colors in a sprite to transparent. Since the Replace Color effect can change e.g. something red in a sprite to yellow, I wonder if it could make certain parts of a sprite transparent. If yes, how? Or is there another way (besides doing a sprite animation) or effect to achieve this?

  • Hi there,

    I was wondering if it is possible to prevent (full or partly) transparent tiles in a tilemap to "erase" formerly placed tiles from the same tilemap on the same layer?

    Reason: I'm working on an isometric tilemap. The backround tiles are rhombus(diamond)-shaped and if I want to place them seamlessly, they erase parts of the formerly placed tiles next to them.

    Yes, I could place two identical tilemaps where one is shiftet 50% of its tile size to the side. Thst would work, but it would be a hassle to switch between them.

    Many thanks!

  • Does it make any difference if I implement one large or several smaller tile sheets? I'm building levels right now and I wondered if I should sort my tiles in sheets based on levels (each level is a different layout) - like a tile sheet for the desert level, one for the forrest level and so on. Or can I import one large tile sheet into construct 2 and it will generate optimized tile sheets on export anyway?

    Ah, the app in this case is your game Run the export, not the preview from within construct 2. Make sure not to rename the nw.exe or nw.sh (linux), that the dlls are in your games package.nw, the app-id txt in the games main folder and that steam is also running. But this is the very last step to test the greenworks events in your game.

    I think you are at the point, where you can start to implement greenworks events in your game. If the greenworks plugin is installed corectly, you should be able to add the object "greenworks" to your game objects - like you would add the gamepad or browser object, to be able to use gamepad or browser events (like if ESC pressed -> close browser tab).

    After adding the greenworks object, you can just build regular events which will trigger achievements. The plugin is smart in some way, it will know when an achievement is already activated and do nothing in that case. You should check if greenworks is available as one condition and do the trigger once while true also, so it wont fire every tick when true (which is a good advice for any event that is not required to run every tick). Like that example from my game "Asteroid Deflector XL" on Steam (erm, advertising, *coughing*):

    Make sure to use the API-name of the achievement from the Steam app-admin menu to trigger it in the event.

    Hope that helps, I struggled with that too for several days. Not to mention the nw.js linux/mac export process with copying files into a fresh nw.js build to get it working... does anyone know if the greenworks support and the linux/mac exports are better supported in construct 3?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Nice work - I've red some comments about slow performance in the late game. Do you think about converting it to construct 3 to gain some performance?

  • I completed my first game - Asteroid Deflector XL - and now it's on Steam:

    http://store.steampowered.com/app/81883 ... lector_XL/

    It's about prevent asteroids from hitting a planet by changing their course with various projectiles against the gravity of a planet and a star. Manage your economics like money, weapon research and planet population.

  • Regarding mac and linux exports, I made a habit to take a fresh node webkit from nwjs.io/downloads/ (should be the same version used with construct), deleting just its resource folder and replacing it with the one from the construct export on the system the export is for. Copying mac files around in windows voids the executable rights and who knows what else. I never experienced any problems after doing it that way.

    RetroGamer3: Hi, what are you trying to start? Greenworks plugin has to be installed in Construct2 like other plugins.