Brandon_H's Recent Forum Activity

  • Hello to start off the reason your enemies are not spawning correctly.

    It's because you forgot to destroy the initial enemy outside the layout so your map can't start.

    As for adding pathfinding. I created an object called waypoint gave it a variable called number and added a variable to your enemy called currentWaypoint, whenever an enemy collides with a waypoint it will check if that waypoint number is equal to currentWaypoint,

    if it is it will find path to the next waypoint.

    Hope this helps good luck with your project

    Updated Construct File https://www.dropbox.com/s/s2zorpsocgkrvo0/Tower%20Defence%20updated.capx?dl=0

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I know this is a few days late. I made a basic reload system with only 5 Events.

    It's pretty basic it uses a bool for the reloading timer. Hope this helps you good luck with your project

    Example capx https://www.dropbox.com/s/m6t4296vyvvpjgg/reload%20example.capx?dl=0

  • Your code works. The reason your line is spawning in the middle is because, the origin point is in the center of your Sprite so when you set your objects width it will expand in both directions, You could always fix this by positioning your object between the positions or just change the origin to something like this

    Here's the example all I did was change the origin

    https://www.dropbox.com/s/9hjznsrsg4e0a ... .capx?dl=0

    Good luck with your project if you have any questions just ask or PM me <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

  • You could always add another object on top of your initial object as a falloff check, Invisible to players. So you don't get the overlap Issue, Something like this

    Hope this helps!

    Good luck with your project

  • I don't know what kind of gameplay you're going for, however, I found out that a simple rotate towards angle instead of set angle makes it look a little smoother.

    Good luck with your project

  • I had a similar issue and ended up just using 1 object as my enemy unit and then at the start of the game created a array and added each 1 of my enemies possible stats to it and then when they're created had a function to load their stats and animation based on their name or ID creating them on the games first start looks like this

    I did this from the start so it wasn't such a big deal, however, adding this into an already developed project might be annoying since, I built everything around this concept, However, now it's very convenient because I can load units based on their name and get their stats pretty easily

    Just an idea good luck with your project

  • In your Sprite change the origin image point to the center

    Broken origin

    Fixed origin

  • Had some fun coming up with this one because there's a lot of ways to do this.

    This is what I came up with it is very simple and versatile and can be changed on the fly, it uses a simple timer and then sets the Opacity every tick with a simple ratio.

    Timer.CurrentTime / Timer.Duration * desired opacity[/code:v7jov4dx] 
    Then at the end of the timer it sets a global variable to night. 
    
    Then for transitioning to day we do is this
    [code:v7jov4dx]desired opacity -Timer.CurrentTime / Timer.Duration * desired opacity[/code:v7jov4dx] 
    
    This is what it looks like in the editor [img="http://puu.sh/rwBKx/c68b5dedd9.png"]
    
    Anyways here's the example if you have any other questions just ask, and if you have any future problems feel free to contact me. 
    Good luck on your project <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">
    [url=https://www.dropbox.com/s/ex1i40l9l0afqxx/day%20and%20night%20example.capx?dl=0]https://www.dropbox.com/s/ex1i40l9l0afq ... .capx?dl=0[/url]
    
    How timers work [url]https://www.scirra.com/manual/167/timer[/url]
  • so it's really up to you how you want to set up your code but if you going to have a game with many different vehicles I'd recommend setting up controls for each one individually if they all have different movement mechanics. You are definitely on the right track with your state system. There's a few ways of doing it that different people use.

    Some people do all of their code for that vehicle under each state as a sub event http://puu.sh/pTM5Q/bfa7f69faa.png

    I prefer using something similar to this http://puu.sh/pTMsX/bb451fbf65.png

    And if you need something to happen when a state's gets activated just use http://puu.sh/pTNa5/2264f15539.png

    Both ways work so it's really up to you and in both these examples you can have way more than just the movement code under your States and of course there a ton of ways to do this so find the one that works best for your project Good luck <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

  • I was looking at this problem again and I think we agree that they're both being activated because the players falling so I thought what makes the player start falling so move all of your move player code under your animation finish as sub events keep the conditions, However you might need a reference to the object climb detect

    http://puu.sh/pSJCg/450233fc7b.png

  • yeah it might help that's what I did last time I worked with a lot of animations because it can give you a clear view of exactly what your character can do at any given time for instance

    you could map everything out like this beforehand might help you visualize exactly what your character should be able to do depending on the state he's in

  • also I was thinking a little bit about having multiple animation bools why not just have one var called animation state and then set that based on what your characters doing instead of needing to check every single bool when your animation changes you could just check the one value and it might improve the flow of the project when you add even more features

    Just a suggestion you probably have to redo a lot of stuff so.... it's up to you

Brandon_H's avatar

Brandon_H

Early Adopter

Member since 19 Mar, 2013

None one is following Brandon_H yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies