Hunt2Bots

Please use this forum to ask all your MoHAA Bots questions / discussions

Moderator: Moderators

BiG_HeaD
Brigadier General
Posts: 531
Joined: Thu Jul 03, 2003 7:28 pm

Hunt2Bots

Post by BiG_HeaD »

Hey, Im not sure if you have aplyed my Hunt2 map, but i have created bot
support for it. I have also fixed many things to make the map better.
ANyway, i need your help with the .scr for Small_sumo's tutorial: "Busy"

The Playing card bots and the repairmen arent doing anything :(

Please Look at my .scr and tell me what iv done wrong:


main:
level waittill prespawn

$world farplane 8100
$world farplane_color (.333 .333 .329)
$hungryguy thread global/eat.scr::eating
$wrenchguy4 thread worker2
$wrenchguy5 thread worker1

exec global/DMprecache.scr

level.script = maps/obj/objtest.scr
exec global/ambient.scr m4l1


worker2:

self holster
while (self.thinkstate == "idle")
{
self anim truckworker2
wait 0.5

}
self unholster
self attackplayer
end

worker1:

self holster
while (self.thinkstate == "idle")
{
self anim truckworker1
wait 0.5

}
self unholster
self attackplayer


exec global/door_locked.scr::lock

setcvar "g_obj_alliedtext1" "Go2Town"
setcvar "g_obj_alliedtext2" "KillSumAxis"
setcvar "g_obj_alliedtext3" "FindtheBomb"
setcvar "g_obj_axistext1" "- Prevent Allies from"
setcvar "g_obj_axistext2" "destroying the Flak88's"
setcvar "g_obj_axistext3" "MadeBy BiG_HeaD"
setcvar "g_scoreboardpic" "Hunt2 By BiG_HeaD"

level waittill spawn
$mybomb thread global/jv_obj_dm.scr::bomb_thinker

level.bomb_damage = 200
level.bomb_explosion_radius = 640
level.defusing_team = "axis"
level.planting_team = "allies"
level.targets_to_destroy = 1
level.dmrespawning = 1 // 1 or 0
level.dmroundlimit = 15 // round time limit in minutes
level.clockside = axis // set to axis, allies, kills, or draw





$flak88_explosive1 thread global/jv_obj_dm.scr::bomb_thinker

waitthread global/jv_bots/jv_mp_ai.scr::enable


$flak88_explosive1 thread axis_win_timer
thread allies_win_bomb

$bomb thread global/jv_obj_dm.scr::bomb_thinker

end

//*** --------------------------------------------
//*** "Axis Victory"
//*** --------------------------------------------

axis_win_timer:

level waittill axiswin

end

//*** --------------------------------------------
//*** "Allied Victory"
//*** --------------------------------------------

allies_win_bomb:

while(level.targets_destroyed < level.targets_to_destroy)
waitframe

teamwin allies




Thanx if you can help.
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post by Alcoholic »

Where's the code for playing card bots?

Your script looks kind of awkward to me. The wrench guys thread the worker threads, but later on, the whole prespawn stage automacally pours into those threads (because there is no end to stop it). since those threads can be run by themselves, you should put them at the bottom of your script instead of up in the prespawn stage. And im not sure if that truckworking anim is a real anim. What should work in your thread would be this:

Code: Select all

worker:

println "Starting work"
self holster
self anim working_wrench_pullout
self waittill animdone
while (self.thinkstate == "idle")
{
    println "working..."
    self anim working_wrenching
    self waittill animdone
}

self.gun = "Walter p38"
println "homer angry! HOMER SMASH!"
self unholster
end
you can remove the println's if you want. :wink:
BiG_HeaD
Brigadier General
Posts: 531
Joined: Thu Jul 03, 2003 7:28 pm

Post by BiG_HeaD »

hey man, umm Im not sure about anything you desribed(just not good with scr.) so, what do i add, and take to the bottom?
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post by Alcoholic »

delete your worker1 and worker2 threads. add an "end" to the very bottom of your script.

change

$wrenchguy4 thread worker2

to

$wrenchguy4 thread worker

and

$wrenchguy5 thread worker1

to

$wrenchguy5 thread worker


now copy everything that is in "code", and paste it under the end i wanted you to type.

Code: Select all

worker: 

println "Starting work" 
self holster 
self anim working_wrench_pullout 
self waittill animdone 
while (self.thinkstate == "idle") 
{ 
    println "working..." 
    self anim working_wrenching 
    self waittill animdone 
} 

self.gun = "Walter p38" 
println "homer angry! HOMER SMASH!" 
self unholster 
end

and you DO have guys in your map targetnamed wrenchguy4 and 5 right?
BiG_HeaD
Brigadier General
Posts: 531
Joined: Thu Jul 03, 2003 7:28 pm

Post by BiG_HeaD »

Works GREAT!

1 down, 2 to go. Next: The man eating, hes not doing anything but standing on the table. What should i do about that?
User avatar
Daniel_NAD
Sergeant
Posts: 51
Joined: Sat Jun 28, 2003 4:25 pm
Location: UK
Contact:

Post by Daniel_NAD »

The hunt with bots?




:D
If a job is worth doing then it's worth doing well!
Image
BiG_HeaD
Brigadier General
Posts: 531
Joined: Thu Jul 03, 2003 7:28 pm

Post by BiG_HeaD »

im way past that now :)
User avatar
Daniel_NAD
Sergeant
Posts: 51
Joined: Sat Jun 28, 2003 4:25 pm
Location: UK
Contact:

Post by Daniel_NAD »

So when can we see it? :lol:
If a job is worth doing then it's worth doing well!
Image
BiG_HeaD
Brigadier General
Posts: 531
Joined: Thu Jul 03, 2003 7:28 pm

Post by BiG_HeaD »

church still underway, over 75% finished.
User avatar
Daniel_NAD
Sergeant
Posts: 51
Joined: Sat Jun 28, 2003 4:25 pm
Location: UK
Contact:

Post by Daniel_NAD »

please post when it's done....

Any guess on date for release
If a job is worth doing then it's worth doing well!
Image
BiG_HeaD
Brigadier General
Posts: 531
Joined: Thu Jul 03, 2003 7:28 pm

Post by BiG_HeaD »

realease date is soon. Cant Work on it too long, football practice and my life get in the way. Hopefully very very soon :) dont worry, i will let everyone know :)
Krane
Lieutenant General
Posts: 782
Joined: Sat May 31, 2003 4:18 pm
Location: California, USA
Contact:

Post by Krane »

I think the eat.scr is not shipped w/ the game, it's a small_sumo scr from 1 of his maps. So make sure you have this script somewhere.
BiG_HeaD
Brigadier General
Posts: 531
Joined: Thu Jul 03, 2003 7:28 pm

Post by BiG_HeaD »

waiting on script help-then release is final.
Ive played more than u.
Krane
Lieutenant General
Posts: 782
Joined: Sat May 31, 2003 4:18 pm
Location: California, USA
Contact:

Post by Krane »

Did you finished the church?
Image
BiG_HeaD
Brigadier General
Posts: 531
Joined: Thu Jul 03, 2003 7:28 pm

Post by BiG_HeaD »

yeah, sure did. Looks Cool Too. I just need to fix the script, and dont know how for the map itself. Jv-bot tried, but explained it in nerdy terms, and i couldnt understand him.. do you know anything about script.
Ive played more than u.
Post Reply