problem with multiple routes????!

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

Moderator: Moderators

Post Reply
divaid
Corporal
Posts: 46
Joined: Fri Nov 21, 2003 10:27 am
Location: pesse (NL)
Contact:

problem with multiple routes????!

Post by divaid »

he,

I have mutiple routes in map that leads to a bomb. I have set 4 routes to the bomb, and I did it all corectly. the problem is, the bots will take all the routes, but not at the same time. for example, if one bot walks down the center route of my map, suddenly all the bots can't stop thinking of this route (lol) and all they do is take that specific route. Than, with any luck, another route is chosen and that route becomes the only route they run (???) :? can you plz help me (jv_map, small sumo?)

here's my script:

// Omaha w/bots
// ARCHITECTURE: Divaight
// SCRIPTING: Divaight
main:

// set scoreboard messages
setcvar "g_obj_alliedtext1" "- Take the beach!"
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" "- Verteidig der Strand!"
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""

setcvar "g_scoreboardpic" "none"

local.master = spawn ScriptMaster

local.master aliascache leadinmp1 sound/weapons/explo/Exp_LeadIn_06.wav soundparms 0.8 0.2 0.7 0.5 160 3000 auto loaded maps "m obj dm train"
local.master aliascache leadinmp2 sound/weapons/explo/Exp_LeadIn_07.wav soundparms 0.8 0.2 0.7 0.5 160 3000 auto loaded maps "m obj dm train"
local.master aliascache leadinmp3 sound/weapons/explo/Exp_LeadIn_08.wav soundparms 0.8 0.2 0.7 0.5 160 3000 auto loaded maps "m obj dm train"
local.master aliascache leadinmp4 sound/weapons/explo/Exp_LeadIn_09.wav soundparms 0.8 0.2 0.7 0.5 160 3000 auto loaded maps "m obj dm train"
local.master aliascache leadinmp5 sound/weapons/explo/Exp_LeadIn_10.wav soundparms 0.8 0.2 0.7 0.5 160 3000 auto loaded maps "m obj dm train"
local.master aliascache leadinmp6 sound/weapons/explo/Exp_LeadIn_11.wav soundparms 0.8 0.2 0.7 0.5 160 3000 auto loaded maps "m obj dm train"
local.master aliascache leadinmp7 sound/weapons/explo/Exp_LeadIn_12.wav soundparms 0.8 0.2 0.7 0.5 160 3000 auto loaded maps "m obj dm train"
local.master aliascache leadinmp8 sound/weapons/explo/Exp_LeadIn_13.wav soundparms 0.8 0.2 0.7 0.5 160 3000 auto loaded maps "m obj dm train"
local.master aliascache higgins_explode sound/weapons/explo/Explo_MetalMed1.wav soundparms 1.5 0.0 1.0 0.0 500 5000 weapon loaded maps "m obj dm train"

level waitTill prespawn

$world farplane 4500
$world farplane_color (0.360784 0.360784 0.360784)

//*** Precache Dm Stuff
exec global/DMprecache.scr

level.script = maps/dm/omaha.scr
exec global/ambient.scr omaha

thread global/exploder.scr::main

thread random_explode_start

level waittill spawn

$barb_bomb thread global/jv_obj_dm.scr::bomb_thinker
level.routelist[routes_to_shingle] = "route_east"::"route_west"::"route_center1"::"route_center2"
level.alliesbots = 20
level.axisbots = 0
level.dmrespawning = 1
waitthread global/jv_bots/jv_mp_ai.scr::enable

level.jvbot_weapon_priority["m1 garand"] = 45
level.jvbot_weapon_priority["springfield '03 sniper"] = 5
level.jvbot_weapon_priority["thompson"] = 40
level.jvbot_weapon_priority["bar"] = 10
level.jvbot_weapon_priority["shotgun"] = 0
level.jvbot_weapon_priority["high standard"] = 0
level.jvbot_weapon_priority["colt 45"] = 0
level.jvbot_weapon_priority["bazooka"] = 0
level.jvbot_weapon_priority["mauser kar 98k"] = 45
level.jvbot_weapon_priority["mauser kar 98d sniper"] = 5
level.jvbot_weapon_priority["mp40"] = 45
level.jvbot_weapon_priority["stg44"] = 5
level.jvbot_weapon_priority["walter p38"] = 0
level.jvbot_weapon_priority["panzerschrek"] = 0

level.defusing_team = "axis"
level.planting_team = "allies"
level.targets_to_destroy = 1
level.bomb_damage = 50
level.bomb_explosion_radius = 1000

// Set the parameters for round based match
level.dmrespawning = 1
level.dmroundlimit = 30
level.clockside = axis

level waittill roundstart

$barb_bomb thread global/obj_dm.scr::bomb_thinker
thread allies_win_bomb
$barb_bomb thread axis_win_timer
end

// Allied victory test

allies_win_bomb:
while(level.targets_destroyed < level.targets_to_destroy)
waitframe
teamwin allies
end

// Axis victory test

axis_win_timer:
level waittill axiswin
end


// --------------------------------------------
// Random Explosions
// --------------------------------------------

random_explode_start:

thread random_explode1
thread random_explode2
thread random_explode3
thread random_explode4
thread random_explode5
thread random_explode6
thread random_explode7
thread random_explode8

end

random_explode1:

wait (randomfloat 7 + 14)
$random_explode1_origin playsound leadinmp
wait 1
$random_explode1 anim start // uses animate fx_explosion_dirt
radiusdamage $random_explode1_origin 256 384
goto random_explode1

end

random_explode2:

wait (randomfloat 6 + 12)
$random_explode2_origin playsound leadinmp
wait 1
$random_explode2 anim start // uses animate fx_explosion_dirt
radiusdamage $random_explode2_origin 256 384
goto random_explode2

end

random_explode3:

wait (randomfloat 5 + 13)
$random_explode3_origin playsound leadinmp
wait 1
$random_explode3 anim start // uses animate fx_explosion_dirt
radiusdamage $random_explode3_origin 256 384
goto random_explode3

end

random_explode4:

wait (randomfloat 10 + 20)
$random_explode4_origin playsound leadinmp
wait 1
$random_explode4 anim start // uses animate fx_explosion_dirt
radiusdamage $random_explode4_origin 256 384
goto random_explode4

end

random_explode5:

wait (randomfloat 15 + 25)
$random_explode5_origin playsound leadinmp
wait 1
$random_explode5 anim start // uses animate fx_explosion_dirt
radiusdamage $random_explode5_origin 256 384
goto random_explode5

end

random_explode6:

wait (randomfloat 6 + 10)
$random_explode6_origin playsound leadinmp
wait 1
$random_explode6 anim start // uses animate fx_explosion_dirt
radiusdamage $random_explode6_origin 256 384
goto random_explode6

end

random_explode7:

wait (randomfloat 10 + 20)
$random_explode7_origin playsound leadinmp
wait 1
$random_explode7 anim start // uses animate fx_explosion_dirt
radiusdamage $random_explode7_origin 256 384
goto random_explode7

end

random_explode8:

wait (randomfloat 10 + 20)
$random_explode8_origin playsound leadinmp
wait 1
$random_explode8 anim start // uses animate fx_explosion_water
radiusdamage $random_explode8_origin 256 384
goto random_explode8

end
van Wassem entertainment© - entertainment on a degreement never imagined
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

This could be caused by the fact that I used randomint to make bots choose a random route. Some research however showed that randomint doesn't really produce a very random number :?.
Image
divaid
Corporal
Posts: 46
Joined: Fri Nov 21, 2003 10:27 am
Location: pesse (NL)
Contact:

Post by divaid »

okay jv_map, what should I do now? Because in the SVR-the last scene map you can see that bots choose mutiple routes at the same time. I really want that too? how??
van Wassem entertainment© - entertainment on a degreement never imagined
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

It won't get any better :cry:
Image
Post Reply