creating maps
#5
(18 Jul 13, 04:55PM)Bukz Wrote: Alternatively you can throw it all together into a script so you only need to execute a single command:

[cubescript]botmodes = 7 // bot team deathmatch
botskills = good // good is default bot difficulty

custombotmap = [
if $numargs [
cstmap = $arg1

if (> $numargs 1) [
tmsize = $arg2
] [ tmsize = 0 ]

if (<= $tmsize 0) [
tmsize = 4
]

curtm = (curteam)

if (&& (! (strcmp $cstmap [])) (|| (= $curtm 0) (= $curtm 1))) [
addOnLoadOnce [
loop i 2 [
addnbot (- $tmsize (= $i $curtm)) (at [CLA RVSF] $i) $botskills
]
]
votemap $botmodes $cstmap
]
]
]

docident [custombotmap] [Loads a custom map in a bot mode, and automatically adds bots to it.];
docargument [M] [The map to use.] [] [0];
docargument [S] [The size for each team.] [4 would put four bots onto one team, and three bots onto the other team for an even match.][/cubescript]

where to type this code?
Thanks given by:


Messages In This Thread
creating maps - by ~sh00t{b} - 17 Jul 13, 12:11PM
RE: creating maps - by jamz - 18 Jul 13, 08:17AM
RE: creating maps - by ~sh00t{b} - 18 Jul 13, 08:26AM
RE: creating maps - by Bukz - 18 Jul 13, 04:55PM
RE: creating maps - by ~sh00t{b} - 18 Jul 13, 05:26PM
RE: creating maps - by Bukz - 18 Jul 13, 07:01PM
RE: creating maps - by ~sh00t{b} - 18 Jul 13, 08:27PM