Page 1 of 1

how do i add the Ray gun

Posted: May 13th, 2011, 4:55 pm
by steveuk
how do i add the Ray gun from zombie map to a normal map????
I want to add this a a secret weapon in a secret location of my map...
No im not making a zombie map, just a jump map.

found this code, but not sure where to add it, if i need to make a new GSC file or what.??


doRayGun()
{
self takeAllWeapons();
self giveWeapon("uzi_mp", 0, self calcWeaponOptions(3, 0, 0, 0, 0));

self endon("death");
self endon("disconnect");
while(1)
{
self waittill("weapon_fired");
if(self getCurrentWeapon() != "uzi_mp")
continue;

soundEnt = spawn("script_model", self getAim());
soundEnt playSoundAsMaster("mpl_kls_artillery_impact");
{
for(x = -1; x < 1; x+=0.25)
{
for(y = -1; y < 1; y+=0.25)
{
for(z = -1; z < 1; z+=0.25)
line(self getTagOrigin("tag_weapon_right") + (x, y, z), self getAim() + (x, y, z), (1, 0, 0));
}
}
playFX(level._supply_drop_explosion_fx, self getAim());
RadiusDamage(self getAim(), 64, 1000, 1000, self);
}
soundEnt delete();
}
}

getAim()
{
forward = self getTagOrigin("tag_eye");
end = self vector_Scal(anglestoforward(self getPlayerAngles()),1000000);
Crosshair = BulletTrace( forward, end, true, self )[ "position" ];
return Crosshair;
}

vector_scal(vec, scale)
{
vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
return vec;
}


ive also found the Ray-gun and placed it into the IWD file weapons, and repacked it, but it is not being shown in the weapons list.??? So how do i add the Raygun to the map, and do i need scripting to use the raygun i hope not as this scripting is doing my head in...lol

Image

Re: how do i add the Ray gun

Posted: May 28th, 2011, 5:52 pm
by Nekoneko
Would be epic to see that in cod4
Ive seen a video of some guy perfectly importing all weapons from cod7 to cod4.

And making your own weapon is quite easy.
Open up AssMan and open weaponsettings.gdt (I tihnk) in source data, make a new entry or copy an existing then convert it.
It should be in radiant now.
To be able to use it, you need to compile the weapon file, so add weapon,ray_gun to your csv and you must have it placed in your map (if youre trying to give it per script).

Re: how do i add the Ray gun

Posted: May 28th, 2011, 6:40 pm
by Opel
Just adding it in the iwd isnt going to work. If it's from codWAW to cod4 then you will need to get the model from cod5 and convert it, then re-rig the model for use in cod4 via maya.

Re: how do i add the Ray gun

Posted: May 30th, 2011, 10:26 am
by Mooselflies
wrong hit me up on xfire : comeownme

i'll do it for you

Re: how do i add the Ray gun

Posted: May 30th, 2011, 12:36 pm
by steveuk
Mooselflies wrote:wrong hit me up on xfire : comeownme

i'll do it for you
ok thanks, i have the model already on my radiant, i can install it on my map, but it static, you cant pick it up or use it as a normal weapon, i want to be able to pick it up and use it,fire it
can you help and do this for me, tell me what to do in gettin to pick it up and use it..
Send me any scrips that i may have to use,ect, and tell me where to put the scripst,ect

i have it as weapon_raygun in Xmodel folder