Forum

> > CS2D > Scripts > bot_skill 0 = no attack ?
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch bot_skill 0 = no attack ?

8 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt bot_skill 0 = no attack ?

LoaderFRA
User Off Offline

Zitieren
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

alt Re: bot_skill 0 = no attack ?

DC
Admin On Online

Zitieren
@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.
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.

alt Re: bot_skill 0 = no attack ?

LoaderFRA
User Off Offline

Zitieren
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)

alt Re: bot_skill 0 = no attack ?

DC
Admin On Online

Zitieren
Ooops! Okay sorry, didn't see that mp_wpndmg actually expects the name not the ID but glad to hear that it works now

alt Re: bot_skill 0 = no attack ?

LoaderFRA
User Off Offline

Zitieren
Now i use the text command, because i change the difficulty at will
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.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht