rbailey83's Recent Forum Activity

  • tarek2 Hope you don't mind another question. I don't need the full solution I just want to know if I am barking up the right tree or if I need to switch my solution method.

    So I have setup the function and animations and all that jazz, When the enemy appears the player needs to be able to tap and interact with it and I could not get it to allow me to do that as an animation so I had that family tile spawn a new object with the enemy and then set the family tile animation to empty so that it wouldn't duplicate the enemy with the animation enemy.

    I then setup for the tap fight, and on enemy killed destroyed the enemy. In order to get the tiles to turn back to the default (tappable) tiles i set the instance variables back, both active and animated, to false after enemy destroy, and set the family tile animation back to default. I also tried just calling the function again after enemy destroyed. But that then also puts the tile back up on the one where the enemy had appeared and player defeated instead of staying empty.

    Here's an image of the code and link in case image doesn't show, Just want to know if I am heading in the right direction with destroying the object and resetting the animation no need to give the solution, i usually figure stuff out by trial and error i just don't want to spend hours on it if I am not even going in the right direction.

    I highlighted the area for on enemy death i didn't run it with both enemy death events i just did one at a time but included both for easier screenshot, but included full code in case you needed to see what i've done.

  • tarek2 Great! thanks for the extra breakdown of the event sheet, helps to simplify it a bit more. Was understanding most of what was going on, took me a minute to catch on to the family part lol.

    This has been great and thanks so much for not only being informative and helpful but even making the example project for me! Much appreciated!

  • nevermind, i created a new project and looked from that and the function is showing, just wasn't showing for me when i tried looking for it in the example project you sent me

  • Yeah that's right the Detector is the one checking for the neighbor's tiles of the enemy tile when is spawn but only checks overlap if the enemy was spawn, I used the function because is a Trigger so it checks the overlap once and also the Function are really good because you can pass the UID of the objects so you can do more extra staff to that particular object later on by just picking that UID

    You should definitely learn how to use the Functions if you can as has many benefits, they are very easy to learn and once you learned you will see is not much complicated and very useful

    The Function is an official plugin from c2, you can add the Function Plugin by going to the Right side panel and right click on the folder that says "Object Types" then choose insert new objects and then choose "Function"

    You can read more about it here

    https://www.scirra.com/manual/149/function

    tarek2 Awesome thanks again! I have an understanding of functions from my baseline knowledge of programming language and how useful they can be. The function option is not listed for me though when i right click object types and choose insert new objects. it's up to date and a personal license

  • tarek2 yep that's exactly what i was trying to do thank you so much, So it's the detector that gets called in at enemy spawn, and whatever tiles the detector is overlapping it locks out is that right? How do you do the functions? I haven't seen that ability or is that from a plugin?

  • The player taps a tile and either enemy, loot, or nothing spawns. What i want to happen is that if an enemy spawns then the tiles surrounding the enemy would change to a different object, which i can do fine, but then would not be able to be tapped until the enemy is defeated.

    I imagine that once i switch the tile out with another object that there is no touch command for that would take care of the player not being able to tap the tiles around the enemy but how do i set it up with the events to basically say if enemy spawns then surrounding tiles within 1 tile distance of enemy in all directions are untapable? or in all directions switch to this object?

    Lol i hope that what i am saying is making sense.

  • I got that figured out

  • I had set it up so that on touch the tile would disappear with an animation, then enemySpawn variable int(random(1,4)) then for each i had different possibilities so

    enemySpawn = 1 create object > enemy

    enemySpawn = 2 create object > coin

    etc.

    The problem I was really running into right now though was after the tile disappeared, revealing the floor tile and the enemy or coin sprite on top of it, i could not allow for tap to either collect the coin, or tap the enemy to damage the enemy and have the enemy damage the player. The on tap is no longer available option. Maybe I'm just not wrapping my head around properly using the events. To me i would be able to say if enemy spawned & on tap enemyHealth -= playerAttack and then vise versa for playerHealth -= enemyAttack and so on for each tap until either the enemy reaches 0 health or player reaches 0 health.

    I would put up a screen shot of what I had and had tried but when i loaded it back up in construct, even though i had saved it, all the events i did for that layout were gone so i have to redo that.

    I'm sure i will run into more questions for things i can't figure out and that's why i was hoping someone had done a tutorial for this specific type of game.

  • sorry no not memory game, so when a tile disappears an enemy or loot will show up, if an enemy shows up the player can tap on the enemy that showed up to fight it, each attack would damage both enemy and player depending on player and enemy stats. If it is loot than the loot would be picked up and added to the players inventory, eventually the door to the next level of the dungeon would be revealed and everything repeated.

    it's a simplified version of a roguelike dungeon crawler game with fighting, leveling up character, finding items and so on.

  • So the dungeon crawler i am trying to make is one that each level is just a set of tiles that the user taps (this is for mobile devices) and then either nothing appears, enemy appears, or some type of loot appears. I was wondering if there were any tutorials for this type of game out there that anyone knew of that i can refer to as i run into things i can't figure out how to do.

    here's a link to image if you aren't sure what I am talking about for the game type

    https://drive.google.com/open?id=0B7OkzeF7yYS7Sm92R2IxN0NVV0U

  • Ok thanks, i was originally going to do the create but had to know the x and y position for each box tile and it's a 6x6 area, with 36 box's

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I am really new to construct 2 and I am doing a dungeon crawler type game, where when a tile is tapped it disapears and once destroyed either nothing on the ground, loot, or an enemy monster to fight. I am having trouble getting it to show the enemy once the tile has been destroyed. here is what i have so far

    First I tried it during the on touch destroy object:

    https://drive.google.com/open?id=0B7OkzeF7yYS7a0Zaa1VaYTR5Z3c

    Then I tried it on the on destroyed action:

    https://drive.google.com/open?id=0B7OkzeF7yYS7dG5EdWExMFBMU28

    P.S. I did all 3 with the spawn just to check to make sure it would spawn

rbailey83's avatar

rbailey83

Member since 22 May, 2017

None one is following rbailey83 yet!

Trophy Case

  • 7-Year Club
  • Email Verified

Progress

8/44
How to earn trophies