darkrealos's Forum Posts

  • 99Instances2Go okay changed quite abit now decided to use the route of creating unit selection boxes on demonspawn and setting variable in box to demon. uid then compare the uids if they match the select or deselect and set visible or invisible based on results, the only problem i have is deselecting units doesn't always work correctly

    as you can see from image of ingame not all the demons are deselecting correctly and not always 100% selecting properly

    any help would be hugely appreciated

    Image of Code

    http://imgur.com/a/ma5xZ

    Image of in Game

    http://imgur.com/a/Mc4bH

  • 99Instances2Go thank you for replying , i'm happy to set to invisible,

    so maybe

    pick all demons

    if mouse button left down - selected to false

    blank sub event - set selection box to visible

    subevent selection box overlapping demons - set selected to true

    create unit selected demon.x + demon.y

    pin unit selected to demon.x + demon.y

  • Can anyone possible help?

  • You do not have permission to view this post

  • i was wondering if someone could help me with this code in image, http://imgur.com/a/wsYPW

    this is using a code from a youtube video tutorial on rts selection box, the problem with the code is he changing the sprites animation which isnt viable for as ive got to many animations to add selection box to and would mess up animations in progress.

    the problem ive got with the code atm is not all demons are being selected unless i drag over them slowly and once they are selected if i decide to make selection box smaller they are all still selected, ive tried a few methods to fix this but nothing is really coming to mind can anyone help me please?

    the selection box is 9patch if that means anything with the edges being tiled and filling being stretched middle of box is transparent

  • newt sorry despite how much i research into it and look at it none of it really makes sense, as to compare the positions you would still need to know the position between middle of screen and the edge but if your changing screen sizes or layout sizes then the middle position would change right ?

    no problems i worked it out im still using scroll to but setting position to scrollx and scrolly so it will always be centre event if camera stops moving

  • ahhh okay, that's doable just thought it might be easier with scroll to

  • thanks for the reply ill give it ago whatever it is , another quick question im making a camera which follows sprite and it moves via me pressing wasd, how do i get it to stop moving when it reaches any of the sides and always keeping sprite centre of screen so when i move in opposite direction it will start immediately?

  • hi there im making a game with a few rts elements in it and i wanna drag a box around my minions ive got it all works but the box looks awful when its stretched is there i way i can get around this?

  • anyone help with this problem?

  • no luck the event still wont trigger, i think for some reason it wont read the hp trigger , as ive done tests to check what triggering and it wont change variable after the hp one

  • ahhh brilliant ill give that a try and let you know

  • ahh i see that makes sense the only problem i have is that if i remove the demonhealer from the demons family then it will lose all of its variables and pathfinding and stuff as ive combined it all through the family, would it be possible to make a family called nonhealers just for the objects and use that?

  • hey sir here's updated code and simplified so everything you see should work by it self, but it doesn't, the demons don't seem to be healing people or moving towards them even tho, looking in the debugger they dont even trigger the event so even tho demons hp is below maxhp they still dont trigger

    http://imgur.com/a/NwtaG

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • thanks for the reply i will try this new method and see what happens yeah making a simple version will be hard as there is so much code XDDD but thanks a bunch for the help and i will update on the progress