Author Topic: Bot Events  (Read 6659 times)

Hey everyone! I'm working on a server with bots that you can fight, but I'm afraid that my knowledge is limited. I could've sworn there was a good tutorial out there for it, but I haven't found it yet. Anyways, I want to make it so that my bots will attack with either short or long range weapons as necessary when they detect an enemy (players). I just don't understand the bot ai properties and values at ALL. Can anyone help me?

What i.did to figure out bot events was to just experiment.


Onbotspawn::bot::setbotaim::nearestplayer

onbotspawn::bot::setbotmovement::Wander

What i.did to figure out bot events was to just experiment.


Onbotspawn::bot::setbotaim::nearestplayer

onbotspawn::bot::setbotmovement::Wander

See if that works.

on bot spawn > bot > set bot movment > nearest player 500
on bot spawn > bot > set bot weapon > (weapon here)
on activate > self > fire relay
on relay > self > fire relay
on relay > self > bot fire weapon

Then click the brick and the bot should fo,low player and shoot them

on bot spawn > bot > set bot movment > nearest player 500
on bot spawn > bot > set bot weapon > (weapon here)
on activate > self > fire relay
on relay > self > fire relay
on relay > self > bot fire weapon

Then click the brick and the bot should fo,low player and shoot them
or you could give it a weapon and make it aggressive.

onbotspawn - bot - setbotAIproperties - Aggressive 4444444
onbotspawn - bot - setweapon - (shootable weapon)

Try this. The bot attacks other bots or attacks players.

or,

onbotspawn - bot - setbotAIproperties - defends itself 4444444
onbotspawn - bot - setweapon - (shootable weapon)

this makes the bot so when you hurt it, it attacks you. it dosent attack you when you go near it.
It can attack other bots too

First of all, I would like to thank everyone for all the help, and especially for not flaming. Anyways, I think I can understand the ai properties and values now (kind of). The demonstration of what the textbox is used for helps big time. I'm going to try out some of these events, and see where it takes me. Thanks again! If I have any other questions I will post them on this topic.

I'm making pretty good progress on my server. Special thanks to K3k0m@n for the specific bot help. However, I do have more questions:

1. Okay, so I can make my enemies aggressive. However, I have a few bots that are statues, and the enemies shouldn't be aggressive towards them (because that's just stupid!) Any ideas? My guess would be to make the statues on the same team as the enemies.

2. I want to incorporate "fire teams" onto my server. Special bots that you can hire (up to 2) to follow you around and help you fight (until they die). I would imagine that it would take both VCE and Bot events to accomplish this, but I haven't got a clue where to start. Any takers? (If this is too advanced, that's fine. My server doesn't have to have it)

Question 1 figured out. If anyone has another way, let me know, but setting the statues' team worked.

New question:

Question 3. Can I delay the respawn of a bot? If so, how? I want to make it so that you aren't constantly fighting off the same bot.

Question 4. How can I make the enemy bots stop attacking when they can't reach me? For example, I walk into a hut or something that they can't get inside, and they continue to attack the wall. do I need to encourage them to find a new target somehow?


New question:

Question 3. Can I delay the respawn of a bot? If so, how? I want to make it so that you aren't constantly fighting off the same bot.

Delay: 0 OnBotKilled--->self--->setVehicle[NONE]
Delay: 1000 OnBotKilled--->self--->setVehicle[Standard Bot]

That should make it wait exactly 1 second in bewteen death and respawn.

Delay: 0 OnBotKilled--->self--->setVehicle[NONE]
Delay: 1000 OnBotKilled--->self--->setVehicle[Standard Bot]

That should make it wait exactly 1 second in bewteen death and respawn.


Thank you very much

Question 5. Why are my bots not spawning correctly when I start a minigame? I have two statue bots, four enemy bots. Whenever I start a minigame, one statue will look right (the other looks like the bot when it doesn't have any appearance events applied to it), and two of the four enemy bots look/work correctly.

Ok, I figured out that I just needed to raise my schedules. Question 5 answered!


2. I want to incorporate "fire teams" onto my server. Special bots that you can hire (up to 2) to follow you around and help you fight (until they die). I would imagine that it would take both VCE and Bot events to accomplish this, but I haven't got a clue where to start. Any takers? (If this is too advanced, that's fine. My server doesn't have to have it)
[/quote]
Those "Fire Teams" of yours can be done by eventing
On Activate(the bot spawn) Set vehicle [NONE]
(Delay 1) On activate/ set vehicle/ [Standard bot]
on bot spawn/ set bot weapon/ (Weapon with no delay time)
on bot spawn/ set bot ai properties/ follow player [-1 or really high number]
on bot killed/ set vehicle/ [NONE]

As for a limit of two... I've got no idea how to do this. You could put only two spawns or something. But that would limit what weapons your bots could weild. It may not work, but hey, worth a shot.