Video? I want to see how it looks
Video? I want to see how it looks
http://classic.xfire.com/video/62cecc/
message me if you want the code, some things must also be set in the game type script, the gunship menu must be added so the players can call the function (or simply use F3 to start it), sounds and soundaliases, effects and maybe even more.
Editted: I know that the ammo for the 25mm is not discounting - it's temporary for the tests. I'll also change the ammo hud color when current ammo goes under 1/3 of the max ammo.
Last edited by guiismiti; 25th September 2014 at 18:20.
kung foo man (25th September 2014),Ni3ls (25th September 2014)
I've been testing my mods now that I'm back, and I tested this gunship not as the user for the first time. I noticed the flashes go from the target to the shooter, and that looks really weird - the shots go from the ground to the pilot and beyond the ac130.
What is the syntax here? Maybe I can fix it.
Code:trace = bullettrace(point, point + forward, true, self);
set logfile 2
nope, just rotate your normal 180 degrees using a vectorscale with -1 as scale on it (in playfx)
"Does not work" is an error report for a bug between keyboard and chair.
All hail Artie Effem
guiismiti (7th June 2015)
After loosing most of my work, I only corrected this now.
In addition to IzNo's correction, I had also to change the source of the shot, by changing this
to thisCode:playfx(level._effect["ac25mm_tracer_flash"], trace["position"], normal);
Code:playfx(level._effect["ac25mm_tracer_flash"], startpoint, normal);
set logfile 2
Since xfire is going down, I'll just leave this here
https://www.youtube.com/watch?v=tzKUYd89_24
Any ideas on how to highlight other players for the gunship gunner only? I know that team icons show up for same team players only, but not sure if this is hardcoded or what...
Last edited by guiismiti; 10th June 2015 at 20:16.
set logfile 2
Not sure if you can use setTargetEnt() in COD2 MP, but in COD4, we did it with a waypoint:
The waypoint becomes "attached" to each player targeted, and follows them around.Code:ac130_AddtargetWaypoints( team ) { self.ac130_targetWaypoint = []; for( i = 0; i < level.players.size; i++ ) { player = level.players[i]; if( !isAlive( player ) ) continue; if( level.teambased && player.pers["team"] != team ) continue; waypoint = NewClientHudElem( self ); waypoint.x = 0; waypoint.y = 0; waypoint.z = 0; waypoint.archived = true; waypoint.alpha = 1.0; waypoint setShader( level.playerTargetShader, 8, 8 ); waypoint setWayPoint( true, level.playerTargetShader ); waypoint setTargetEnt( player ); self.ac130_targetWaypoint[self.ac130_targetWaypoint.size] = waypoint; } }
hi, i do it this way
here u can see it in action just use targetfinder gun or wait for acPHP Code:
init()
{
precacheshader("finder_icon");
}
markfounded(target,size)
{
scale = int(size);
//self endon("disconnect");
target_mark = newClientHudElem(self);
target_mark.x = target[0];
target_mark.y = target[1];
target_mark.z = target[2] + 28;
target_mark.archived = true;
target_mark.alpha = 1;
target_mark.color = (1,0,0);
target_mark setShader("finder_icon", scale, scale);
target_mark setwaypoint(true);
wait .05;
target_mark destroy();
}
canseeinview()
{
self endon("disconnect");
max_viewangle = 15;
if(isdefined(self.isbot))
if(self.isbot) return;
for(;;)
{
while(self playerads() == 1)//aim only
{
if (self getcurrentweapon() != "enfield_mp")//your gun
break;
players = getentarray("player", "classname");
for(f = 0; f < players.size; f++)
{
//wait .05;
player = players[f];
if(player == self )
continue;
//if((isdefined(player.pers["team"]) && player.pers["team"] == "spectator"))
//continue;
if (!isalive(player) ||player.sessionstate != "playing")
continue;
dist2 = vectornormalize(player.origin - self.origin);
vfwd = anglestoforward(self getplayerangles());
dot = vectordot(vfwd, dist2);
if (dot > 1)
dot = 1;
else if (dot < -1)
dot = -1;
viewangle = acos(dot);
if (viewangle > max_viewangle)
continue;
test = bullettracepassed(self geteye(),player geteye(),false,self);
if(test)
self thread markfounded(player.origin,8);
}
wait .05;
}
wait .05;
}
}
Server IP: 217.172.178.19:28979 (V1.2)
Last edited by vanfreddy; 11th June 2015 at 00:17.
guiismiti (11th June 2015)