Page 1 of 2
Small weapon problem.
Posted: Wed Dec 07, 2005 10:54 pm
by CowboyUp
Well, now that I got my weapons in the game, old Virgil doesnt pick them up. He just runs into them like they are walls. How do I fix this?
Posted: Wed Dec 07, 2005 11:25 pm
by AndyCR
did you fill in the AttributeType field? does he already have the weapon in question?
Posted: Wed Dec 07, 2005 11:37 pm
by CowboyUp
No, he doesn't.
Do you mean the "Attribute Name" box? I dont see a "Attribute Type" box.
Posted: Wed Dec 07, 2005 11:43 pm
by AndyCR
yes. sorry. it should contain the weapon's name (case sensitive).
Posted: Wed Dec 07, 2005 11:56 pm
by CowboyUp
I filled that in, but still comes out as a solid object. I have the weapon, inventory, and player inis all filled out. Is there something I'm not doing that needs done??
Posted: Thu Dec 08, 2005 12:30 am
by AndyCR
no. make sure your player.ini entry for your weapon has high 1, low 0, and initial 0, and that AttributeAmount in the attribute entity is 1.
Posted: Thu Dec 08, 2005 1:09 am
by CowboyUp
Thats all filled in. I dont know whats wrong.
Sorry if I'm seeming too dependent and asking lots of questions, its just that since I cant run the RF game demos or even load their levels in the RFPro, I can't use them as examples, so I'm forced to ask for help.
Posted: Thu Dec 08, 2005 1:46 am
by AndyCR
no, thats fine, if somethings not working right it should be troubleshooted.
hmm. ive created a weapon recently (to give to the community as a sample of a weapon), all thats left is to align it to the camera correctly and fix some polygon normal issues, ill see if i can get it to pick up as an attribute.
Posted: Thu Dec 08, 2005 1:49 am
by AndyCR
I have a hunch: Try turning Gravity to True in the Attribute entity. I think the player is simply walking under the weapon; thats what happened to me when i tried to add the attribute. to fix this permanently, set ActorRotation in the PlayerSetup entity to -90 180 0. (note that due to a bug, the camera will flicker on startup if you do this - just hit F1 when running your game to fix this. if you make your own player with the correct rotation settings this wont be an issue, and iot has been fixed i believe in the next version of rf)
sorry to double-post, didnt know if youd seen my post yet.
Posted: Thu Dec 08, 2005 2:22 am
by CowboyUp
Hmm..I'm still not picking it up. Now the weapon is sunk into the ground as opposed to being a few inches above it.
Here is my attribute settings (going down the list on the little entity grid)
actor rotation: 0 180 0
all material: false
ambient color:000
ambient light: true
attribute alt ammount: 0
attributealtname: 0
attributeamount: 1
attribute: health
bonename: Bip01 R Hand
change meter:
Delay: 0.0
entity name: ak47
environmentmap:false
fillcolor: 000
gravity: true
hide from radar: false
model: <null>
origin: 118 21 135
percentmapping: 100
percentmaterial: 100
player only: false
ReSpawn: False
Scale: 1.0
ShadowAlpha: 128.0
shadow alphamap:
shaowbitmapping:
shadowsize: 0
szactorname:ak47.act
szentityname:
-----------
Hope that sheds some light :/
Posted: Thu Dec 08, 2005 2:35 am
by AndyCR
definitly shed light. 3 problems.
1. You are giving the player health when he touches the weapon, not the weapon itself. (change attribute: health (which i think is attributename) to your weapons name)
2. You are attempting to attach the weapon to some entity that does not exist in the level. EntityName is for ie attaching a weapon pickup to a moving vehicle; here it is useless and can i imagine causes problems, so leave it blank.
2. You are trying to attach it to a bone named "Bip01 R Hand" on an entity that doies not exist (see above). Clear out the BoneName field.
hope this works! my "barebones weapon demo" is done, just need to package it up.
Posted: Thu Dec 08, 2005 2:45 am
by CowboyUp
Those problems aside, I still just walk right over it, kind of hopping over it even. Dont know whats wrong with it :/
Maybe its in my ini that I made a mistake. I guess Ill show that. I'm pretty sure its right, I followed all the examples in the OGRE package.
;
; Weapon.ini
;
; definitions of all projectiles used in the game
;
; definitions of weapons used by the player
;
[BULLET]
type = projectile
actor = projectile\proj.act
rotation = 0 0 0
scale = 1
gravity = false
bounce = false
speed = 3000
lifetime = 1
boundingbox = 1
explosion = CrashSparks
actorexplosion = CrashSparks
showboth = false
attachactor = false
bonelevel = false
damage = 5
altdamage = 5
explosionradius = 0
explosiondamage = 1
decal = 0
impactsound = torch.wav
[ak47]
type = weapon
slot = 1
firerate = 10
catagory = projectile
projectile = BULLET
attribute = health
ammunition = BULLET
ammopershot = 1
shotpermagazine = 30
;loosemag = true
worksunderwater = false
attacksound = machinegun2.wav
;reloadsound = weapon\reload3.wav
emptysound = weapon\click.wav
;muzzleflash = PMuzzleFlash
;
; 1st person
;
viewactor = ak47.act
viewfillcolor = 128 128 128
viewambientcolor = 128 128 128
viewrotation = -8 97.8 30.4
viewoffset = 3.1 -2.3 -2.4
viewscale = 0.6
viewlaunchoffset = 0 0 0
viewanimspeed = 1
viewarmanim = Arm
viewidleanim = Idle
viewattackanim = Shoot
viewwalkanim = Walk
viewreloadanim = Reload
viewkeyreloadanim = Reload
viewattackemptyanim = Shoot
viewlaunchbone = bang
crosshair = crosshairs\pistol.bmp
crosshairalpha = crosshairs\a_pistol.bmp
crosshairfixed = true
zoomamount = 100
recoilamount = 5
recoildecay = 10
;
; 3rd person
;
playeractor = VIRGIL.act
playerfillcolor = 0 0 0
playerambientcolor = 0 0 0
playerrotation = 0 180 0
playerscale = 0.6
playerlaunchoffset = 0 0 0
playerbone = Bip01 R Hand
;muzzleflash3rd = PlasmaBeam
player:
;
; PLAYER.INI - Player attribute configuration file
;
; Health
[health]
initial = 60
low = 0
high = 100
[stamina]
initial = 100
low = 0
high = 100
; Oxygen
[oxygen]
initial = 100
low = 0
high = 100
; FlashLight
[light]
initial = 0
low = 0
high = 100
; Health Pack
[HealthPack]
initial = 0
low = 0
high = 10
;
; Additional attributes beyond the basic
;
;
; Player Weapons and ammunition
;
[BULLET]
initial = 1000
low = 0
high = 1000
[ak47]
initial = 0
low = 0
high = 1
I have the inventory one filled out, but I cant possibly imagine anything wrong with that. I copied that one directly out of the docs.
Posted: Thu Dec 08, 2005 3:00 am
by AndyCR
you did put "ak47" in the attributename field right?
im posting a barebones weapon package right about now that should help, check general topics.
(oh, and inventory wouldnt make a difference i dont think - i dont even have an entry for my barebones weapon)
Posted: Thu Dec 08, 2005 5:38 am
by steven8
Was your weapon made with the same skeleton as the actor, so it has a bone attachment? If it's just a free-floating weapon, the actor can't 'pick' it up.
Posted: Thu Dec 08, 2005 2:39 pm
by AndyCR
i thought he was making a first person weapon, not a 3rd person one. could be wrong. and either way, if you mean the attribute has to have the same skeleton as the player, it works fine for me without it having the same skeleton.