npruehs / ue4-rts

Real-time strategy plugin and showcase for Unreal Engine 4.
MIT License
747 stars 151 forks source link

Issue Move Order weird behaviour on AI behaviour tree? #170

Closed PabloMonfort closed 3 years ago

PabloMonfort commented 3 years ago

Please any hint to fix this?

i have made a custom task for replace MoveTo task due I want to fix the final position getting a raius random position, anyways, if I just add the task that's I believe same as MoveTo , but since MoveTo its kind default and don't let me see into it, I have made this task that's similar to the other issue move orders, the point is that in the IssueMoveOrder on behaviour tree image

so that's my behavior tree with the new task

And this is the task

image

My wondering is , why its repeat this much I think we need some more docs around this issue move order, coz I actually want to fix this since moving multiple units to the same final location its make the entire plugin useless to my sight, and I really love the plugin and that's open source so many I can help and we all can help on make some simple radius random position final on move units? and I try to use that but the units get crazy coz this thing seems to have a bug where its constantly keep saying moving its succeed moving as fail....

https://gyazo.com/3976d7d430e3207bd85ac5933f066375 <---------- THIS LEAVE TO THE BUG , is not noticed on your default demo due you not add the comments like I did, and coz all the units end up in the same location and even that looks fine but if you want multiple units to move at once they need to have their own position different from the other units I believe. even in a space game.

So any clue on how we can fix this? i just want to call issue move order ONCE each time I click, no matter if he succeed or not I don't want that be repeated infinitely when its not need. thanks.

PabloMonfort commented 3 years ago

I just want to say that , i have try to add this and I'm trying still to find the solution for add this.

image

but the result is not good Result vid 1 https://gyazo.com/cad88e6ab1f023c577dd60ac379766e1 Result vid 2 https://gyazo.com/56d28ce638c7ed18ec1cc9331bd970ac anyone would be too gentlemanly to give a hint maybe? thanks

PabloMonfort commented 3 years ago

Any idea on how to separate the move order from the behaviour tree¿? The problem is im not good with C++ , wish to can have more control over the plugin with Blueprints coz i can handle blueprints very well, but c++ its very hard to me understand i think i have to take some tutorials about this.

Thanks anyways.

El vie, 13 de ago. de 2021 a la(s) 01:48, coolyoshi ( @.***) escribió:

You might need to find some way to separate out the move order logic and pull it out of the loop in the behavior tree to solve the repeating. The loop you have to get it out of is that green block in the behavior tree. I know one way is to have one behavior tree for each order but that's gonna take a lot of rewiring.

And for the units all moving to one place, I think having the units move to random locations could be buggy since they might randomly move to the same offset. Another approach could be to have a fixed offset for each unit like in warcraft 3, something like this: https://github.com/DaedalicEntertainment/ue4-orders-abilities/blob/develop/Source/OrdersAbilities/Private/Orders/RTSMoveOrder.cpp. It's from Nick's other repository

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/npruehs/ue4-rts/issues/170#issuecomment-898188844, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHJXUMDWQTA4PBFIFSIOUTTT4SP3XANCNFSM5B7GLTXQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

coolyoshi commented 3 years ago

Ah sorry I'm not too sure how to do it simply or with blueprints. The way I did it involved merging the orders plugin (https://github.com/DaedalicEntertainment/ue4-orders-abilities) with the rts plugin. Alot of the logic in the big behavior tree can then be split / copy and pasted into separate smaller behavior trees.

PabloMonfort commented 3 years ago

Ah sorry I'm not too sure how to do it simply or with blueprints. The way I did it involved merging the orders plugin (https://github.com/DaedalicEntertainment/ue4-orders-abilities) with the rts plugin. Alot of the logic in the big behavior tree can then be split / copy and pasted into separate smaller behavior trees.

Dont worry, i just want to say that i finally succeed on have something working with blueprints and modifying a lil the behaviour tree with some custom code i have add it work perfectly now , thanks.

npruehs commented 3 years ago

Glad you figured it out!