Page 3 of 4
Posted: Thu Aug 07, 2003 2:35 am
by Jb
SO......
Village idiot here <-----
I want to put this on our dedicated server.
Questions
It worked well in a server we created but!
1. It wont crash a ded will it?
2. Is there anyway we can get the scout mod to work on regualr maps.
(is it simple(lol) scripting) or (does the mod have to be made specifically for the map?)
Posted: Thu Aug 07, 2003 12:03 pm
by Bjarne BZR
Jb wrote:1. It wont crash a ded will it?
No. The server crashes was due to an error in the ubersound workaround. This is unrelated to the scout mod.
Jb wrote:2. Is there anyway we can get the scout mod to work on regualr maps.
(is it simple(lol) scripting) or (does the mod have to be made specifically for the map?)
Yes you can. You must update the script of the specific map to make it work. The readme file explains how. The user-rjukanproject_scout.pk3 and readme are included in the "Vemork aproach 1.0" download. ( No separate download yet. ).
Here is the part of the readme that explains insertion into any MP map:
Readme wrote:>>>>>>>>>>>> INSTALLATION <<<<<<<<<<<<
--------------------------------------------------------------
- To give your multiplayer maps players the ability to scout,
here is what you have to do:
1) Put user-rjukanproject_scout.pk3 in the <MOHAA>/main
folder.
2) Insert this line in your main method(before roudstart):
exec global/rjukanproject_scout.scr
3) Insert this method last in your script(outside of main):
clickitem_fail:
exec global/rjukanproject_scout.scr::binocular_fire
end
4) Done! Lets scout them out!
- By default an instructional message is written on the
players screens about every 15:th time the map runs(not
very often).
This can be changed by adding a number to the execution
statement of stage 2) above.
Like this:
exec global/rjukanproject_scout.scr <A_number>
If you want the message to be more frequent, replace
<A_number> with a number less than 15 (Ex: The value 5 will
print the message every 5:th time the map runs).
The message can't be disabled completely, but using a value
of, say 1000 will make the message rather infrequent.
- Use the scout mod Logo in your loading screen if you want to
inform the players that the mod is included. The file
'scout_mod.tga' is a 32 bit 290*160 targa image. It is
rather large to allow resizing to fit your particular needs.
Posted: Thu Aug 07, 2003 9:25 pm
by Alcoholic
or better yet, you can modify a commonly used script file in just about all of those maps, like ambient.scr, and just add a line to exec your script.
Posted: Thu Aug 07, 2003 10:58 pm
by Bjarne BZR
No Alcoholic, I'm afraid not, as a method named "clickitem_fail" is required to be located in the map script itself...
Posted: Fri Aug 08, 2003 1:07 am
by Alcoholic
hey thats cool so it searches for a thread in the map script? i thought your script was external, and just needed to be exec'd

Posted: Fri Aug 08, 2003 1:41 am
by Jb
I'm sorry i meant stock maps.
Like the ones shipped w/ game.
I understand how to open up a pk3 and mess with a script on custom Mp maps.
But a stock outta the box map can't have scout?
Since this mod isnt server side. Even if i did open up the stock map I would have to reship the map to all players that wanted to play?
OR am i waaaaaaaay off.
::reminder i know jack s**t about scripting.::
Still struggling with mapping.........
Posted: Fri Aug 08, 2003 6:22 am
by jv_map
Jb wrote:OR am i waaaaaaaay off.
I'm sorry but I think that is the case here

Posted: Fri Aug 08, 2003 12:02 pm
by Bjarne BZR
Jb wrote:But a stock outta the box map can't have scout?
Not outta the box, no. But if you edit the scripts of the original maps on the server side (pak5.pk3 i think) like I describe in the readme file, everyone will get the Scouting ability (also the ones without the user-rjukanproject_scout.pk3).
Jb wrote:Since this mod isnt server side.
Yes it is.
Jb wrote:Even if i did open up the stock map I would have to reship the map to all players that wanted to play?
No you don't, see above.
Jb wrote:OR am i waaaaaaaay off.
Yes.

Posted: Sat Aug 09, 2003 7:31 am
by Jb
DANKE!
Posted: Sat Aug 09, 2003 11:24 am
by Bjarne BZR
ZU BEFEHL!

Posted: Sun Aug 10, 2003 4:37 pm
by Bjarne BZR
Jv... can you help me with a bit of vector maths please?
Code: Select all
local.fwd_vec = angles_toforward self.viewangles
local.start = self gettagposition "Bip01 Head"
local.hit_location = trace (local.start + local.fwd_vec * 64) (local.start + local.fwd_vec * $world.farplane) 0
The thing is this: For some strange reason, the tag position of "Bip01 Head" seems to be different on different maps ( No idea why, but thats the reason that scouting will not currently work as it should on "V2", but perfectly on "The Hunt" ).
What I need is to move the local.start vector about, say, 1/2 meters in front of the scouting player and start the sight trace from there. I thought this was the local.fwd_vec * 64 portion of the code, but as it had no effect to set local.fwd_vec * 600, I started to wonder...
Posted: Sun Aug 10, 2003 5:48 pm
by jv_map
Yup that's what it's supposed to do

Where does it calculate the impact location on V2? Right near the scouting player?
Posted: Sun Aug 10, 2003 8:29 pm
by Bjarne BZR
Yes, like this: ( I drew beams between the coordinates )

( The one farthest away is as far away as the axis player ( for scale ) ).
On hunt and omaha the beams are drawn as expected, but on V2 and some DM maps, the scout seems to "shoot himself in the back of the head".
So you are saying that an increase of the "64" value should be enough? Hmmmm... maby I changed the wrong script... ( one not in main global ) It has happened before
The "64" IS world units, right?
Posted: Sun Aug 10, 2003 9:20 pm
by Bjarne BZR
Done some more testing:
After some manipulation I got this strange readings from console ( as you can see I used the coord, face and tele commands to place myself in a position and heading that is easyer to count with ) after making a "shot" with the binoculars:
console wrote:location: 2700.00 700.00 -419.88
angles: 0.00 90.00 0.00
(use 'tele' or 'face' to set)
[SCOUTING]: Drawing beam from (2701.854980, 712.202698, -348.295166) to (2701.854980, 715.125000, -348.295166)
[SCOUTING]: Binocular target: (2701.854980, 715.125000, -348.295166)
...considering that this is the code that decides the start and end of the trace, I find this strange ( And it suggests I really have no idea what I'm doing or what is actually happening here ):
Code: Select all
binocular_fire:
local.fwd_vec = angles_toforward self.viewangles
local.start = self gettagposition "Bip01 Head"
local.hit_location = trace (local.start + local.fwd_vec * 1024) (local.start + local.fwd_vec * $world.farplane) 0
local.ent = spawn script_origin origin local.hit_location
if ( level.rjukanproject_scouting_debug ) {
println "[SCOUTING]: Drawing beam from " local.start " to " local.hit_location
local.beam = spawn func_beam origin local.start endpoint local.hit_location maxoffset 0
local.beam doActivate
local.beam color (1 0 0)
local.beam commanddelay 2 remove
}
println "[SCOUTING]: Binocular target: " local.hit_location
if ( $player.size > 1 ) {
for(local.i = 1; local.i <= $player.size; local.i++) {
local.player = $player[local.i]
println "[SCOUTING]: ********** player" local.i ": " local.player " *********"
if(self != local.player) {
println "[SCOUTING]: Player is not me"
println "[SCOUTING]: Game type is " level.the_gametype
if(level.the_gametype == 1) {
if(local.ent isTouching local.player) {
thread light_up_green self local.player
break
}
} else {
println "[SCOUTING]: Target is " local.player.dmteam "(I'm " self.dmteam ")"
if(self.dmteam != local.player.dmteam) {
if(local.ent isTouching local.player) {
thread light_up_dynamic self local.player
break
}
}
}
}
}
}
local.ent immediateremove // do it! do it now! :)
end
Wait!
THERE IS NO FARPLANE ON V2!!!!!!!!!
I fell into your "blind bots" hole jv!
I'm counting on the farplane to be set... if its not... then someting goes wack..........
Still does not explain why it works sometimes.... YES it does! The beam is not drawn FROM the player! It is drawn TOWARDS him.... 1024 worldunits is a lot, so it only considers it a hit if it hits something on the way BACK from 1024 units away! Wohoo!!!! I solved it! ( I hope

)
....OK, lets settle down here and convert this eureka ino a working script

Posted: Sun Aug 10, 2003 11:01 pm
by Bjarne BZR
Sorry for spam-posting in my own thread, but this eureka has resulted in a new version that hadles all maps ( whatever the farplane value ).
Read all about it here: /forum/viewtopic.php?t=4720