Forum

> > CS2D > Maps/Editor > How to make Bots use buttons?
ForenübersichtCS2D-Übersicht Maps/Editor-ÜbersichtEinloggen, um zu antworten

Englisch How to make Bots use buttons?

11 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt How to make Bots use buttons?

Louie
User Off Offline

Zitieren
So im almost finished with a map im making but the Bots are a bit stupid,because my map has many spots where u have to press buttons for certain doors to open,but the Bots dont do that,they just wander the spawn area the only time they go out of the spawn area is if i open a door,then they will start going to the enemy spawn spot or some other place,how do i make Bots to open the doors for themselves?

alt Re: How to make Bots use buttons?

TimeQuesT
User Off Offline

Zitieren
Well you have to add it to the script located in the "bots" folder.
This is how you could make bots use buttons "intelligent":

1
2
3
4
5
6
7
8
9
10
11
12
13
Check for buttons in range
if found:
	Already used by another player/bot?
	yes:
		ignore
	no:
		Check trigger chain for deadly events. (Like env_explosion near the bot)
		if safe:
			goto the button and use it.
		else
			ignore
else
	Repeat this step

alt Re: How to make Bots use buttons?

Louie
User Off Offline

Zitieren
I copied and pasted the script to the Standard AI.lua file LOL but theres a problem now the bots wont even revive they just stay dead.

alt Re: How to make Bots use buttons?

_Yank
User Off Offline

Zitieren
@user Zeik: With the CS2D current API it is. The problem is that it is painful, boring and we can't make it much advanced....
1× editiert, zuletzt 17.12.14 15:36:18

alt Re: How to make Bots use buttons?

eledah
User Off Offline

Zitieren
1
2
3
4
local players = player(0, "table")
for _,id in pairs(players) do
	if (player(id, 'bot')) then ai_use(id) end
end

Not sure if it helps tho
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Maps/Editor-ÜbersichtCS2D-ÜbersichtForenübersicht