PDA

View Full Version : weapon pickup


luminosity
11th May 2006, 05:24 PM
i modelled a sword in max and exported in Unreal Ed.my sword model shows in the Animation Mesh browser.it also shows up in my weapons list.But i am not able to see it in my level . for that i copied the shieldgun pickup code and changed the code in deault prop to DrawType = DT_Mesh instead of DrawType=Dt_StaticMesh.but it did not do the job for me.What should i do so that i can see my sword in the level and later on i should be able to pick it up.

Thanks


the following is the code of my my sword

//code

class sword extends Weapon;
#exec MESH MODELIMPORT MESH=swordMesh MODELFILE=models\sword.PSK LODSTYLE=10
#exec MESH ORIGIN MESH=swordMesh X=0 Y=0 Z=0 YAW=-60 PITCH=-2.3 ROLL=0
#exec ANIM IMPORT ANIM=swordAnims ANIMFILE=models\sword.PSA COMPRESS=1 MAXKEYS=999999
#exec MESHMAP SCALE MESHMAP=swordMesh X=1.0 Y=1.0 Z=1.0
#exec MESH DEFAULTANIM MESH=swordMesh ANIM=swordAnims

// Animation sequences. These can replace or override the implicit (exporter-defined) sequences.
#EXEC ANIM SEQUENCE ANIM=swordAnims SEQ=spup STARTFRAME=0 NUMFRAMES=21 RATE=30.0000 COMPRESS=1.00 GROUP=None
#EXEC ANIM SEQUENCE ANIM=swordAnims SEQ=afire STARTFRAME=21 NUMFRAMES=10 RATE=30.0000 COMPRESS=1.00 GROUP=None
#EXEC ANIM SEQUENCE ANIM=swordAnims SEQ=spdn STARTFRAME=31 NUMFRAMES=19 RATE=30.0000 COMPRESS=1.00 GROUP=None
#EXEC ANIM SEQUENCE ANIM=swordAnims SEQ=fire STARTFRAME=50 NUMFRAMES=11 RATE=30.0000 COMPRESS=1.00 GROUP=None

// Digest and compress the animation data. Must come after the sequence declarations.
// 'VERBOSE' gives more debugging info in UCC.log
#exec ANIM DIGEST ANIM=swordAnims VERBOSE

#EXEC TEXTURE IMPORT NAME=swordTex0 FILE=TEXTURES\sword.tga GROUP=Skins

#EXEC MESHMAP SETTEXTURE MESHMAP=swordMesh NUM=0 TEXTURE=swordTex0

// Original material [0] is [01 - Default] SkinIndex: 0 Bitmap: sword.tga Path: \\netapp\achoura\textures_static meshes\sword


defaultproperties
{

Mesh=swordMesh
DrawType=DT_Mesh
bStatic=False
}

//code

billy240clint@hotmail
11th May 2006, 06:57 PM
What kinda of scripts do you have in order to get a weapon to work? You will need the following at minum to get it to work. I am making a sworad as well, a Gladius, so this is what I have my files named.

Gladius
GladiusPickUp
GladiusAttachment
GladiusPrimaryFire
GladiusSecondaryFire

Now you have to use DT_StaticMesh, that is the only way that I know of to get static meshes to show up. But I am guessing that is not your problem. I am almost 99% sure that did not rename that static mesh in the pick up class, or have a pickup class. Also have you tried to summon it via the comand promt in game?(you get there by pressing the `) If you dont know about it all you need to do is this summon gladius.gladiuspickup and you should see it show up right in front of you. If you dont have a pickup class it wont show up but if you run over it you should pick it up. Try this and get back to me if you have any luck or not. I have mine in and doing damage so I can help you along the way.

Sam

luminosity
12th May 2006, 10:45 AM
hi ,
Thanks for your reply.
i will explain you what exactly i did.
i made a sword in 3ds max and through the actor x plugin i exported it to Unreal.
i have 2 scripts ,sword.
swordPickUp

when i open my Animation browser i can see my sword. and when i go to Weapon base properties -Weapon type,i can see my sword there.
After that i copied the code for shieldgun pickup and changed it to swordpickup.i did not changed any code in the shield pickupclass .
when i open my unreal ed and try to play the game in doesnt show up .
i tried to open it from the command promt by typing >ut2004 sword.swordpickup`.but it gives me the error of connection failed.
i already have my sword.uc code on the forum.if you want to have a look at it.

can you guide me from here please.

Thanks

Arpit

luminosity
12th May 2006, 11:01 AM
can u tell m how to use the summon command.


Thanks
Arpit

billy240clint@hotmail
12th May 2006, 04:43 PM
Yeah like I said before you dont have enough scripts. You are short by three scripts. So here is waht I am going to do for you, cuz someone did this for me when I made my first weapon. Send me your code and your PSK and PSA files and I will send you back a code templete with the code that you need to make this work. You are on the right path but you need more code, If you look at the sheild gun in the Xweapons scripts folder it has more than two scripts I think that there are 5 or 6 that power the whole thing. You only have two so you will never see it fire or pick it up cuz the game sees it, (in the actor broswer as well as the animation browser,) but your are not telling the game what to do with it bescides show up in the weapon menu. Just send me your code at samdeiter@gmail.com and I will get it setup for you.

Sam

Logiq121
20th May 2006, 02:25 PM
If you are not seeing the weapon in the game you might try exporting the sword as an ASE file and then import it as a static mesh. That is what you see when it is on the ground when either you are looking at a weapon base or a player drops the weapon.