English bot_skill 0 = no attack ?

8 replies
Goto Page
To the start Previous 1 Next To the start
06.08.17 02:58:31 pm
Up
LoaderFRA
User
Offline Off
Hello,
I would like to know that if bot_skill 0, the bots do not attack as in CS: GO but if it does not attack = error: function ai_onspawn (id).

So I would like to know if it is necessary to make a new function with "join" or with "ai_onspawn" or "bot_skill" ?
thank you in advance
06.08.17 03:25:59 pm
Up
Gaios
Security Supporter
Offline Off
06.08.17 05:11:44 pm
Up
DC
Admin
Online On
@user LoaderFRA: To make bots stop attacking you would have to modify the AI Lua script in the bots folder. Just don't call any attack functions if
vai_set_botskill
is 0.

Another (easier) solution which might be okay for you is using cs2d cmd bot_weapons. Just set it to 1 and bots will only use melee weapons. You could even set the knife damage to 0 with cs2d cmd mp_wpndmg so they don't cause any damage.
Code:
1
2
bot_weapons 1
mp_wpndmg 50 0


@user Gaios: cs2d cmd bot_freeze also stops all bot movement. I guess that's not what he wants.
www.UnrealSoftware.de | www.CS2D.com | www.CarnageContest.com | Use the forum & avoid PMs!
06.08.17 06:36:52 pm
Up
LoaderFRA
User
Offline Off
Thanks for your answers but for it to work in the /autorun folder, should i add a function? (instead of typing mp_wpndmg 50 0 every time and changed in bots options)
06.08.17 06:38:11 pm
Up
Talented Doge
User
Offline Off
cs2d lua cmd parse does what you need.
Talented Doge
06.08.17 07:08:00 pm
Up
LoaderFRA
User
Offline Off
Thanks @user Talented Doge:
Code:
1
2
parse ('bot_weapons 1')
parse ('mp_wpndmg knife 0')


its works
06.08.17 07:21:58 pm
Up
DC
Admin
Online On
Ooops! Okay sorry, didn't see that mp_wpndmg actually expects the name not the ID but glad to hear that it works now
www.UnrealSoftware.de | www.CS2D.com | www.CarnageContest.com | Use the forum & avoid PMs!
20.08.17 09:29:27 pm
Up
LoaderFRA
User
Offline Off
Now i use the text command, because i change the difficulty at will
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
addhook("say","change_difficulty_bot")
     function change_difficulty_bot(id,txt)
     if (txt=="!bot_skill 0") then
          parse ('bot_weapons 1')
          parse ('mp_wpndmg knife 0')
          parse ("speedmod -50")
     end
     if (txt=="!bot_skill 1") then
          parse ('bot_weapons 2')
          parse ('mp_wpndmg knife 45')
          parse ("speedmod -10")
     end
     if (txt=="!bot_skill 2") then
          parse ('bot_weapons 0')
          parse ('mp_wpndmg knife 45')
          parse ("speedmod 0")
     end
     if (txt=="!bot_skill 3") then
          parse ('bot_weapons 0')
          parse ('mp_wpndmg knife 45')
          parse ("speedmod 110")
     end
     if (txt=="!bot_skill 4") then
          parse ('bot_weapons 6')
          parse ('mp_wpndmg knife 45')
          parse ("speedmod 150")
     end
end


PS : problem, everyone has the same speed.
20.08.17 09:38:18 pm
Up
SQ
Moderator
Offline Off
You have missed speedmod player id argument.
To the start Previous 1 Next To the start