[Bug] AI can't move when using Artillery

9 replies [Last post]
slawo
User offline. Last seen 12 years 8 weeks ago. Offline
Joined: 2009-10-31
Posts: 4

There is one small bug - AI want move in Artillery but can't. So AI continue walking, but AI can't move. AI can't reach the target. And this happen all the time.

Version - 0.9.12. Ubuntu 8.10, compiled manually.

nemo
nemo's picture
User offline. Last seen 3 weeks 5 days ago. Offline
Joined: 2009-01-28
Posts: 1861

Hum. I never tried artillery against AI since assumed it would kick my ass.
Forgot about that.
Guess need to disable movement in AI.

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

Thomas
Thomas's picture
User offline. Last seen 11 years 11 weeks ago. Offline
Joined: 2009-02-06
Posts: 233

...but its a Bug anyway...
If someone finds a bug he should report it to make the next version better.

please add your xfire accountname here:
http://www.hedgewars.org/node/1977

nemo
nemo's picture
User offline. Last seen 3 weeks 5 days ago. Offline
Joined: 2009-01-28
Posts: 1861

Uh... I have no clue what Thomas' comment was about.
Of course it's a bug. I never said otherwise.

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

slawo
User offline. Last seen 12 years 8 weeks ago. Offline
Joined: 2009-10-31
Posts: 4

But there is one possible way for fix it.

We need one variable in source code. I think best variable's type for this is boolean. If we choose artillery in scheme the bool will be true. Next - we are starting game, game will read variable's value, if it is true, moving procedure for AI team will be locked. Now AI must execute calculations for damage enemies.

I can do this... But there is small problem - i'm coding in c++, not pascal.

nemo
nemo's picture
User offline. Last seen 3 weeks 5 days ago. Offline
Joined: 2009-01-28
Posts: 1861

If you know how to write C++, you know how to write C.
If you know how to write C, the pascal should be trivial.
Their syntax is fairly similar, especially how unc0rr wrote it.
Here's a little cheat sheet:
record = struct
foo^.bar = foo->bar
@function = &function
begin/end = { }
if foo and bar = if(foo && bar)
shr = >>
shl = <<

That should cover most of the problems. Since you sound very familiar w/ the fix, I look forward to your patch, shortly. Smile

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

Thomas
Thomas's picture
User offline. Last seen 11 years 11 weeks ago. Offline
Joined: 2009-02-06
Posts: 233

Sorry, nemo!
missunderstood your post, i red "forget about it", not "forgot about it" Wink Smiley

please add your xfire accountname here:
http://www.hedgewars.org/node/1977

nemo
nemo's picture
User offline. Last seen 3 weeks 5 days ago. Offline
Joined: 2009-01-28
Posts: 1861

http://m8y.org/hw/AI_Artillery.hwd_30

Requires latest HEAD

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

unC0Rr
unC0Rr's picture
User offline. Last seen 1 year 5 weeks ago. Offline
Joined: 2006-11-27
Posts: 576

why latest?

nemo
nemo's picture
User offline. Last seen 3 weeks 5 days ago. Offline
Joined: 2009-01-28
Posts: 1861

well. technically not latest to just play back the demo, but seemed easier than drawing a distinction.

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

User login

Copyright © 2004-2024 Hedgewars Project. All rights reserved. [ contact ]