DiabloOvermind's Recent Forum Activity

  • Yeah I understand that part, and I understand cell border helps, but when dealing with medium sized sprites, the problem with pathfinding is that the outer part of the sprite still heavily overlaps with cells marked as "obstacle".

    furthermore , let's say you are trying to pathfind an object from the center of your screen to the upper let part of it, with a set path being only horizontal and vertical lines, the sprite will automatically hug the left part of your path instead of staying in the middle... Which, you guessed it, makes the sprite overlap even more.

    Is there not a way to make the sprite stay in the middle of the path while pathing ?

  • Hello fellow programmers,

    I am having a problem I cannot resolve at the moment.

    I am (still) doing a tower defense game, and while I managed to make my pathfinding behavior work more or less properly with small sprites, I have one of my towers that "shoots" a poison cloud that basically "pathfinds" from its spawn location on the path all the way to the beginning of the track.

    The pathfinding logic is fine. Everything that is not "the path" has the solid behavior, and the cloud has "solids" as obstacles in its logic. I used events to see which cells were obstacles and which ones weren't, and everything looks good.

    Here is the problem :

    When you go in the Construct 2 pathfinding example (the one with the green arrow), the sprite is quite small, and it certainly does not collide with obstacles. BUT try to make the sprite bigger, say 60*60, and you can see the arrow overlapping with obstacles all over the place.

    Hence Two questions :

    -What does defines the object's "hit box" when pathfinding ? (the actual hit box, small or big doesn't seem to matter, I tested it)

    -How do I make a medium sized sprite, about 60*60 not overlap with cells marked as obstacles ?

    Here is a visual representation of what im saying, in the Construct 2 example :

    Thank you very much !

  • Hi pose1233 ,

    We are willing to help you, but you will need to help us a little bit too, but posting images, or even better, posting your capx file on the forum.

    If you cannot do this, then you would have to explain precisely your problem, so we can understand what you are talking about. It may seem simple and understandable for you because it is your project, but for us it just looks like Chinese.

    Thank you.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi Calfuso ,

    Your post is not very clear. Are you saying your sprite do not "move left and right" when it collides with other sprites ?

  • Hi Jayyyyde ,

    If only the first bullet behaves how you want it, and then all other subsequent bullets do not, there must be an error in your event.

    I'm not sure how your game looks like, but like this without too much information I would use a pathfinding behavior, and use this event :

    bullet => On created => find path to "player.X player .Y"

    Then, for the 2 second timer, I would also ad a "bullet" behavior at your bullets that activates after 2 second while you deactivate the pathfinding behavior via the "set enabled/disabled" setting.

  • Hi ramyaswetha

    It seems you are looking for a "physics" type of game.

    I personally do not have experience in this type of games, so Ill point you towards this article :

    https://www.scirra.com/tutorials/64/phy ... the-basics

    This should help you getting started.

    If you have any other problem with something general, don't hesitate to browse Construct 2s' tutorials !

    Have fun !

  • tarek2

    Thank you very much. Now that you pointed it out to me, it looks incredibly obvious, and I look incredibly stupid. But that's part of the learning process, I guess !

    The issue has been corrected from Rocket_Projectile.UID into Rocket_Projectile.Parent_UID (which is a variable, and not the object's UID indeed) and things works as intended.

    Thank you again, my good sir.

    dop2000

    I had to read that a couple of times before to understand exactly what you meant

    Surprisingly, I also help myself with text objects sometimes, when the step by step debug screen testing process isn't helping. I usually ask those texts to display variables, or whatever information I think is relevant. At first, I thought there was an object called debug, and that this would find every little bug in my program, but once I read you again I understood that was not the case, a shame thought ! But then programming would be too easy

    However, how can this debug text object could help you find problems if you do not ask it to display specific information beforehand ? Or did you mean it helps you find additional bugs while you are searching for other bugs ?

    Anyway, that's a great advice, thank you very much !

    P.S : nice reverse twisted Tetris game you got there mate !

  • Good day gentlemen,

    Here is my problem. I am (still) doing a tower defense game, and currently I am programming bullet behaviors.

    I already made my first turret shoot bullets and make the bullet subtract the correct amount of life off the enemies, but now I made a second tower, a rocket tower, but whose logic is exactly the same : it shoots bullets (rockets), and when bullets hits enemies, I want them to deal the appropriate damage, and then be destroyed.

    I literally copy/pasted the events from the first working tower to my rocket tower, and this is what happens :

    -on collision with enemies, rockets do not deal any damage

    -on collision with enemies, rockets do not become invisible, nor they are being destroyed.

    (BTW : the reason for making bullets invisible is because they would deal damage to all enemies hit at the same time instead of just one enemy, and I have been told on this very forum asking the program to make the bullet invisible would correct that, and it does. Nothing unusual here.)

    I simply don't understand whats wrong with my logic, so here I am, asking help on the forum.

    Hopefully someone will be able to help me. Thank you !

    here is a print screen of the events in question. If you need the actual game file, let me know.

  • No idea how to word this question better.

    Basically, I am trying to make a drag and drop behavior object stick to another one, IF its frame is X or Y or Z. If its not, then return to its original position.

    I'm stuck with my condition, I don't want to make one condition for every single frame, there's like 60+ of them.

    So What should I put in the event ? Right now I have this :

    __(EVT)___Object is overlapping Slot

    __(SUB EVT)____ Animation frame = 3 or 11 or 19 or 27 or 35 (using or blocks) ====> Stick to Slot

    __(SUB EVT)____ Animation frame =/= 3|11|19|27|35 ====> return to position <= this doesn't work.

    How should I put it ?

    Thank you very much, I understand this must be a very easy answer, but I cannot figure it out, I thought using the "|" would do the trick, but it does not.

  • Hi !

    Here is a screenshot of my game in progress, which doesn't have a name yet.

    Everything will be happening on this very screen, maps, waves, upgrades, etc...

    There will be a campaign, a loot system, an upgrade system, a new game+ and a new game ++ with infinite mode system, an experience bar system for your "character" (which is not on the screen directly) which levels up and gain perks, spells, boss monsters......

    ETC.

    My 2 biggest problems are :

    1- I never used construct 2 before, so Ill have to learn a metric load of information before I can do anything

    2- I have exactly ZERO talent in drawing, which means I have to take my sprites and everything visual from internet, and this could mean copyright issues if I end up picking something protected without knowing it.

    But anyway ! I'm on it, it's tons of fun, and Hopefully I'll be capable of finishing it one day, and release it on Kongregate or Steam !

    http://imgur.com/a/RbLMp

    Any feedback so far, even if this "game" is literally nothing yet ?

    Thanks

  • I actually fixed my problem 1 : I simply swapped one single event from "pick bottom instance" to "pick top instance" (the only one in the whole event sheet, coupled with "if loot is overlapping with loot"

    However, now, item do not swap anymore between inventory slots (not a big deal), and also do not swap anymore same type loot from inventory into equipped slot, which makes the whole thing look noobish. Kind of a bigger deal, to me who is very strict with things.

    I somehow thought an array would be much more simple.

    However, I have NO idea how it works, even after reading basic tutorials on it.

    That's why I used a physical system.

    I'd be down for a lesson, if you care sparing some time. Or a link to a tutorial which exactly teaches that ?

    BTW : final updated version of the system : https://www.dropbox.com/s/2mq2vlmev7wn7 ... .capx?dl=0

  • Bump.

    Unfortunately I am running into two more problems :

    • One that I cant find the exact event to correct (although its not REALLY bad, unless problem 2 is not resolved),
    • One that could really be a bug, but again as a non experimented user, I just might be doing something wrong.

    Problem 1 : When swapping items, if the item dragged is equipped, both item still swap, even if they end up on the wrong equipment slot. I had the problem of the swap before between inventory and equipment slot, and resolved it for the opposite situation, when you try to swap an inventory item for an equipped item. This does not work anymore if the item would go in the wrong inventory slot.

    I might require a particular check for this situation, but I am having trouble to find the right one, since this unique situation has so much elements.

    Problem 2 : The attributes given to loot are dependent of the frame playing. This frame is set-up when the loot object is created. Rarity and type, which are attributed randomly determines which frame the sprite will be showing, thus showing item type (picture) and item rarity (background). Attributes are simply variables. When any loot is equipped, it copies its attributes onto the variable of the equipment slot sprite.

    In debug mode, I noticed that somehow, on loot created, after 1 frame, the correct attribute (atk, blk or def) was given, and after another 11 frames, the attribute corresponding to the next frame was also given. I do not understand why.

    Example : Common sword is created : its attributes are Atk 1 Blk 0 Def 0. its animation frame is frame 1. After 11 steps in debug mode, it will be also given the attributes of frame 2, which is 1 def, making the sword having both 1 atk and 1 def.

    In the event sheet, I tried to change the "compare frame" events, and changing them to not only "give X atk, blk or def" to "give X atk AND set blk to 0, set def to 0". The debug mode then shows my stats twitching every more or less 10 frames, quickly jumping from their correct value to 0, and back to their correct value a frame later.

    I hope it makes sense, if not, just test it yourself !

    If problem 1 was resolved, though, this change in stats would not be a problem, since the equipment slot only copies one single attribute of the loot.

    So if anyone can resolve problem 1, then no need to bother for tthis strange bug, although I really would like to know if its a bug or not.

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

DiabloOvermind's avatar

DiabloOvermind

Member since 11 Nov, 2016

None one is following DiabloOvermind yet!

Trophy Case

  • 8-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

10/44
How to earn trophies