Ramladu's Recent Forum Activity

  • I didn't see any responses yet so I'll take a stab at it.

    I made a quick video to demonstrate using pin-to and a hitbox concept.

    I used overlap and did not make the hitbox invisible for the demonstration.

    There's a few other choices you can make to meet your needs. There are a couple of ways you can set the pin. I chose to do it based on an object and it's image point. You can modify that within your sprite to create a second image point such as your sprite's feet and refer to that. It will be messy because you have to set up that second image point for each frame and where the feet are in each frame compared to previous. This is common with weapon animation. But I don't want to get off topic.

    I am using a hitbox myself to engage and disengage an enemy.

    I show you my simple code and while I have not restricted any type of sprite I am searching for an enemy overlap with the player. You may be able to do that with the ball sprite and the feet and a different event for other similar needs. For example, I would do this for other objects such as NPCs, or clickable objects where a block behavior may be too restrictive for me. Anyhow, I don't want to get off topic.

    youtu.be/XGJi1oAOA7I

  • I also copy and paste but would like to figure out a smoother way. I haven't devoted the time yet so the copy and paste works for me at the moment.

    I have imported text files, ran some AJAX and put the data into arrays. I don't know if it is most efficient but it works.

    Here is a sample. It is tedious but may start you on the road to actual .csv / xlsx type files.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yep! Here is the culprit. I made a unit selected info GUI and it has all the possible buffs/debuffs in the game counting down as well as listening for mouse event on the map to open and an escape key to close. Under normal conditions, a unit would not possibly have all of these debuffs at once but I was learning how to do this so I had been keeping some test/learning kind of stuff around.

    Sidenote: I know it may not be kosher to change the thread up but all of those icons you see on the pic below are a sprite that just has different frames. Would it be better practice to make a tilemap with as much of them as possible and put a tilemap in instead of all the instances of the same sprite?

  • Yeah, I am just trying to figure out why my numbers are so different from that Demonoire game sample. That game is larger and has far less checks.

    There's something I am just not seeing. There will be a lightbulb moment coming.

    I isolated it to one of my global GUI layers. So it's not something occurring directly on the map itself.

  • Also, I think you're right. I removed (toggled them off) many of the loot mechanic ones and my collision detection jumped from 600 to 16,000. So the engine must be searching for them. In otherwords, I have set up some pretty disorganized triggers / events. It must be struggling to find them now that I toggled the functions off.

    Interesting...

  • Darn. That was going to be my guess but they are essential to me. I was hoping it wasn't that. I have loot mechanics and select a skill based on mouse clicked on object.

  • I am working on my tile game and I did a ctrl-f to look for collision events in my game across all of my event sheets. I do not have any. So I am curious what other events cause collision checks?

    I have bullets, particles, and moveTos but they are all based on a trigger, not automatic and not repeating every X number of seconds. I also have NPCs moving based on tile movement but I don't have any sprites for them to possibly collide with. No block behaviors.

    Thanks

  • Thanks. I was thinking something around that direction or dividing the layout width by the tile size and evaluating where the X/Y mouse click is and running some evaluations that way.

    Also, I just took another look at that Demonoire example again and saw that they have tiles but also a sprite that is a destructible object. Maybe it's just better to do that method but instead of my game having X number of unique sprites, I just have a box that is not visible and it's used to store the data for each instance of the destructible I am targeting. I just worry about CPU use because one of my computers is real slow and one is pretty fast. Ah maybe I need to stop thinking of efficiency and just get on a move on it. But I feel like I am just giving up. :-?

  • Let's say I have a tilemap as my map at runtime with 3 columns and 3 rows. Trees, grass, whatever...doesn't matter.

    I want to click on 1 particular tile at runtime and identify which index value it is. Not which tile in the tilemap tiles it is but whether I clicked on tile 1 through 9 that is laid out at run time. Not the value of this:

    Also, this is not what I am after either (I mean it gets me really close but not close enough to what I want):

    Tilemap2.PositionToTileX(Mouse.X),Tilemap2.PositionToTileX(Mouse.Y) as this returns the column and row such as 1,2 meaning the second column, and third row based on the 0-index.

    What I want is to return 8. Because then I can have an array for the tiles and just feed data to match the tile. I guess another way to look at it is there a way to take that 1,2 example above and translate it to a single value returned? Right now I am having to use it as the image below but it seems wrong to run it this way. I would then have two arrays, one for the X and one for the Y and then have to evaluate them together. It seems inefficient but I'm still learning so I don't know. I feel like I am just missing some method to the object that converts that column and row nicely into a unique number.

  • Hi,

    How do I add hitpoints (or any variable for that matter) to a specific tile in my game?

    Currently, I have tiles of mushrooms, trees, ore, etc..., and I have a mechanic where the player destroys it in one hit if the distance and tool in hand requirements are met. However, I want to deepen then experience by adding hitpoints to the specific tile being "attacked".

    I know how to do this easily with sprite instances but having a bunch of sprites kind of defeats the purpose of the tilemap and it also slows my game down a lot. (tested it previously)

    Any ideas on how to do this or is there another way? I need a hitpoint variable associated with each tile so that the attack can be done and "chip" or "chop" away at the tile, reducing its hitpoints until zero. Right now it's one hit, one achievement and then I automatically switch the specific tile to grass or whatever the natural environment is.

    For example, if the tile being attacked is 34 and 34 has been coded to be a "tree", then the maximum hitpoints are 10 but I also need to know which tile it is specifically not just in the tilemap object itself but in the instance . If the tile being attacked is 73 and has been coded to be a "copper ore", then the maximum hitpoints are 6, etc...

    One thing I thought of and it is not ideal is to just identify which tile index id the tile being attacked is and then make the player roll a dice roll higher than a specific requirement, with the aid of the tool and player strength as +N for the dice roll, however, that would really change my vision of how to achieve things in the game.

    Thanks for any help. I think I am really close to being able to run with my vision. Everyone has been great these last few weeks.

  • Reminds me of the time I had two player instances (one was off screen) and couldn't figure out why the Scroll To wasn't working for the instance I saw.

  • Thanks! Learning a lot.

    That's the direction I've been thinking. Right now, I am consolidating the seasonal pieces (winter, summer, etc... and buildings because that makes sense to me and I think they were just separated due to the artist but now I am rethinking that) but the things that have to do with potential destruction/farming/mining, etc..., are on their own layer and the road (speed control )is on its own too.

Ramladu's avatar

Ramladu

Member since 28 Jan, 2018

None one is following Ramladu yet!

Trophy Case

  • 6-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

9/44
How to earn trophies