A binocular scouting idea!
Moderator: Moderators
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?)
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?)

-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
No. The server crashes was due to an error in the ubersound workaround. This is unrelated to the scout mod.Jb wrote:1. It wont crash a ded will it?
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. ).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?)
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.
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
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.........
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.........

-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
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:But a stock outta the box map can't have scout?
Yes it is.Jb wrote:Since this mod isnt server side.
No you don't, see above.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?
Yes.Jb wrote:OR am i waaaaaaaay off.
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
Jv... can you help me with a bit of vector maths please?
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...
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) 0What 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...
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
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?

( 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?
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
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:
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
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:
...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 ):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)
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! :)
endTHERE 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
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:

