PDA

View Full Version : Where is the code for weapons?


ROFL 451
23rd Feb 2004, 03:54 PM
In the System folder? I would like to view the Bio Rifle code, but can't seem to find it. . .

Donator
23rd Feb 2004, 05:41 PM
open google, search for a file called "ut2003-2225-source.zip", that's what you want. Extract and look in the xWeapons folder.

ROFL 451
23rd Feb 2004, 07:30 PM
open google, search for a file called "ut2003-2225-source.zip", that's what you want. Extract and look in the xWeapons folder.

Ah, thank you very much, Donator.

Do I need to open them with a certain program?

ROFL 451
23rd Feb 2004, 07:51 PM
Can I simply modify the Bio-Rifle code? Because my weapon is quite similar to the Bio-Rifle for the fact that it creates something that appears on the ground, and hurts you if you run over it. I used the "BioRiflePickup" code for this, a modified it to my hopeful specifications. . .(Note, some of this stuff isn't finished, so I just put a name in there.) [example: lava and lava2]

class LavaCasterPickup extends UTWeaponPickup;

static function StaticPrecache(LevelInfo L)
{
L.AddPrecacheMaterial(Texture'XEffects.lava2');
L.AddPrecacheMaterial(Texture'XEffects.lava');
L.AddPrecacheMaterial(Texture'XGameShaders.lava_flash');
L.AddPrecacheStaticMesh(StaticMesh'WeaponStaticMesh.LavaCasterPickup');
}

simulated function UpdatePrecacheMaterials()
{
Level.AddPrecacheMaterial(Texture'XEffects.lava2');
Level.AddPrecacheMaterial(Texture'XEffects.lava');
Level.AddPrecacheMaterial(Texture'XGameShaders.lava_flash');
}

defaultproperties
{
InventoryType=class'LavaCaster'

PickupMessage="You got the Lava Caster"
PickupSound=Sound'PickupSounds.FlakCannonPickup'
PickupForce="FlakCannonPickup" // jdf

MaxDesireability=+0.75

StaticMesh=StaticMesh'WeaponStaticMesh.LavaCasterPickup'
DrawType=DT_StaticMesh
DrawScale=0.7
}


Should I make a custom icon for it, or just leave the Bio-Rifle one? If I need ot keep the Bio Rifle icon, tell me where to keep/leave it alone.

soldat
26th Feb 2004, 08:28 PM
you can extend off biorifle classes, or create a new weapon class similar to the bio rifle class, yes.

hmm... if you've never made a ut2003 weapon before, you may want to check out tutorials... just to get the basics, learn how to compile, etc.

wiki tutorials (http://wiki.beyondunreal.com/wiki/UnrealScript_Lessons) and the rest of that site are a great reference.

wotGREAL is also a good editor, esp if you are just starting.

here's how i set up:

make a folder under ut2003 called lavacaster

in this folder, have a Classes folder, and other folders if neccesary (texture, sound).

so your folder structure will look like:

ut2003\lavacaster\classes

put all of your relevant *.uc files in here. then, create a batch file, called "compile.bat". in this batch file, have the following lines.


cd..
cd..
cd system
del lavacaster.u
ucc make
if [%1] == [1] goto end
pause
:end

finally, edit ut2003.ini, look under "editpackages=" and add this:

editpackages=lavacaster

you also may want to have a shortcut to ut2003 in the classes folder along with the batch file and your uc files.

ROFL 451
27th Feb 2004, 02:10 PM
you can extend off biorifle classes, or create a new weapon class similar to the bio rifle class, yes.

hmm... if you've never made a ut2003 weapon before, you may want to check out tutorials... just to get the basics, learn how to compile, etc.

wiki tutorials (http://wiki.beyondunreal.com/wiki/UnrealScript_Lessons) and the rest of that site are a great reference.

wotGREAL is also a good editor, esp if you are just starting.

here's how i set up:

make a folder under ut2003 called lavacaster

in this folder, have a Classes folder, and other folders if neccesary (texture, sound).

so your folder structure will look like:

ut2003\lavacaster\classes

put all of your relevant *.uc files in here. then, create a batch file, called "compile.bat". in this batch file, have the following lines.


cd..
cd..
cd system
del lavacaster.u
ucc make
if [%1] == [1] goto end
pause
:end

finally, edit ut2003.ini, look under "editpackages=" and add this:

editpackages=lavacaster

you also may want to have a shortcut to ut2003 in the classes folder along with the batch file and your uc files.

Oh yeah, and I use UnrealWiki for lots of stuff, great site. But how do I create .u, .uc, and .ini files?

How do i create a batch file?

Donator
27th Feb 2004, 03:18 PM
You might want to grab a little programm called "UMake", that will save you LOTS of compiling troubles, in fact reducing the amount of work to a right click and select...

And the easiest way to create a .uc file is to create a normal text file in notepad and just alter the .txt extension to .uc, UMake will then compile your code to .u format.

ROFL 451
27th Feb 2004, 09:08 PM
You might want to grab a little programm called "UMake", that will save you LOTS of compiling troubles, in fact reducing the amount of work to a right click and select...

And the easiest way to create a .uc file is to create a normal text file in notepad and just alter the .txt extension to .uc, UMake will then compile your code to .u format.

Actually, I have UMake. Was reccomended by Wiki.

Thanks for your help soldat and donator!