PDA

View Full Version : Help Me!!!



legacy-sid
07-17-2003, 11:54 AM
Hello people!

Once again i'm seen sinking in to the quagmire of development.

I'm using the sega 500 tutorials to create a doorlock mechanism, where the player must pick up a key before they can use a door.

However I need the key to be displayed as my own custom static mesh in order to do this and reference the package, group and mesh correctly I need to utilise three levels (Pack.group.mesh) the sega 500 code uses 2 levels and doesn't seem to accept anything else.

Here's the code i'm using:

class CustomKeyPickup extends TournamentPickup;

defaultproperties
{
MaxDesireability=0.200000
InventoryType=Class'Sid.customInventoryKey'
PickupMessage="L2 Rapid Access Key Acquired!"
PickupSound=Sound'PickupSounds.AssaultAmmoPickup'
DrawType=DT_StaticMesh
StaticMesh=StaticMesh'XGame_rc.MonitorBMesh'
CollisionHeight=12.500000
}

I need the staticMesh variable to point to my static mesh for the key, therefore Key.Redkey.key but the compiler just throws an error and refuses to work

can anybody help?:cry: :cry: :cry:

legacy-Bonehed316
07-18-2003, 11:07 AM
if its not too late to help, i think the problem is where you placed the mesh of the key.

when compiling a mod like this, you can have the compiler import the mesh into your .u file by placing it in the "models" folder, inside your source code. just like a "classes" folder or a "textures" folder.

i did this with some jump boots i made. but i used lightwave. actually, i used max and had someone export it as an lwo file, because thats the type that UCC can import. except in your code, the key pickup is going to be

StaticMesh=StaticMesh'XGame_rc.MonitorBMesh'

see? youve got a monitor listed. not very useful for a key, lol. if you want UCC to import the model, it will have to be in lwo format, and placed in the models folder. also youll need a resource file, formatted like this:



class CustomKey_rc extends Resource;

#exec OBJ LOAD FILE=(your_texture_file).utx
#exec STATICMESH IMPORT FILE=Models\(your_key_model).lwo NAME=CustomKey

defaultproperties
{
}


im not an expert on coding, but i believe this is the right course of action.

legacy-Bonehed316
07-18-2003, 11:12 AM
for that matter, you can also import a texture like the mesh, lol. that way theres no external .utx file.

but the problem is, i think, that UCC doesnt like your usx package. OR UCC might need to load the package, like the code for the utx file up there, except formatted for .usx. that may be the problem. either way, i think you need a resource file. but again, im no expert.

what is the error it spits out?