evillair's Recent Forum Activity

  • Hi, I have a group of events I need to do many times and I only need to change a few parameters, I'd like to know how to make this into a function with parameters, I can't seem to grasp it. I'm thinking this can be done?

    I highlighted in blue the things that will need to change in the function.

    Thanks in advance.

  • I reworked a bit of the code but I fixed it with a 'OR' statement for my weapons.

    Enemy is Picked
    or
    Enemy is closest[/code:cnm3v7ap]
    This way if there's a picked enemy it doesn't take into account one that is closest, and if there is no picked enemy it uses the closest one.
  • I'll try and explain as clearly as I can, I've been running around in circles with this.

    I need to select 1 enemy ship to fire upon.

    Now that ship has to be either

    A) closest to the player

    or

    B) selected by the player selecting him.

    In all cases it needs to be visible.

    My issue comes when selecting a ship that is further away from the closest one that was selected in the code by clicking on him, I can't get it to become unselected, even though I'm making the bool set to false. I need to fix the closest to player statement somehow.

    I'm using 2 booleans on the enemy ship, one is 'selected' and the other 'closest'.

    I'm using the 'closest' bool to select the ship to fire upon.

    Hope that makes sense!

    thanks in advance

    Here's what I have but it's not working.

  • Yeah, I changed the weapon names to the correct ones now.

    Ah good idea about the weapon levels.

    Thanks!

  • Nice evillair looking quite interesting so far.

    Thank you

  • Hi, I'm not asking to fix what I have since it's not well made, but I'd like to hear some options on how to make this better?

    I'm using way too much code to make a simpler upgrade UI that there must be a better way.

    This is what I have right now and it's only to upgrade 3 weapons and health / shields.

    I'm needing to have to swap weapons and more stuff down the road and the way it is now it's going to be hell.

    My foundation of all this may just not be the right way to go aswell.

    Right now I have all my weapon stats in instance variable on a sprite for each weapon. Once I add more weapons for the player and enemy it's going to get complicated, I'm using the same weapons for the player as the enemies right now.

    The system I have now is this:

    The UI pops up and I set all the variables to a tmp variable incase they reset the changes.

    Once they accept (close the UI) I then set the tmp variables back to the spriet that the player uses.

  • Working on a small RTS pause-able space game.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Just make your first layout with everything you need and duplicate the layout. Or just generate a random layout each time.

    Perhaps others have a better idea?

  • Just use Go to layout by name and enter choose("level1","level2","level3","level4","level5")

    You just need to name your layouts correctly.

    Or you can have a text variable with that choose() and enter the level name there.

    This will load one of those layouts randomly.

    Use this (from the layout selector layout?) when you want to go to a random layout, change the names appropriately.

    So when you click your level one have 5 level names in there, for your level 2 add 10 names in there etc.

  • Great! Thanks!

  • The manual explains it pretty well: https://www.scirra.com/manual/150/containers

    "Containers are for making "composite objects", or objects made out of lots of smaller sprites (such as a turret and tank base making a single tank). Once in a container, picking the base also picks the turret, and vice versa."

    For example I have a enemy spaceship that have a lifebar, shield bar, shield and a trail all in a container, I just need to place the spaceship on the layout and all the others show up. I have a everytick that keeps them where they go. If I change the healthbar in an event they update for all the ships with the right values of the ships since they are spawned together.

    I never used them before, now after trying them out I use them on everything that have multiple parts.

  • Done, thanks again.

evillair's avatar

evillair

Member since 13 Feb, 2014

Twitter
evillair has 1 followers

Trophy Case

  • 10-Year Club
  • x2
    Popular Game One of your games has over 1,000 players
  • RTFM Read the fabulous manual
  • Email Verified

Progress

13/44
How to earn trophies