Page 1 of 1

Tank Bot Jv_map

Posted: Thu Mar 11, 2004 9:37 am
by Klaus
Hi Jv_map :D

How I can make a simple tank bot to my map , have a tutorial or a prefab about this ??? :o
I tried to use stalingrad map to refence but without luck :oops:
Any help is welcome with credits on my first map with new ironsightrs :wink:

Byes

Klaus

Posted: Thu Mar 11, 2004 11:48 am
by M&M
check this post

it should help a little ,also be sure 2 check the 2nd page there is a link that has a tank also.
also check this site,it has a tut on how 2 make a singleplayer tank ,i think it should be simple 2 adapt 2 multiplayer(if u want it so) .it also has other useful video tuts and written tuts as well .
have fun scritping and mapping. :wink:

Posted: Thu Mar 11, 2004 3:14 pm
by jv_map
Try asking small_sumo :) he's the one that made the scripting for stalingrad 8-)

Posted: Fri Mar 12, 2004 3:43 am
by small_sumo
Yeah easy as pie bro download my abtf map or spr map and the map file is in the pk3 and the code is in the scrs, one global and also thread tanks and the threads that go with it. I am releasing a tut map soon with drivable vehecles and tank bots. So iether wait for that or just grab spr and copy paste your way to freedom FREEDOM!!

LOL


:shock:

Posted: Fri Mar 12, 2004 7:53 pm
by Klaus
Hi :D
small_sumo wrote:Yeah easy as pie bro download my abtf map or spr map and the map file is in the pk3 and the code is in the scrs, one global and also thread tanks and the threads that go with it. I am releasing a tut map soon with drivable vehecles and tank bots. So iether wait for that or just grab spr and copy paste your way to freedom FREEDOM!!

LOL


:shock:
Wow :shock: , When this tutorial will ready :D :?: :?: :?:

See Ya

Klaus

Posted: Sat Mar 13, 2004 2:44 am
by small_sumo
Well its half done or more and just needs finnishing, I will post here when its done. I am juggleing many projeacts at the moment.

Posted: Sun Mar 14, 2004 6:22 am
by Klaus
Hi SMALL_SUMO :P
small_sumo wrote:Well its half done or more and just needs finnishing, I will post here when its done. I am juggleing many projeacts at the moment.
I will wait for the tuts , no problem 8-)

Thanks

Klaus

Posted: Mon Mar 15, 2004 12:55 am
by small_sumo
I will work on it today.

Posted: Sat Nov 20, 2004 8:40 am
by Klaus
Hi Guys

Any news about tankbots tutorial ??? :oops:
Tutorial or little map example it's only I need :roll:

See Ya

Klaus

Posted: Sat Nov 20, 2004 9:19 am
by jv_map
What exactly do you want your tank(s) to do? Tank scripting is awesome and not very hard :)

Posted: Sat Nov 20, 2004 10:01 am
by Klaus
jv_map wrote:What exactly do you want your tank(s) to do? Tank scripting is awesome and not very hard :)
Hi Jv_Map :P

The idea is the tank shot me with canon and machine gun , like the stalingrad map . 8-)
It's very simple but not for me :oops:
Any simple map example is good for me :roll:

See Ya

Klaus

Posted: Sat Nov 20, 2004 2:48 pm
by small_sumo
Try no to be too scared of the stalingrad map, some of the gear for the tank is behind the shed nearby like the mg and the hidden ai that fires it, so make sure you copy those entities as well, get the path right and you will be goin orf.

I will paste the script you need below here for ya. Btw it isnt the most efficientr script around but it done in a way I can understand.

One more note the script does refer to soem global scripts you need them in your pak as well, also my ai or jv's at least.

Keep trying if you get it right from your own efforts it becomes yours ;)




**************************************************



level waittill prespawn ///////////////////////////////////////////////////////////////////////


thread get_zem_ready

level waittill spawn //////////////////////////////////////////////////////////////////////////


thread tanks


end // ************************************************

get_zem_ready:


$panzer_mg_gunner notsolid
$panzer_mg_gunner nodamage
$panzer_tankman nodamage
$panzer_tankman notsolid
$panzer_mg_gunner exec global/disable_ai.scr
$panzer_tankman exec global/disable_ai.scr
$panzer_mg_gunner hide

$panzer_chunk notsolid
$panzer_mg notsolid
$panzer_tankmanspot bind $panzer_chunk
$panzer_tankman glue $panzer_tankmanspot

$panzer_mg_spot bind $panzer_chunk
$panzer_mg glue $panzer_mg_spot
$panzergunnerspot bind $panzer_chunk
$panzer_mg_gunner glue $panzergunnerspot
$panzer_mg tracerFrequency 1
$panzer_chunk glue $panzer
$panzer.health = 700
$panzer.destroyed_model = "models/vehicles/panzer_iv_eud.tik"
$panzer.accuracy = 75
$panzer.shoottime = 0.5
$panzer.firedelay = 1.5

end // **************************************************

tanks:
// exec global/jv_mp_players.scr::main_player_handler

// $panzer_tankmanspot.origin = $panzer_tankmanspot.origin + ( 0 0 510 )
/*
$panzer_chunk notsolid
$panzer_mg notsolid
$panzer_tankmanspot bind $panzer_chunk
$panzer_tankman glue $panzer_tankmanspot

$panzer_mg_spot bind $panzer_chunk
$panzer_mg glue $panzer_mg_spot
$panzergunnerspot bind $panzer_chunk
$panzer_mg_gunner glue $panzergunnerspot
$panzer_mg tracerFrequency 1
$panzer_chunk glue $panzer
$panzer.health = 700
$panzer.destroyed_model = "models/vehicles/panzer_iv_eud.tik"
$panzer.accuracy = 75
$panzer.shoottime = 0.5
$panzer.firedelay = 1.5
*/
$panzer waitexec global/jv_mp_library.scr::tank_setup
$panzer.turret.targetlist = NULL
$panzer thread targeting
$panzer thread global/jv_mp_library.scr::think
while (level.roundstart != 1)
wait 2
thread driving_miss_daisy // global/jv_mp_library.scr::tank_drive_path $panzerroute 7
wait 1
// $panzer thread dontcrushbots
$panzer waittill death
wait 0.5
$panzer_destroyed thread getout

end //***************************************************

get_targets:
// find player targets
local.players = waitthread global/jv_mp_players.scr::get_active_players $player
local.enemy_players = waitthread global/jv_mp_players.scr::get_team_players local.players allies
local.enemy_players_inrange = waitthread global/jv_mp_players.scr::get_area_entities local.enemy_players self.origin self.maxrange

// find bot targets
local.j = 0
if(level.botlastid != NIL)
{
for(local.i = 1; local.i <= level.botlastid; local.i++)
{
local.bot = level.actualbots[local.i]
if(isAlive local.bot)
{
if(local.bot.dmteam == allies)
{
if(vector_within local.bot.origin self.origin self.maxrange)
{
local.j++
local.enemy_bots_inrange[local.j] = local.bot
}
}
}
}
}

for(local.i = 1; local.i <= local.enemy_players_inrange.size; local.i++)
local.targets[local.i] = local.enemy_players_inrange[local.i]

for(local.i = local.enemy_players_inrange.size + 1; local.i <= local.enemy_players_inrange.size + local.enemy_bots_inrange.size; local.i++)
local.targets[local.i] = local.enemy_bots_inrange[local.i]


end local.targets

targeting:
// panzer tank barrel targeting
while(self)
{
local.targets = waitthread get_targets

// ready!
self.turret.targetlist = local.targets
// self.mg.targetlist = local.targets // new

waitframe
}
end // *****************************************************

dontcrushbots:
while(isAlive self && self.driving)
{
if(level.botlastid != NIL)
{
for(local.i = 1; local.i <= level.botlastid; local.i++)
{
local.bot = level.actualbots[local.i]
if(self cansee local.bot 45 500)
{
// wait
//self modifydrive 0 20 256
while(self.driving && isAlive self && isAlive local.bot && self cansee local.bot 45 500)
{
self modifydrive 0 20 256
waitframe
}
if(self.driving && isAlive self)
self modifydrive self.speed 20 256
}
if !(self.driving && isAlive self)
break
}
}
waitframe
}
end //*****************************************************

// copied from vehicles_thinkers.scr

getout:


$panzer_tankman remove
$panzer_mg remove
$panzer_chunk remove
$panzer_mg_gunner remove


local.anims[0] = panzer_exit_1
local.anims[1] = panzer_exit_2
local.anims[2] = panzer_exit_3

local.name = self

wait 3
if (self.state != "open")
self anim open
wait 1
//self waittill animdone
if (self.state != "open")
{
self anim open_idle
self.state = "open"
}

//insert roberts random sorter here
exec global/randomorder.scr local.anims

for (local.i = 0; local.i < 4; local.i ++)
{
if ((randomint 100) <= 70)
{
if (local.anims[local.i])
{
waitthread tank_guy_spawn local.anims[local.i] local.name
}
}
}
end // ****************************************************

tank_guy_spawn local.type local.name:
println "z: spawning guy to get out " local.type

local.model_type = "models/human/sumo_german_wehrmact_soldier_2.tik"

local.ent = spawn local.model_type
local.ent.origin = self gettagposition "tag_start"
local.ent.angles = self gettagangles "tag_start"

local.ent noticescale 1
local.ent sight 4500
local.ent mindist 2024
local.ent maxdist 2448
local.ent leash 10000

if (level.dontdropweapons == 1)
local.ent dontdropweapons

local.ent exec global/disable_ai.scr
local.ent notsolid

println "z: starting anim: " local.name " " local.type
local.ent anim_noclip local.type
local.ent waittill animdone
println "z: ending anim: " local.name " " local.type


if (local.type == "panzer_exit_2")
local.ent.position = "crawl"
else if (local.type == "panzer_exit_3")
local.ent.health = 45

wait .4
println "z: making solid: " local.name " " local.type

local.ent solid


// wait 3
println "z: enabling AI: " local.name " " local.type

local.ent exec global/enable_ai.scr
end

Posted: Sun Nov 21, 2004 6:09 am
by Klaus
WoW , Thanks Small_Sumo for the info :) , I will try 8-)

See Ya

Klaus

Posted: Sun Nov 21, 2004 3:35 pm
by small_sumo
Tell us how you go mate.