Server Help

Bot Questions - ?set: Bot vs. Manually

ChalkEagle - Sun Aug 08, 2004 4:20 pm
Post subject: ?set: Bot vs. Manually
I have been programming a bot, however there is a problem which I cant seem to figure out. In one portion of the code I am attempting to use ?set to kill rotation on the warbird at a certain time. The code executes fine, it changes the value as well as shipresets, however it dosnt actually make the WB not able to rotate until I warp.

Originally I figured that it may not be updating fast enough with ?set, so to test this I did the exact same commands as I made the bot do, but manually. So i typed ?set Warbird:InitialRotation:0 and I was disappointed to find that it didnt change anything. However, I then *shipreset myself and it worked. So i added a *shipreset to the bot and tested it with no luck.

Well at this point i was running out of ideas, so I figured it may be because the bot is a different "Player" in the arena, so maybe that could be preventing it from working. To test this I put two players into the arena, on 2 different computers. I ?set Warbird:initialrotation:0 and *shipreset the player and it worked.

So I am all out of ideas. Why isnt the bot functioning in this circumstance. The *shipreset does work, and the ?Set does work, but not the same as if I were to do it manually.

If anyone can shed light on this situation it would be greatly appreciate.

Regards,

Chalk Eagle
Bak - Sun Aug 08, 2004 4:27 pm
Post subject:
my guess would be the player isn't receiving the shipreset, try to do it with a text command do right before you do it like

sendPrivate(p,"restting your ship");
sendPrivate(p,"*shipreset");

then see if the player ever gets the "resetting your ship" text.
ChalkEagle - Sun Aug 08, 2004 4:49 pm
Post subject:
I had tried that before, and I had also attempted to prize my ship with lvl 3 bombs, on the *shipreset the bombs went back to level 1, so the actual commands do work. Thanks anyway

-Chalk Eagle
Bak - Mon Aug 09, 2004 8:21 am
Post subject:
perhaps there's a delay between the time you change the settings and when he receives the settings change packet.

try changing the settings
wait 1 second
shipreset the player

I know I had to do this with sc than warpto... as scing seems to have a delay while warpto not as much so.
CypherJF - Mon Aug 09, 2004 2:17 pm
Post subject:
Maybe I'm just plain wrong, which I probably am icon_wink.gif I just know whenever I wanted new setts to appear quickly, everyone had to go into spec, then a *shipreset occur, then people could re-enter w/ the new setts.. :/

Not like this really helps you or anything; I just wouldn't rely on the ?set command for things such as this..
ChalkEagle - Mon Aug 09, 2004 2:35 pm
Post subject:
Ahh, wunderbar. Your second suggestion was on the mark BaK, all it needed was a delay before the shipreset. A 1 second delay didnt work, but when I put it to 2 seconds it worked like a charm. Thanks mate.

-Chalk Eagle
Mr Ekted - Mon Aug 09, 2004 2:57 pm
Post subject:
Interesting. That points to a subtle bug in the way Subgame handles those things.
D1st0rt - Tue Aug 10, 2004 7:28 pm
Post subject:
That was actually a bug in a bot I made a while ago, if you put setfreq and setship together for a lot of people, the ship changes didn't take effect
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group