Page 1 of 2
plane mod "admin-pro 1.0" with bot maps
Posted: Tue Nov 01, 2005 7:05 pm
by proximo
I try the plane mod "admin-pro 1.0? with bot maps and i can not
kill the bots with a plane, also bots where not able to damage planes.
By making (in the script) planes "solid" bots can now damage planes, but
i still have a problem to kill bots with a planes.
can somebody help me.
Posted: Tue Nov 01, 2005 8:10 pm
by Rookie One.pl
You have to make some changes in Admin Pro itself. It only deals damage to players by default.
Posted: Wed Nov 02, 2005 5:54 pm
by proximo
Rookie One.pl wrote:You have to make some changes in Admin Pro itself. It only deals damage to players by default.
Thanks i now that, but i don't now what to change?
Posted: Wed Nov 02, 2005 6:09 pm
by Rookie One.pl
In server_planes/damage.scr you've got this:
Code: Select all
checkhit local.place:
self thread mgeffect local.place
for(local.i = 1; local.i <= $player.size; local.i++)
{
local.player= $player[local.i]
if(local.player!=self && local.player != NIL)
{
local.end_or_not = waitthread team_check local.player self
if(local.end_or_not==1)
{
end //end if same team and team team killing is not on
}
if(local.player.flying==1)
{
if(local.player.plane.scale == .75)
{
local.hitvec = local.place - local.player.plane.origin
local.hitvec_fwd = local.hitvec * local.player.plane.forwardvector
local.hitvec_lf = local.hitvec * local.player.plane.leftvector
local.hitvec_up = local.hitvec * local.player.plane.upvector
local.is_hit_fwd = (abs local.hitvec_fwd) <= 200.0
local.is_hit_lf = (abs local.hitvec_lf) <= 200.0
local.is_hit_up = local.hitvec_up >= 0.0 && local.hitvec_up <= 35.0
local.damage = 20
}
else
{
local.hitvec = local.place - local.player.plane.origin
local.hitvec_fwd = local.hitvec * local.player.plane.forwardvector
local.hitvec_lf = local.hitvec * local.player.plane.leftvector
local.hitvec_up = local.hitvec * local.player.plane.upvector
local.is_hit_fwd = (abs local.hitvec_fwd) <= 120.0
local.is_hit_lf = (abs local.hitvec_lf) <= 120.0
local.is_hit_up = local.hitvec_up >= 0.0 && local.hitvec_up <= 15.0
local.damage = 30
}
}
else
{
local.hitvec = local.place - local.player.origin
local.hitvec_fwd = local.hitvec * local.player.forwardvector
local.hitvec_lf = local.hitvec * local.player.leftvector
local.hitvec_up = local.hitvec * local.player.upvector
local.is_hit_fwd = (abs local.hitvec_fwd) <= 32.0
local.is_hit_lf = (abs local.hitvec_lf) <= 32.0
local.is_hit_up = local.hitvec_up >= 0.0 && local.hitvec_up <= 92.0
local.damage = 45
}
if(local.is_hit_fwd && local.is_hit_lf && local.is_hit_up)
{
local.player damage self local.damage self.plane local.player.origin self.forwardvector (0 0 0) 10 1 18 -1
}
}
}
end
Change it to something like
Code: Select all
checkhit local.place:
self thread mgeffect local.place
for(local.i = 1; local.i <= $player.size; local.i++)
{
local.player= $player[local.i]
if(local.player!=self && local.player != NIL)
{
local.end_or_not = waitthread team_check local.player self
if(local.end_or_not==1)
{
end //end if same team and team team killing is not on
}
if(local.player.flying==1)
{
if(local.player.plane.scale == .75)
{
local.hitvec = local.place - local.player.plane.origin
local.hitvec_fwd = local.hitvec * local.player.plane.forwardvector
local.hitvec_lf = local.hitvec * local.player.plane.leftvector
local.hitvec_up = local.hitvec * local.player.plane.upvector
local.is_hit_fwd = (abs local.hitvec_fwd) <= 200.0
local.is_hit_lf = (abs local.hitvec_lf) <= 200.0
local.is_hit_up = local.hitvec_up >= 0.0 && local.hitvec_up <= 35.0
local.damage = 20
}
else
{
local.hitvec = local.place - local.player.plane.origin
local.hitvec_fwd = local.hitvec * local.player.plane.forwardvector
local.hitvec_lf = local.hitvec * local.player.plane.leftvector
local.hitvec_up = local.hitvec * local.player.plane.upvector
local.is_hit_fwd = (abs local.hitvec_fwd) <= 120.0
local.is_hit_lf = (abs local.hitvec_lf) <= 120.0
local.is_hit_up = local.hitvec_up >= 0.0 && local.hitvec_up <= 15.0
local.damage = 30
}
}
else
{
local.hitvec = local.place - local.player.origin
local.hitvec_fwd = local.hitvec * local.player.forwardvector
local.hitvec_lf = local.hitvec * local.player.leftvector
local.hitvec_up = local.hitvec * local.player.upvector
local.is_hit_fwd = (abs local.hitvec_fwd) <= 32.0
local.is_hit_lf = (abs local.hitvec_lf) <= 32.0
local.is_hit_up = local.hitvec_up >= 0.0 && local.hitvec_up <= 92.0
local.damage = 45
}
if(local.is_hit_fwd && local.is_hit_lf && local.is_hit_up)
{
local.player damage self local.damage self.plane local.player.origin self.forwardvector (0 0 0) 10 1 18 -1
}
}
}
for(local.i = 1; local.i <= level.lastbotid; local.i++)
{
local.player= level.actualbots[local.i]
if(local.player!=self && local.player != NIL)
{
local.end_or_not = waitthread team_check local.player self
if(local.end_or_not==1)
{
end //end if same team and team team killing is not on
}
local.hitvec = local.place - local.player.origin
local.hitvec_fwd = local.hitvec * local.player.forwardvector
local.hitvec_lf = local.hitvec * local.player.leftvector
local.hitvec_up = local.hitvec * local.player.upvector
local.is_hit_fwd = (abs local.hitvec_fwd) <= 32.0
local.is_hit_lf = (abs local.hitvec_lf) <= 32.0
local.is_hit_up = local.hitvec_up >= 0.0 && local.hitvec_up <= 92.0
local.damage = 45
if(local.is_hit_fwd && local.is_hit_lf && local.is_hit_up)
{
local.player damage self local.damage self.plane local.player.origin self.forwardvector (0 0 0) 10 1 18 -1
}
}
}
end
And change this:
Code: Select all
explode local.explosionplace:
thread bang local.explosionplace
local.radius = 200.00 * 200.00
for(local.i = 1; local.i <= $player.size; local.i++)
{
local.player= $player[local.i]
local.distance = (local.player.origin - local.explosionplace) * (local.player.origin - local.explosionplace)
//local.distance = local.distance * local.distance
if(local.distance <= local.radius)
{
if(local.player != self)
{
local.end_or_not = waitthread team_check local.player self
if(local.end_or_not==1)
{
end //end if same team and team team killing is not on
}
local.dmg_fact = 1 - local.distance / local.radius
local.dmg = 150 * local.dmg_fact + 30
local.player damage self local.dmg self (0 0 0) (0 0 0) (0 0 0) 0 1 15 -1
}
}
}
end
To this:
Code: Select all
explode local.explosionplace:
thread bang local.explosionplace
local.radius = 200.00 * 200.00
for(local.i = 1; local.i <= $player.size; local.i++)
{
local.player= $player[local.i]
local.distance = (local.player.origin - local.explosionplace) * (local.player.origin - local.explosionplace)
//local.distance = local.distance * local.distance
if(local.distance <= local.radius)
{
if(local.player != self)
{
local.end_or_not = waitthread team_check local.player self
if(local.end_or_not==1)
{
end //end if same team and team team killing is not on
}
local.dmg_fact = 1 - local.distance / local.radius
local.dmg = 150 * local.dmg_fact + 30
local.player damage self local.dmg self (0 0 0) (0 0 0) (0 0 0) 0 1 15 -1
}
}
}
for(local.i = 1; local.i <= level.botlastid; local.i++)
{
local.player= level.actualbots[local.i]
local.distance = (local.player.origin - local.explosionplace) * (local.player.origin - local.explosionplace)
//local.distance = local.distance * local.distance
if(local.distance <= local.radius)
{
if(local.player != self)
{
local.end_or_not = waitthread team_check local.player self
if(local.end_or_not==1)
{
end //end if same team and team team killing is not on
}
local.dmg_fact = 1 - local.distance / local.radius
local.dmg = 150 * local.dmg_fact + 30
local.player damage self local.dmg self (0 0 0) (0 0 0) (0 0 0) 0 1 15 -1
}
}
}
end
Hope this helps.

And I will tell Elgan to include this in the next version of AP.
Posted: Wed Nov 02, 2005 9:49 pm
by proximo
plane Rockets and bombs can now kill bots, but plane cal 30 an mg42 can
not kill bots.
thanks Rookie it whas almost right from the first time.
Posted: Thu Nov 03, 2005 1:50 pm
by Rookie One.pl
Are you sure you pasted the right code? Anyway, I told Elgan to look into this, hopefully the next version of AP will support jv_bots.

Posted: Thu Nov 03, 2005 4:29 pm
by Elgan
i cant see how this is has any bot thing in it? is the second loop for the bots? it has player :S?
Code: Select all
checkhit local.place:
self thread mgeffect local.place
for(local.i = 1; local.i <= $player.size; local.i++)
{
local.player= $player[local.i]
if(local.player!=self && local.player != NIL)
{
local.end_or_not = waitthread team_check local.player self
if(local.end_or_not==1)
{
end //end if same team and team team killing is not on
}
if(local.player.flying==1)
{
if(local.player.plane.scale == .75)
{
local.hitvec = local.place - local.player.plane.origin
local.hitvec_fwd = local.hitvec * local.player.plane.forwardvector
local.hitvec_lf = local.hitvec * local.player.plane.leftvector
local.hitvec_up = local.hitvec * local.player.plane.upvector
local.is_hit_fwd = (abs local.hitvec_fwd) <= 200.0
local.is_hit_lf = (abs local.hitvec_lf) <= 200.0
local.is_hit_up = local.hitvec_up >= 0.0 && local.hitvec_up <= 35.0
local.damage = 20
}
else
{
local.hitvec = local.place - local.player.plane.origin
local.hitvec_fwd = local.hitvec * local.player.plane.forwardvector
local.hitvec_lf = local.hitvec * local.player.plane.leftvector
local.hitvec_up = local.hitvec * local.player.plane.upvector
local.is_hit_fwd = (abs local.hitvec_fwd) <= 120.0
local.is_hit_lf = (abs local.hitvec_lf) <= 120.0
local.is_hit_up = local.hitvec_up >= 0.0 && local.hitvec_up <= 15.0
local.damage = 30
}
}
else
{
local.hitvec = local.place - local.player.origin
local.hitvec_fwd = local.hitvec * local.player.forwardvector
local.hitvec_lf = local.hitvec * local.player.leftvector
local.hitvec_up = local.hitvec * local.player.upvector
local.is_hit_fwd = (abs local.hitvec_fwd) <= 32.0
local.is_hit_lf = (abs local.hitvec_lf) <= 32.0
local.is_hit_up = local.hitvec_up >= 0.0 && local.hitvec_up <= 92.0
local.damage = 45
}
if(local.is_hit_fwd && local.is_hit_lf && local.is_hit_up)
{
local.player damage self local.damage self.plane local.player.origin self.forwardvector (0 0 0) 10 1 18 -1
}
}
}
for(local.i = 1; local.i <= $player.size; local.i++)
{
local.player= $player[local.i]
if(local.player!=self && local.player != NIL)
{
local.end_or_not = waitthread team_check local.player self
if(local.end_or_not==1)
{
end //end if same team and team team killing is not on
}
local.hitvec = local.place - local.player.origin
local.hitvec_fwd = local.hitvec * local.player.forwardvector
local.hitvec_lf = local.hitvec * local.player.leftvector
local.hitvec_up = local.hitvec * local.player.upvector
local.is_hit_fwd = (abs local.hitvec_fwd) <= 32.0
local.is_hit_lf = (abs local.hitvec_lf) <= 32.0
local.is_hit_up = local.hitvec_up >= 0.0 && local.hitvec_up <= 92.0
local.damage = 45
if(local.is_hit_fwd && local.is_hit_lf && local.is_hit_up)
{
local.player damage self local.damage self.plane local.player.origin self.forwardvector (0 0 0) 10 1 18 -1
}
}
}
end
u mean?
Code: Select all
checkhit local.place:
self thread mgeffect local.place
for(local.i = 1; local.i <= $player.size; local.i++)
{
local.player= $player[local.i]
if(local.player!=self && local.player != NIL)
{
local.end_or_not = waitthread team_check local.player self
if(local.end_or_not==1)
{
end //end if same team and team team killing is not on
}
if(local.player.flying==1)
{
if(local.player.plane.scale == .75)
{
local.hitvec = local.place - local.player.plane.origin
local.hitvec_fwd = local.hitvec * local.player.plane.forwardvector
local.hitvec_lf = local.hitvec * local.player.plane.leftvector
local.hitvec_up = local.hitvec * local.player.plane.upvector
local.is_hit_fwd = (abs local.hitvec_fwd) <= 200.0
local.is_hit_lf = (abs local.hitvec_lf) <= 200.0
local.is_hit_up = local.hitvec_up >= 0.0 && local.hitvec_up <= 35.0
local.damage = 20
}
else
{
local.hitvec = local.place - local.player.plane.origin
local.hitvec_fwd = local.hitvec * local.player.plane.forwardvector
local.hitvec_lf = local.hitvec * local.player.plane.leftvector
local.hitvec_up = local.hitvec * local.player.plane.upvector
local.is_hit_fwd = (abs local.hitvec_fwd) <= 120.0
local.is_hit_lf = (abs local.hitvec_lf) <= 120.0
local.is_hit_up = local.hitvec_up >= 0.0 && local.hitvec_up <= 15.0
local.damage = 30
}
}
else
{
local.hitvec = local.place - local.player.origin
local.hitvec_fwd = local.hitvec * local.player.forwardvector
local.hitvec_lf = local.hitvec * local.player.leftvector
local.hitvec_up = local.hitvec * local.player.upvector
local.is_hit_fwd = (abs local.hitvec_fwd) <= 32.0
local.is_hit_lf = (abs local.hitvec_lf) <= 32.0
local.is_hit_up = local.hitvec_up >= 0.0 && local.hitvec_up <= 92.0
local.damage = 45
}
if(local.is_hit_fwd && local.is_hit_lf && local.is_hit_up)
{
local.player damage self local.damage self.plane local.player.origin self.forwardvector (0 0 0) 10 1 18 -1
}
}
}
for(local.i = 1; local.i <= level.botlastid; local.i++)
{
local.player= level.actualbots[local.i]
if(local.player!=self && local.player != NIL)
{
local.end_or_not = waitthread team_check local.player self
if(local.end_or_not==1)
{
end //end if same team and team team killing is not on
}
local.hitvec = local.place - local.player.origin
local.hitvec_fwd = local.hitvec * local.player.forwardvector
local.hitvec_lf = local.hitvec * local.player.leftvector
local.hitvec_up = local.hitvec * local.player.upvector
local.is_hit_fwd = (abs local.hitvec_fwd) <= 32.0
local.is_hit_lf = (abs local.hitvec_lf) <= 32.0
local.is_hit_up = local.hitvec_up >= 0.0 && local.hitvec_up <= 92.0
local.damage = 45
if(local.is_hit_fwd && local.is_hit_lf && local.is_hit_up)
{
local.player damage self local.damage self.plane local.player.origin self.forwardvector (0 0 0) 10 1 18 -1
}
}
}
end
i dunno about adding the bot loops cos in normal play they are wasted:S, then aagin if no bots it wud just skip the loop.
Posted: Thu Nov 03, 2005 6:31 pm
by Rookie One.pl
Whoops, that's right.

I thought I fixed it as well. Yeah, it would skip it in normal play. I did it for FFE, just added a check before the loop:
Code: Select all
if (level.jvbot_jv_mp_ai_running == 1 && level.botlastid != NIL) // jv_bot support
Posted: Thu Nov 03, 2005 8:32 pm
by proximo
Rookie One.pl wrote:Whoops, that's right.

I thought I fixed it as well. Yeah, it would skip it in normal play. I did it for FFE, just added a check before the loop:
Code: Select all
if (level.jvbot_jv_mp_ai_running == 1 && level.botlastid != NIL) // jv_bot support
where do i put this line?
Posted: Thu Nov 03, 2005 8:42 pm
by Rookie One.pl
It's not really necessary. Elgan posted the fix, I'll fix my post as well in a moment.
<EDIT>Fixed, the stuff from my post should work now.

</EDIT>
Posted: Fri Nov 04, 2005 9:50 pm
by proximo
I replace the script in damage.scr with these from elgan and it
work (with a little lagging), but only when team damage his activate.
If team damage his not active only rockets and bombs kill bots.
I suppose you will improve it with the next release.
p.s. I used "?dmin-Pro_1.12_Beta" and "?dmin-Pro Client Menu"
Thanks for your help
Posted: Sat Nov 05, 2005 5:47 pm
by proximo
Sometimes game shutdown with error max_cvars:
Proximo blew up
MUSIC: changing from [ normal | normal ] to [ failure | normal ]
recursive error after: MAX_CVARS
Posted: Sat Nov 05, 2005 6:17 pm
by Elgan
what other mdos do you have?
Admin pro was made to combat max_cvars error using only 1 or 2 cvars depending on settings.
1 for admin_cmd
and 1 to store all the script on and off in 01 format:P
Posted: Sat Nov 05, 2005 10:25 pm
by proximo
Elgan wrote:what other mdos do you have?
Admin pro was made to combat max_cvars error using only 1 or 2 cvars depending on settings.
1 for admin_cmd
and 1 to store all the script on and off in 01 format:P
Only "blade menu" mod. I use it for the bot scorboard.
I removed "blade menu" mod and live only
"zMod_-_JV_Bot01_Update_Blade" and "zMod_-_JV_Bot01_Clients"
this include bot scorboard. the game crash somtimes without error message.
when i remove "zMod_-_JV_Bot01_Update_Blade"
and "zMod_-_JV_Bot01_Clients" the games do not crash.
It will be good to have your plane mod and bot scoreboard working
together.
Posted: Sat Nov 12, 2005 12:15 am
by proximo
i fixed a few bugs:
I fixed parachute
working now with botscoreboard
Now you can setup amount of damage a plane takes when shot by bots (any weapon)
in settings/flyable-planes.txt > "plane-bots-damage" "100"