In the 3-d mission "Tropica" in the 3-d part where we need to destory AlienAnts my flying shooter falls on the land when it flies over the trees. It's seems to be a bag because when I fly over those trees manually (with buttons w,a,s,d) the flying shooter doesn't fall and everything is ok. I tried to programm bot to fly higher - 20 meters - but nothing changes. Please advice how to solve this problem!
Thread Rating:
Falling on land when over trees - how to prevent?
|
03-17-2016, 02:27 PM
(This post was last modified: 03-17-2016, 02:27 PM by Rinoldo.
Edit Reason: replaced if with while in the very end of code
)
Here is my full code for flying Shooter:
Code: extern void object::HuntAnt()
03-17-2016, 02:59 PM
Do you mean those trees?
Those are graviplants. They make you unable to fly inside green spherical gas cloud they create. From what I know, you can't fly above them.
"After three days without programming, life becomes meaningless."
~The Tao of Programming
03-17-2016, 03:03 PM
(This post was last modified: 03-17-2016, 03:05 PM by RaptorParkowsky.)
Oh, you mean the bot just falling because of gravi-plant? Well, it's not a bug, it's a naturally growing on Tropica planet feature . Every flying bot or astronaut will fall or fly very low to the ground while's under gravi-plant's dome.
EDIT: Shoot! @tomaszkax86 was faster than me! Until next time...
Yeah, I was thinking it would be graviplants, but the description of the "bug" is too odd and ambigous to be sure. I can't believe a person could not know about graviplants, especially that this is the third mission on Tropica and there is no posssibility someone would not notice graviplants in the first missions.
EDIT: you got to be kidding me...
03-17-2016, 04:23 PM
03-17-2016, 05:37 PM
(03-17-2016, 04:23 PM)krzys_h Wrote: If this is true, then it is indeed a bug. You are not supposed to be able to fly at all inside graviplants. After reading all posts above I tried once more to fly manually over those trees, more thoroughly. And yes you'r right I fell just like flying shooter did! So it's not bug but damned graviplants. This makes the whole mission more complicated so my next question is, how to stay away from them? How I can tell by bot, that it's too dangerous to come near to graviplant less then n metres? Or may be it is not effective way to kill the ants? How did you people make this mission?
03-17-2016, 08:04 PM
Probably it will require some more complex algorithm instead of simple goto() method, with detecting where these plants are located and avoiding these places.
To be honest, I've always do this mission manually, I weren't so good then in all these programming things. Spoiler :
03-17-2016, 08:11 PM
The original missions weren't really well designed for doing them with programming only. This is one of the things we are aiming to fix with Gold Edition, although mission refactoring is delayed until a later stage of development.
(03-17-2016, 04:08 PM)Simbax Wrote: Yeah, I was thinking it would be graviplants, but the description of the "bug" is too odd and ambigous to be sure. I can't believe a person could not know about graviplants, especially that this is the third mission on Tropica and there is no posssibility someone would not notice graviplants in the first missions. I didn't mentioned that I played the first missions of Tropica about half of year ago. If i wrote code in that moment may be I wouldn't be suprised by this feature of graviplants. Some details fades away from memory as times goes by. The first thing I remember about those green bubbles is that they may kill you if you step into them. (03-17-2016, 08:11 PM)krzys_h Wrote: The original missions weren't really well designed for doing them with programming only. This is one of the things we are aiming to fix with Gold Edition, although mission refactoring is delayed until a later stage of development. I see. I tried to use WheeledShooter but there are some other inconveniences, such as attemts of Wheeled shooter to fire through the graviplants, or the too big difference in vertical axis of the gun and ant because of hilly land, or sometimes the bot hits a graviplant, tries to drive round it meanwhile AlienAnt destroys the shooter. May be these problems are solvable, in this case I'll be grateful if someone point out ways to settle them. Of course I always can pass this mission manually, but I'd like to do the last attempt to pass it by programming.
03-18-2016, 07:38 AM
Code: int Graviplant = 715;
03-18-2016, 08:06 AM
@melex750 This is a pretty nice workaround right there I completly forgot you can use radar() with objects that normally don't have a category defined.
03-18-2016, 09:39 AM
(03-18-2016, 07:38 AM)melex750 Wrote: I'm not sure that I uderstand this code quite clear. I tried to change meaning of int Graviplant. It works only within 710-715. Why is that?
03-18-2016, 10:14 AM
Keep in mind these numbers are not officialy part of CBot interface, and thus they may change in the future. We tend to avoid changing them though.
PS. 715 is Graviplant, 710-714 is other plants with no graviplant effect
03-18-2016, 03:47 PM
Thank you everybody for help!
|
« Next Oldest | Next Newest »
|
Users browsing this thread: 8 Guest(s)