dodek96_pl Posted April 29, 2011 Report Share Posted April 29, 2011 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. Quote Link to comment Share on other sites More sharing options...
BEEX Posted May 1, 2011 Report Share Posted May 1, 2011 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 Quote Link to comment Share on other sites More sharing options...
dodek96_pl Posted May 2, 2011 Author Report Share Posted May 2, 2011 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? Quote Link to comment Share on other sites More sharing options...
BEEX Posted May 2, 2011 Report Share Posted May 2, 2011 (edited) take a look at this post... http://www.bfeditor.org/forums/index.php?showtopic=14510&st=0&p=98459&hl=objectspawner&fromsearch=1entry98459 . im curious if the object spawner isnt working due to your projectile having a sticky comp...ill go test it Edited May 2, 2011 by BEEX Quote Link to comment Share on other sites More sharing options...
BEEX Posted May 2, 2011 Report Share Posted May 2, 2011 well i did some testing and found the object spawner doesnt want to spawn the bipod and stationary tow on both the mine and c4 explosives,but it will spawn a humvee and m1a2 tank...ill do some more researching. Quote Link to comment Share on other sites More sharing options...
dodek96_pl Posted May 11, 2011 Author Report Share Posted May 11, 2011 Still no ideas? Maybe someone else knows another way to make something deployable? I looked into FH2's codes and they do it through python. Maybe devilman could reveal a secret? Quote Link to comment Share on other sites More sharing options...
BEEX Posted May 11, 2011 Report Share Posted May 11, 2011 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. Quote Link to comment Share on other sites More sharing options...
mschoeldgen[Xww2] Posted May 15, 2011 Report Share Posted May 15, 2011 You can spawn PlayerControlObjects and (with certain restrictions) Kits , but not a 'GenericFireArm' only. It has to be integrated into a PCO first. Quote Link to comment Share on other sites More sharing options...
dodek96_pl Posted May 15, 2011 Author Report Share Posted May 15, 2011 US_Bipod is already a PCO. I'll create a new PCO. Quote Link to comment Share on other sites More sharing options...
mschoeldgen[Xww2] Posted May 16, 2011 Report Share Posted May 16, 2011 ObjectTemplate.activeSafe GenericFireArm deployable_m249 Thats the problem. Do it the other way round: First create a copy of the us_bipod , then attach your M249 to it. Still, deployables will work best if packed into a ( pickup ) kit Quote Link to comment Share on other sites More sharing options...
dodek96_pl Posted August 13, 2011 Author Report Share Posted August 13, 2011 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. Quote Link to comment Share on other sites More sharing options...
mschoeldgen[Xww2] Posted August 14, 2011 Report Share Posted August 14, 2011 (edited) 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 August 14, 2011 by mschoeldgen[Xww2] Quote Link to comment Share on other sites More sharing options...
dodek96_pl Posted August 14, 2011 Author Report Share Posted August 14, 2011 Then I can make it spawn geometryless simple object with pco attached to it Would it work? Quote Link to comment Share on other sites More sharing options...
mschoeldgen[Xww2] Posted August 15, 2011 Report Share Posted August 15, 2011 (edited) 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 August 15, 2011 by mschoeldgen[Xww2] Quote Link to comment Share on other sites More sharing options...
BEEX Posted August 15, 2011 Report Share Posted August 15, 2011 im not sure if this code fixes that issue but its worth testing on a network,the pre cache object should preload the object without a spawnpoint. . ObjectTemplate.PreCacheObject 1 Quote Link to comment Share on other sites More sharing options...
tobiasripper Posted February 11, 2012 Report Share Posted February 11, 2012 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 . 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? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.