rbailey83's Forum Posts

  • Moving to the right constantly is a sign that it's struggling to find a path. It's probably because you are finding a path every tick, you should add a trigger once to that condition.

    Awesome, that worked. I figured it had to be something simple. Thank you so much!

  • The player will have hunters that go out into specific areas and is not controlling much of the hunters actions. I'm trying to setup the pathfinding and the event I'm working on is that when hunter's health is <= x amount the hunter finds a path back to town to a specific building.

    I'v put the hunter in the town area and the building I am directing it to is above it. Once I trigger the health to the x amount, it finds the path and once found it just moves in a straight line to the right until it hits the town border wall.

    There are no solid objects between the hunter and the shop sprite. I can't figure out why it's doing this. If I change it to find the path based on mouse x and y it moves just fine.

    This is my first time using the pathfinding. Here is an image of the area, events and pathfinding properties.

  • I have it set for enemies to chase after player in a platformer game when player is within a certain distance. Sometimes when the enemy gets to a spot they have to jump at to follow it gets hung up on the object in the air. I'm guessing this has something to do with the bounding box.

    What's the easiest/best way to fix this so that it doesn't happen?

  • Nope not working. Before you upload it again you could temporarily remove that behaviour from your local folder, then try and open your capx to see if it requests it.

    Nope it's looking for it but i don't know where. I even went through and deleted all the background layers for each level lol. Oh well I will just have to keep combing through the code and see if something pops out at me

  • Something is still using that behaviour so it can't be opened.

    Ok so third times a charm right? I had one level that the background layer was unchecked so that has been removed and that should take care of it. If not then i have no idea what instance is still using it lol. Thank you for all your time in trying to open the file project to check my work, I do appreciate the time spent and feel bad that I haven't had them all removed.

    https://drive.google.com/open?id=1VP-CvqwVY2Vfy1xAuO9rM6kTF1UnVaMR

  • Something is still using that behaviour so it can't be opened.

    arg, ok thank you for trying, appreciate it. I will give it one more go to see if i can track down what's using it

  • No-one is going to be able to help unless they've purchased this parallaxbg behaviour from the store.

    Think I found the last instance that used that behavior so it should be able to be opened now without owning that behavior

    https://drive.google.com/open?id=1vxy0dSRlliud5io6Jgih78bSwfi1CCcO

  • No-one is going to be able to help unless they've purchased this parallaxbg behaviour from the store.

    oh I thought I removed all instances of it's use, darn I will recheck it or try uninstalling it from that version

  • No-one is going to be able to help unless they've purchased this parallaxbg behaviour from the store.

    oh I thought I removed all instances of it's use, darn I will recheck it or try uninstalling it from that version

  • Here is a capx if anyone feels like looking through it. I have looked through the weapon upgrade, player level up and the on start of layout for the levels and just don't see why it would revert to 3 and on another trial it took it down to 0. It usually does it once player reaches a strength of 20

    https://drive.google.com/open?id=1t4FW5UxcMLqQGrK59mxRQ-tKiARYB2lZ

  • You didn't really go into detail about the events that happen when the player levels up. Considering that's where it goes wrong then I would look there. You only set dungeon damage on start of layout, maybe you change that to 3 when the player levels up?

    No I have it set to add playerNextLevelSTR to playerStrength and playerNextLevelSTR is set to 2. As well the only place in the game that I have the set playerDungeonDamage to playerStrength / 2 is in the start of level layout

    this is the level up code

    http://funkyimg.com/i/2HxQy.png[/img]

  • I am playtesting my game and on the level 1 it works fine for a while, then I hit a certain player level and the damage the player deals becomes incorrect. I switch to level 2 and the damage is what it should be, switch back to level 1 and the damage is now correct.

    I have it setup that on level 1-1 on start of layout set playerDungeonDamage to playerStrength / 2

    this is the same for level 2-1

    players strength was 26 but it set the damage to 3 instead of 13. When I went to level 2-1 the damage showed 13, went back to level 1-1 and damage showed 13.

    Any thoughts as to why this would happen?

    before going to level 2-1 I ran the game in debug mode and the playerStrength variable showed 26 and playerDungeonDamage showed 3 before I even entered the level, while I was still on the main menu.

    I didn't upload a capx because i don't want to bother anyone with debugging for me just looking for thoughts as to what might cause that to happen?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes, of course you can set the value to some variable.

    Dictionaries are perfect for use together with local storage, because you can easily save and load a lot of information at once.

    If you are saving each variable separately in LocalStorage, you need a million of events to save and retrieve each item. If you are saving a dictionary, you only need a couple of events.

    .

    I also suggest keeping dictionaries not just to store data in local storage, but actually using them in your game. For example, you can have a dictionary GameSettings, with keys like "MusicVolume", "SoundVolume", "Difficulty" etc.

    You don't need to create variables with the same data, just use the dictionary, for example:

    Audio set volume to GameSettings.Get("MusicVolume")

    Awesome thank you. You always seem to be the only one that answers my questions or issues, i feel bad that it's always you but thank you so much for being so active on the forums and helping out, it's appreciated more than you know

  • Dictionaries are actually very simple, much easier to understand than arrays.

    They are like variables, only more flexible. Just add keys and values, for example:

    Key="Coins", value="35"

    Key="Weapon", value="small_sword"

    etc.

    .

    Then save to local storage Dictionary.AsJSON

    To load: Dictionary load from JSON (LocalStorage.LastData)

    .

    I made this demo for some other post:

    https://www.dropbox.com/s/1cz1k5x3teikbv5/DictionaryLocalStorage.capx?dl=0

    So setting the key is like setting the item in local storage can you set the value to a variable instead of a set number or word? I will have to look up some tutorials on dictionaries and learn more

    so I would do say for player gold

    set key "playerGold" to value playerGold?

    I think I am just making it seem more difficult than what it really is lol, I'll have to play around with it and see what I can make it do

  • You should use "System On Load Complete" event or "System On Load Failed" to switch to another layout.

    I couldn't find the option to PM in the new forums setup

    another questions, I am currently using system > save game. I will be uploading to kongregate so I don't want the player to loose all save game if browsing history and cache is deleted. I know I would have to switch my saving to local storage, but it can be a pain doing all the set, get events. Will the dictionary take care of that? I have no idea how to use the dictionary but from what I gather the data can be stored in the dictionary so then would I just have to load the dictionary on start of game and it would load the data?

    I've looked at a few threads/tutorials that talk about dictionary and just find it confusing, is there an easier way other than dictionary?