Thanks jv. I'm very complex person but I'll try to make myself more "clear"

:
This is my actual russian_bots.scr:
Code: Select all
// RUSSIAN_BOTS
// by Krane
// mrkrane@hotmail.com
http://www22.brinkster.com/krane
waitthread checkbots
thread crazy_boris
thread recon_scout
thread recon_soldier
thread russian_corporal
end
//--------CHECK_JVBOTS (thread by jv_map)--------//
checkbots:
local.testbot = spawn human/multiplayer_allied_airborne_soldier.tik
if(local.testbot) // see if spawn command succeeded
{
level.botspk3inmain = 1
local.testbot remove
}
else
level.botspk3inmain = 0
end
//-----------BORIS----------//
crazy_boris:
if(level.botspk3inmain == 1)
{
local.boris = spawn script_model "targetname" "alliesspawnpreset"
local.boris model "models/human/multiplayer_allied_boris.tik"
local.boris solid
wait 1
iprintln "Crazy Boris is OK!"
}
else
{
wait 2
iprintln "Boris not ok"
}
end
//-----------RECONSCOUT----------//
recon_scout:
if(level.botspk3inmain == 1)
{
local.rscout = spawn script_model "targetname" "alliesspawnpreset"
local.rscout model "models/human/multiplayer_allied_russian_ReconScout.tik"
local.rscout solid
wait 1
iprintln "Recon Scout is OK!"
}
else
{
wait 2
iprintln "Scout not ok"
}
end
//-----------RECONSOLDIER----------//
recon_soldier:
if(level.botspk3inmain == 1)
{
local.rsoldier = spawn script_model "targetname" "alliesspawnpreset"
local.rsoldier model "models/human/multiplayer_allied_russian_ReconSoldier.tik"
local.rsoldier solid
wait 1
iprintln "Recon Soldier is OK!"
}
else
{
wait 2
iprintln "Soldier not ok"
}
end
//-----------CORPORAL----------//
russian_corporal:
if(level.botspk3inmain == 1)
{
local.rcorp = spawn script_model "targetname" "alliesspawnpreset"
local.rcorp model "models/human/multiplayer_allied_russian_corporal.tik"
local.rcorp solid
wait 1
iprintln "Corporal is OK!"
}
else
{
wait 2
iprintln "Corporal not ok"
}
end
Why using separate threads for each model? Cos this way, if you want only a particular model in your map, you can type in your map script:
exec global/russian_bots.scr::crazy_boris
And, if you want for ex. lots of boris, few scouts and no corporal or soldier, you can do like:
exec global/russian_bots.scr::crazy_boris
exec global/russian_bots.scr::crazy_boris
exec global/russian_bots.scr::recon_scout
I tested and seems to work fine. But, this way, the checkbots thread will NOT run, right? And we will not check if jvbots are in the main.
It's a minor issue, I will release this jvbot-mod-skin-pack the way it is (as long as others I already made while figuring out this problem

).
btw: Do you think I should live the messages there? I mean, "Boris OK" etc... That was just for testing purposes but sounds nice...What do ya think?
Cheers