Jump to content
Official BF Editor Forums

Deployable M249 Crash...


dodek96_pl
 Share

Recommended Posts

Hi. I've made deployable M249:copied at_mine, renamed everything to deployable_m249, created new projectile, attached US_BIPOD to it and put it in the game. I deloy it, press F to get in and then it crashes. Tweak:

rem *** Generated with Bf2Editor.exe [created: 2005/3/23 15:53]
GeometryTemplate.compressVertexData 1
GeometryTemplate.maxTextureRepeat 16
ObjectTemplate.activeSafe GenericFireArm deployable_m249
ObjectTemplate.creator MBA-1:mba
ObjectTemplate.modifiedByUser nfe
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.castsDynamicShadow 1
rem ---BeginComp:WeaponHud ---
ObjectTemplate.createComponent WeaponHud
ObjectTemplate.weaponHud.weaponIcon Ingame\Weapons\Icons\Hud\icon_M16m203.tga
ObjectTemplate.weaponHud.selectIcon Ingame\Weapons\Icons\Hud\Selection\AT_mine.tga
ObjectTemplate.weaponHud.specialAbilityIcon Ingame\Weapons\Icons\Hud\SpecialKitIcons\mine.tga
ObjectTemplate.weaponHud.hudName "Deployable M249"
ObjectTemplate.weaponHud.guiIndex 0
ObjectTemplate.weaponHud.altGuiIndex 0
ObjectTemplate.weaponHud.hasFireRate 0
ObjectTemplate.weaponHud.disableOnSprint 1
rem ---EndComp ---
rem ---BeginComp:ThrownFireComp ---
ObjectTemplate.createComponent ThrownFireComp
ObjectTemplate.fire.addFireRate 0
ObjectTemplate.fire.projectileStartPosition 0/-0.1/0
ObjectTemplate.fire.maxProjectilesInWorld 999
ObjectTemplate.fire.pullBackTime 0
ObjectTemplate.fire.projectileStartRotation 0/-8/0
rem ---EndComp ---
rem ---BeginComp:DefaultAmmoComp ---
ObjectTemplate.createComponent DefaultAmmoComp
ObjectTemplate.ammo.magSize 1
ObjectTemplate.ammo.changeMagAt 0.8
ObjectTemplate.ammo.reloadTime 1.1
ObjectTemplate.ammo.minimumTimeUntilReload 0.3
ObjectTemplate.ammo.autoReload 1
ObjectTemplate.ammo.instantReloadOnEnable 1
ObjectTemplate.ammo.toggleWhenNoAmmo 1
rem ---EndComp ---
rem ---BeginComp:HelpHud ---
ObjectTemplate.createComponent HelpHud
ObjectTemplate.HelpHud.helpStringKey "HUD_HELP_WEAPON_HANDHELD_ATMINE_vehicles"
ObjectTemplate.HelpHud.helpSoundKey "HUD_HELP_WEAPON_HANDHELD_ATMINE_vehicles"
rem ---EndComp ---
rem ---BeginComp:DefaultSoundComp ---
ObjectTemplate.createComponent DefaultSoundComp
ObjectTemplate.sound.noisy 0
rem ---EndComp ---
rem ---BeginComp:ThrownAnimationComp ---
ObjectTemplate.createComponent ThrownAnimationComp
rem ---EndComp ---
rem ---BeginComp:DefaultZoomComp ---
ObjectTemplate.createComponent DefaultZoomComp
ObjectTemplate.zoom.addZoomFactor 0
rem ---EndComp ---
ObjectTemplate.geometry us_bipod
ObjectTemplate.setCollisionMesh us_bipod
ObjectTemplate.mapMaterial 0 lambert1 90
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType Mesh
ObjectTemplate.material 90
rem -------------------------------------
ObjectTemplate.addTemplate S_deployable_m249_Fire1P
ObjectTemplate.addTemplate S_deployable_m249_Fire1P_Outdoor
ObjectTemplate.addTemplate S_deployable_m249_Fire3P
ObjectTemplate.addTemplate S_deployable_m249_BoltClick
ObjectTemplate.addTemplate S_deployable_m249e_TriggerClick
ObjectTemplate.addTemplate S_deployable_m249_SwitchFireRate
ObjectTemplate.addTemplate S_deployable_m249_Reload1P
ObjectTemplate.addTemplate S_deployable_m249_Reload3P
ObjectTemplate.addTemplate S_deployable_m249_Deploy1P
ObjectTemplate.addTemplate S_deployable_m249_Deploy3P
ObjectTemplate.addTemplate S_deployable_m249_Zoom
rem -------------------------------------
ObjectTemplate.animationSystem1P Objects/Weapons/Handheld/AT_mine/AnimationSystem1p.inc
ObjectTemplate.animationSystem3P Objects/Weapons/Handheld/AT_mine/AnimationSystem3p.inc
ObjectTemplate.projectileTemplate deployable_m249_Projectile
ObjectTemplate.keepProjectiles 30
ObjectTemplate.velocity 5
ObjectTemplate.itemIndex 5
ObjectTemplate.delayToUse 1.1

GeometryTemplate.compressVertexData 1
GeometryTemplate.maxTextureRepeat 16
ObjectTemplate.create GenericProjectile deployable_m249_Projectile
ObjectTemplate.modifiedByUser nfe
ObjectTemplate.setNetworkableInfo BasicInfo
ObjectTemplate.createNotInGrid 1
ObjectTemplate.createdInEditor 1
rem ---BeginComp:Armor ---
ObjectTemplate.createComponent Armor
ObjectTemplate.armor.maxHitPoints 1000
ObjectTemplate.armor.defaultMaterial 90
ObjectTemplate.armor.waterLevel -0.3
rem ---EndComp ---
rem ---BeginComp:StickyCollisionComp ---
ObjectTemplate.createComponent StickyCollisionComp
ObjectTemplate.collision.bouncing 1
ObjectTemplate.collision.maxStickAngle 180
rem ---EndComp ---
rem ---BeginComp:DefaultProjSoundComp ---
ObjectTemplate.createComponent DefaultProjSoundComp
rem ---EndComp ---
rem ---BeginComp:DefaultPenetrateComp ---
ObjectTemplate.createComponent DefaultPenetrateComp
ObjectTemplate.penetrate.allowSolidPenetration 0
rem ---EndComp ---
ObjectTemplate.mass 25
ObjectTemplate.floaterMod 0
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType Mesh
ObjectTemplate.collisionGroups 8
ObjectTemplate.material 90
ObjectTemplate.geometry us_bipod
ObjectTemplate.setCollisionMesh us_bipod
rem -------------------------------------
ObjectTemplate.addTemplate S_at_mine_Projectile_Looping
ObjectTemplate.addTemplate us_bipod
rem -------------------------------------
ObjectTemplate.timeToLive CRD_NONE/9999/0/0
ObjectTemplate.material 90
ObjectTemplate.hasOnTimeEffect 1
ObjectTemplate.localPredictOnClient 1
ObjectTemplate.damage 0
ObjectTemplate.visibleOn3dMap 0
ObjectTemplate.canPickup 1

***you don't need the sounds, do you?***

Is that Armorcomp which causes this? or is it canPickup value? Thank you for your help. :)

Link to comment
Share on other sites

i think the problem is the bipod needs to be an object spawner,you throw the projectile out then the bipod spawns on that.

.

the way you have it set up is your entering a projectile,soldiers cant enter projectiles because of many hardcoded reasons,another part of issue maybe the position of the bipod is forcing the player into the ground,bf2 does not like bundledmeshes being forced under the terrain.

you could try to raise the position of the bipod,worth a try but i dought it will fix it.

.

ObjectTemplate.addTemplate us_bipod

ObjectTemplate.setPosition 0/1/0

Link to comment
Share on other sites

I made it a spawner:

ObjectTemplate.create ObjectSpawner Deployable_M249_Spawner
ObjectTemplate.modifiedByUser dodek
ObjectTemplate.isNotSaveable 1
ObjectTemplate.createdInEditor 1
ObjectTemplate.floaterMod 0
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.setObjectTemplate 2 us_bipod
ObjectTemplate.TimeToLive 60
ObjectTemplate.Distance 2000
ObjectTemplate.maxNrOfObjectSpawned 1
ObjectTemplate.team 2
ObjectTemplate.teamOnVehicle 1

but now the object doesn't spawn at all. I've had problems like that in the past, that a spawner attached to projectile doesn't want to spawn. What should I do to make it spawn?

Link to comment
Share on other sites

  • 2 weeks later...

im a little confused as to why a vehicle can spawn but not an AT or bipod,they are all bundled meshes and even with mobile physics the AT tow wouldnt spawn.

you could try putting the bipod in the vehicles folder,with some bf2 objects they only work if in the correct folders.

.

a last resort would be to make the bipod a vehicle,but who knows what complications that would make.

Link to comment
Share on other sites

  • 2 months later...

I tried to do this other way (failed though, but I'm pretty sure I can get this right. My way is to create an effect bundle with emitter that will create the us_bipod pco. I failed, but I'll create a copy of mentioned PCO and will try that. That could be the way :) Emitters CAN spawn PCOs, I thought of this way when I saw unmanned airstrike.

Link to comment
Share on other sites

Emitters CAN spawn PCOs, I thought of this way when I saw unmanned airstrike.
Yes, that does work locally , but not in a network. Spawning a networkable object like a PCO confuses the ID manager which is unable to assign a valid network ID to this 'out-of-nowhere' object.

The error is something like 'Invalid network ID=0' or similar. Its been a while since i got it.

Edited by mschoeldgen[Xww2]
Link to comment
Share on other sites

Not in network. The network IDs are assigned when the map loads ( have a look at the debugger log ) and any networkable object has to be declared before the map runs. Any networkable object which is not declared on map start will CTD with a missing networkable ID when it appears 'out-of-nowhere' .

It doesn't matter if you pack your PCO below a Bundle, EffectBundle or similar. The PCO itself is networkable and thus causes the error.

Edited by mschoeldgen[Xww2]
Link to comment
Share on other sites

  • 5 months later...

hi there, sorry to bring this up again. i just wanted to know if someone made it posible to spawn a pco with an ability component (radar to be more specific) from a projectile (objectspawner as mediator). i've benn reading all the post i found, tryed all your codes, with all kind of modifications for over a week now and nothing. it just seems to be too hard coded, i don't know. Perhaps if you guys could tell me if it is posible i'd just keep digging on it. otherwhise i'd appreciate if you guys could tell me that it's not posible, so i can stop busting by lil brain. the idea is technicaly the same as kano's motion detector ... here , and im afraid it has to work at least on lan. this is a personal project, not related to any mod, so if any of you has a good idea on how to achieve this, don't you worry about divulgation, it will be very wellcome. or just a "sorry chieff, no can do sir" will suffice :lol: . Thanks for everthing guys, you rock. If i wasn't sooooo far i'd buy you guys a beer, each.

PD: the only thing i didn't try is the z_spawner folder, since i didn't understand how to do it...HERE should i post on that trhead?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...