2 Attachment(s)
RTS Multiple Units, non overlapping at destination
I've been messing around with a Sphax pathfinding example and tried to push it a little further, with multiple units that doesn't overlap each other when reaches the end path. I used a selection method from another user (tried to find the original example to give him credit but couldn't find. It was someone very much interested in RTS engine, so hopefully he does find this post.)
This selection method wasn't working with Sphax engine for some obscure reason that I couldn't identify so I made a crappy one LOL. It is still a little buggy but I hope to make some improvements in a near future. Maybe someone can tweak from this point and make it better also. If you can, please post the results here! :grin:
thanks for looking.
2 Attachment(s)
Re: RTS Multiple Units, non overlapping at destina
Here is the original file I mentioned that had multiple selection that I couldn't handle to work correctly with Sphax engine (this example uses value A for defining instances, I changed this and still didn't work as in the original example).
edit: feel free to change or try to implement in the file above. Hopefully the author will see this post recognize his file.
Re: RTS Multiple Units, non overlapping at destina
You know, the advanced path finding extension is really made for this kind of thing. :)
Re: RTS Multiple Units, non overlapping at destina
Quote:
Originally Posted by Greyhill
You know, the advanced path finding extension is really made for this kind of thing. :)
Well, maybe if you created an example of the above with your extension, I might be able to learn it. :P
Re: RTS Multiple Units, non overlapping at destina
Re: RTS Multiple Units, non overlapping at destina
I'm sure you could use simple math... I'll think about it.
Re: RTS Multiple Units, non overlapping at destina
SETXTO
XMouse+(LoopIndex("loop") mod Sqr(Nb of units selected)*g)-(Sqr(Nb of units selected)*(g/2))
SETYTO
(YMouse+((LoopIndex("loop")-(LoopIndex("loop") mod Sqr(Nb of units selected)))*(g/4)))-(Nb of units selected)*(g/4))
That should work nicely.
Re: RTS Multiple Units, non overlapping at destina
btw g=distance between each entity.
Re: RTS Multiple Units, non overlapping at destina
SEELE, I don't see any pathfinding there, at all. Explain.
2 Attachment(s)
Re: RTS Multiple Units, non overlapping at destina
This is an example of how to do the same thing, but better, with the APF ext :) DizzyDoo was interested in it...
This demo's comments assume you've looked at the simpler demos that come with the APF extension.