OneManHorde's Forum Posts

  • Thank you, igortyhon.

    The simple answer to your question is I don't know how to use JSON. That's why every dictionary key is saved separately to local storage. It works, but it is not elegant or optimized.

    I would prefer a simpler and better approach, as you advised. I tried this, but it's not working. Obviously I am doing something wrong here.

  • Hi again,

    I use a dictionary & local storage for saving game progress. I am not sure if everything works as they are intended to work.

    Scenario A: My main PC

    I delete the contents of the leveldb folder to test the Steam Cloud. When I relaunch my game from Steam, Steam Cloud syncs, and the contents are back. As they are supposed to be. Marshals are unlocked with stage progression at 107.

    Scenario B: My old PC

    I switch to my old PC. I start Steam and launch my game. Cloud syncs, but the game progression is different. Most Marshals are locked, with stage progression at 02. I only completed one stage on this computer.

    So my question is, isn't Steam Cloud supposed to be global? Like, when I switch to my old PC, the newer save file from the main PC should override the old save file?

    Or is this normal? If it's not normal, how can I fix this?

    PS: I export my game as WebView2.

  • Fixed it. I switched to functions as you advised. Thank you!

  • Hi again, fellow Construct people. I have an annoying volume slider problem.

    I am trying to use tags for sounds and volume. Let me simulate:

    1) I spawn a giant, and allied_giant_on_field starts playing with the "sfx" tag.

    2) I open my menu and lower sfx volume, it works while I decrease slider value.

    3) When I close the menu and summon another giant, it plays the sound, even with the SFX slider at zero.

  • This is the mirroring part. "mirror_fragments_clock" is basically an analog watch. So every time the clock hits, I check if the sprite is moving left or right. So the problem was, when an enemy unit was created on the right side of the screen, the mirror code checked for the unit's pathfinding angle. Since all objects were created with 0 degrees, they were facing right for a moment, even though they were moving left. I solved it as I said, but that was the root of the problem.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I can't change the angle of units, unfortunately.

    I fixed it with another method. I added an object with fade behavior. Unit spawns, fade-out starts, and the object gets destroyed. Child count goes from 3 to 2. I filtered my mirror condition with child count 2. This gives me 0.5 secs, which is enough to cover my tracks. :)

    Thank you, dop2000.

  • Hi,

    Is there a way to set "angle of motion" for an object "on created"? Bullet behavior has it; I can't seem to find the same for pathfinding.

    Thanks in advance!

  • Hi there!

    Here is my game, Marshals of Yore. I finally launched my store page. It's a casual RTS/tower defense hybrid.

    I am a 3D artist and have never coded/programmed anything in my life. Yet, somehow I managed to work this thing. Construct forum was super helpful, thank you! Especially dop2000. And to Construct team, thank you! This is simply amazing.

    store.steampowered.com/app/3868490/Marshals_of_Yore

  • You are right, it's the picking.

    And that solves the problem perfectly.

    Do I need "For each Unit_Knight_L" since I start with "For each Turret_Knight_L" and then "pick own parent"? Or is this unnecessary?

    And again, you are a lifesaver, man. Thank you.

  • Hello, everyone.

    I have a question regarding pathfinding. The soldier circled in green is moving to the closest enemy (red line). Is there a way to trick pathfinding to favor the X coordinate over the Y coordinate, with something like a multiplier (blue line)? I prefer the soldier moving horizontally slightly. I tried to manipulate pick nearest withX and Y with multiplication; it didn't work.

    Thanks in advance!

  • Yes, I am a bit confused about the difference between acquire target and add target actions. I tried to do as you instructed. It seems to work. As you said, Acquire Target seems more customizable.

    I use Acquire Target for cannons. Unlike my archers, they pick random targets, not the closest enemy.

  • Thank you. This is way better.

    It's an RTS with 500-800 units constantly battling each other. If I use the start of the layout for turret targeting, units won't change targets after a kill. Am I wrong?

    But every tick is overkill; you are right. I will use it ever. 5 seconds instead, I think.

  • Hi again,

    I can't believe it has been 4 months since I posted this. I wanted to post a quicker reply, but I was a bit embarrassed since I couldn't solve the problem, even with your instructions. I am a 3D artist, not a coder. The only thing I coded was in C64 Basic, back in the early 90s.

    Eventually I understood what you were trying to tell me. Thank you.

  • Yay! Just solved unwanted movement problem. I used has target instead of on shoot.

  • dop2000, thank you, man.

    I am trying to understand how Construct 3 works. I have been checking tutorials, but there is not much on AI behavior. Even though what I am trying to do is relatively simple. 

    Thanks for the tips on targeting priorities. Right now I am trying to achieve:

    When Elven Archers start shooting, I want them to stop moving, wait for 1 second, then move again. I tried timer behavior with the event sheet but failed. 

    If you have any suggestions on which tutorial to read, I would really appreciate it.

    Thank you.

    i.giphy.com/media/v1.Y2lkPTc5MGI3NjExMDJ0NTRibngxeWh2MXAzNzQ3ZW1mbzNob2JzOHNma3ZsYmlqNWRxMCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/s1Dhasp2PHSlzO6vl8/giphy.gif