Small weapon problem.
Small weapon problem.
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?
did you fill in the AttributeType field? does he already have the weapon in question?
RF2 site: http://realityfactory2.sourceforge.net/
RF2 tasks: http://sourceforge.net/pm/?group_id=179085
RF2 tasks: http://sourceforge.net/pm/?group_id=179085
yes. sorry. it should contain the weapon's name (case sensitive).
RF2 site: http://realityfactory2.sourceforge.net/
RF2 tasks: http://sourceforge.net/pm/?group_id=179085
RF2 tasks: http://sourceforge.net/pm/?group_id=179085
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.
RF2 site: http://realityfactory2.sourceforge.net/
RF2 tasks: http://sourceforge.net/pm/?group_id=179085
RF2 tasks: http://sourceforge.net/pm/?group_id=179085
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.
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.
RF2 site: http://realityfactory2.sourceforge.net/
RF2 tasks: http://sourceforge.net/pm/?group_id=179085
RF2 tasks: http://sourceforge.net/pm/?group_id=179085
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.
sorry to double-post, didnt know if youd seen my post yet.
RF2 site: http://realityfactory2.sourceforge.net/
RF2 tasks: http://sourceforge.net/pm/?group_id=179085
RF2 tasks: http://sourceforge.net/pm/?group_id=179085
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 :/
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 :/
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.
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.
RF2 site: http://realityfactory2.sourceforge.net/
RF2 tasks: http://sourceforge.net/pm/?group_id=179085
RF2 tasks: http://sourceforge.net/pm/?group_id=179085
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.
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.
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)
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)
RF2 site: http://realityfactory2.sourceforge.net/
RF2 tasks: http://sourceforge.net/pm/?group_id=179085
RF2 tasks: http://sourceforge.net/pm/?group_id=179085
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.
RF2 site: http://realityfactory2.sourceforge.net/
RF2 tasks: http://sourceforge.net/pm/?group_id=179085
RF2 tasks: http://sourceforge.net/pm/?group_id=179085