Thread Rating:
  • 4 Vote(s) - 4.25 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[DEV] G2O Bot module
#11
When I find a critical bug, I usually don't test any further. However, if I find something after next release, I'll report it for sure.
Reply
#12
First post updated! Alpha 2 is released.
Reply
#13
You can remove the inscription of the author and give the command /sative?
Reply
#14
I'm assuming there's no AI built in, so I'm building it myself currently. I'm not sure how I should let the bots walk though. My initial idea was to just turn them in the direction they need to move and play the walking-animation. On the client that looks absolutely perfect, but the position of the bot doesn't actually change on the server and at some point, on the client, the bot will teleport back. Is there a way to synchronize this properly and idealy have the server "play" the animation as well and update the position accordingly? I would rather not manually set the position of the bot on the server since this would probably just not look smooth (Especially since on each client the bot does move because of the walking-animation and the position would never really be accurate) and also I would have to manually find a speed-value for every instance. What is your recommended way of doing this?
Reply
#15
The position is updated when you are doing animation.
Reply
#16
Oh... I just noticed, that apparently secret_gimmeBotPos does this. For some reason I thought this was some kind of placeholder and removed it. I didn't understand just how important it is. From the way it is used... This sets the position of the bot on the server to the position on the client I call this function on?
Reply
#17
You shouldn't edit G2O_CBot.nut it is only function list.
Reply
#18
I'm having a little problem with looping animations. Some of the monsters' animations are played in an endless loop. Let's take the die-animation for example. I need the enemy to just fall over once. But for some monsters (The wolf for example, pc_hero works fine I think) it will repeat the animation until I call endAnimation(). Of course I don't know exactly how long the animation is. For this example I assume I could use the animation where the enemy is already dead. Wouldn't look great, but at least it would work. But I have the same problem with the attack-animations of some monsters. The wolf for example works fine, he will only play the animation once, but the goblins on the other hand (And probably others as well) will just attack until I manually end the animation. In this case this is a pretty big deal unfortunately.

I know that at least the die-animations should be able to be played just once. I haven't tested it with GO just yet, but using the GMP this exact animation wouldn't loop when changing the instance of the player. I am getting the impressions that either I am doing something wrong, or it's something with the bot-module Smile

Long story short: Is there a way to play any animation just once or get the length of an animation to be able to end it with endAnimation?

And some obligatory code of how to reproduce this behaviour:


Code:
TestBot = createBot("TestBot");
TestBot.setInstance("WOLF");
TestBot.onDie = function(killerID)
{
   playAnimation("T_DEAD");
}
Reply
#19
Thank you, it will be fixed in next release Wink
Reply
#20
Oh, it was actually a bug? ^-^ I was sure I did something wrong. Either way: Great to have a solution soon.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [New G2O][Client-Side] GUI Patrix 1 3,343 02.01.2021, 05:22
Last Post: Patrix
  [G2O] SpeedBlock Marbar 16 11,049 13.10.2020, 15:32
Last Post: Sative
  [New G2O][Client-Side] LocalStorage Patrix 0 2,422 08.05.2020, 16:38
Last Post: Patrix
  [New G2O] Module example Patrix 4 7,683 17.05.2019, 01:30
Last Post: Patrix
  [New G2O][Client-Side] Music Module Nubzior 3 5,909 24.05.2018, 08:07
Last Post: Nubzior
  G2O - Client Side Bots(0.0.4) KimiorV 16 16,993 16.01.2017, 10:47
Last Post: KimiorV
  G2O Client side bots KimiorV 4 5,898 09.06.2016, 20:11
Last Post: KimiorV

Forum Jump:


Users browsing this thread: 1 Guest(s)