HELP PHONE

Ask questions, discuss ideas, get answers
Post Reply
User avatar
MR PINK BALLS
Posts: 267
Joined: Sun Oct 18, 2009 4:01 pm

HELP PHONE

Post by MR PINK BALLS »

I uhm made a phone and its going to be part of a solider,yes a solider but I don't know how to attach it ,the solider is going to be invisible and when I attach it to the us hippack all you have to do it crouch and it goes underground and then obviously since the solider is invisible you can see anything ,so how can i make it so #1 it will collide with the ground and not go under or #2 attach it so it wont move down with the body,because it has to be at ground level ,thanks
Image Image

I <3 Ironmen
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: HELP PHONE

Post by freddy »

wheels and springs maybe?
User avatar
fo0k
Posts: 1433
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: HELP PHONE

Post by fo0k »

if the hippack has bones/is animated (Im guessing it is if its not sticking to the pack) then it gets very tricky i think.. cutom player animations dont tend to work well (if at all) in custom maps.. I think they need to be in the root of the mod. hats and helmets are a good thing to mod as they stay fixed to the head wherever it moves.

I think the above is correct... the helmet part is ;)
User avatar
MR PINK BALLS
Posts: 267
Joined: Sun Oct 18, 2009 4:01 pm

Re: HELP PHONE

Post by MR PINK BALLS »

No fook its connected to the body as the hippack but it has no collision its just going under ground
Image Image

I <3 Ironmen
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: HELP PHONE

Post by Apache Thunder »

Did you try addTemplating it to the soldier instead of to a kit part? Unless you plan on having drop kits and such. Make sure to addTemplate it as the last child object for the soldier you want. You can try the random geometry code so you can get soldiers to spawn with different stuff. ;)

If you do it that way, you should even beable to get a dynamic shadow working for it. Make the normal soldier body/head parts invisible. Disable their dynamic shadows and enable a dynamic shadow for the phone or other object you have planned. Be sure to make a shadow mesh of coarse. Animated Bundles/AnimatedMeshes don't need a shadow mesh, but normal stuff do!
ImageImageImage
I have cameras in your head!
User avatar
MR PINK BALLS
Posts: 267
Joined: Sun Oct 18, 2009 4:01 pm

Re: HELP PHONE

Post by MR PINK BALLS »

No i haven't addtemplatede it to the solider not sure how exactly
Image Image

I <3 Ironmen
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: HELP PHONE

Post by Apache Thunder »

Here's how to add it using the random geometries code using USSoldier objects.con file as an example:

Code: Select all

ObjectTemplate.create BFSoldier USSoldier
ObjectTemplate.createSkeleton animations/USSoldier.ske
ObjectTemplate.addArmorEffect 0 e_soldierdeath_us 0/0.8/0


include ../Common/CommonSoldierData.inc
game.addLanguageRunTimeDirectory USEnglish
include ../Common/Sounds/SoldierSound.inc

ObjectTemplate.setSoldierStandingIcon "Soldier/Icon_us_soldier_standing.tga"
ObjectTemplate.setSoldierCrouchIcon "Soldier/Icon_us_soldier_crouching.tga"
ObjectTemplate.setSoldierProneIcon "Soldier/Icon_us_soldier_lying.tga"

ObjectTemplate.setMinimapIcon "flag_us.tga"
ObjectTemplate.setControlPointIcon "conp_us.tga"
ObjectTemplate.setTicketIcon "flag_ticket_us.tga"
ObjectTemplate.setTeamFlagIcon "Icon_flag_us.tga"
ObjectTemplate.setRadioLanguage "UsEnglish"

ObjectTemplate.addTemplate USSoldierComplexHead
ObjectTemplate.setRandomGeometries 3
ObjectTemplate.setIsFirstPersonPart 0
ObjectTemplate.setLodValue 0.01
ObjectTemplate.bindToSkeletonPart Bip01_Spine3 3

ObjectTemplate.addTemplate USSoldierHead
ObjectTemplate.setIsFirstPersonPart 0
ObjectTemplate.setLodValue -0.01

ObjectTemplate.addTemplate USSoldier3PBody
ObjectTemplate.setIsFirstPersonPart 0

ObjectTemplate.addTemplate USSoldier1PBody
ObjectTemplate.setIsFirstPersonPart 1

ObjectTemplate.addTemplate USSoldierRightHand
ObjectTemplate.setIsFirstPersonPart 0
ObjectTemplate.setLodValue 0.03

ObjectTemplate.addTemplate USSoldierLeftHand
ObjectTemplate.setIsFirstPersonPart 0
ObjectTemplate.setLodValue 0.03

ObjectTemplate.addTemplate 1pUSSoldierRightHand
ObjectTemplate.setIsFirstPersonPart 1
ObjectTemplate.setLodValue 0.03

ObjectTemplate.addTemplate 1pUSSoldierLeftHand
ObjectTemplate.setIsFirstPersonPart 1
ObjectTemplate.setLodValue 0.03

ObjectTemplate.addTemplate Parachute
ObjectTemplate.setPosition 0/0.58/0

rem *** Addtemplate it here. Must be last child object to ensure it works properly. ***
ObjectTemplate.addTemplate Your_Object
ObjectTemplate.setRandomGeometries 3

ObjectTemplate.create SimpleObject Your_Object1
ObjectTemplate.geometry Your_Object1_M1
ObjectTemplate.hasDynamicShadow 1

ObjectTemplate.create SimpleObject Your_Object2
ObjectTemplate.geometry Your_Object2_M1
ObjectTemplate.hasDynamicShadow 1

ObjectTemplate.create SimpleObject Your_Object3
ObjectTemplate.geometry Your_Object3_M1
ObjectTemplate.hasDynamicShadow 1

rem *** This stuff will all be invisible! ***
rem *** Object Types ***
ObjectTemplate.create SimpleObject USSoldier1PBody
ObjectTemplate.geometry Soldier/1PUsBody
ObjectTemplate.createInvisible 1

ObjectTemplate.create SimpleObject USSoldier3PBody
ObjectTemplate.geometry Soldier/3PUsBody
ObjectTemplate.hasDynamicShadow 0
ObjectTemplate.createInvisible 1

ObjectTemplate.create AnimatedBundle USSoldierComplexHead1
ObjectTemplate.createSkeleton animations/UsFace.ske
ObjectTemplate.geometry Soldier/USComplexHead1
ObjectTemplate.hasDynamicShadow 0
ObjectTemplate.createInvisible 1

ObjectTemplate.create AnimatedBundle USSoldierComplexHead2
ObjectTemplate.createSkeleton animations/UsFace.ske
ObjectTemplate.geometry Soldier/USComplexHead2
ObjectTemplate.hasDynamicShadow 0
ObjectTemplate.createInvisible 1

ObjectTemplate.create AnimatedBundle USSoldierComplexHead3
ObjectTemplate.createSkeleton animations/UsFace.ske
ObjectTemplate.geometry Soldier/USComplexHead3
ObjectTemplate.hasDynamicShadow 0
ObjectTemplate.createInvisible 1

ObjectTemplate.create SimpleObject USSoldierHead
ObjectTemplate.geometry Soldier/USHead
ObjectTemplate.hasDynamicShadow 0
ObjectTemplate.createInvisible 1

ObjectTemplate.create SimpleObject USSoldierLeftHand
ObjectTemplate.geometry Soldier/USLeftHand
ObjectTemplate.hasDynamicShadow 0
ObjectTemplate.createInvisible 1

ObjectTemplate.create SimpleObject USSoldierRightHand
ObjectTemplate.geometry Soldier/USRightHand
ObjectTemplate.hasDynamicShadow 0
ObjectTemplate.createInvisible 1

ObjectTemplate.create SimpleObject 1pUSSoldierLeftHand
ObjectTemplate.geometry Soldier/1pUSLeftHand
ObjectTemplate.createInvisible 1

ObjectTemplate.create SimpleObject 1pUSSoldierRightHand
ObjectTemplate.geometry Soldier/1pUSRightHand
ObjectTemplate.createInvisible 1
When using the random geometry code, you addTemplate it using "Your_Object" and the actual objects names will be "Your_Object1" and so on. For each additional object, the number at the end of the name increases by one. Replace "Your_Object" with the name of the objects you intend to use of coarse. :P

As for the normal soldier geometries. You can see how I made them invisible. Just make sure your soldiers don't spawn with a kit if you intend for them not to have any weapons. Or make those invisible too if you intend to use them and want them invisible too. This also includes any kit parts and such.

Use "ObjectTemplate.createInvisible 1" on all objects that you want invisible. Be carefull with it though. On most object classes it will make all child objects addTemplated to it invisible as well. Not always and depends on the object type. (like PlayerControlObject for example. If you add the command to the main PCO, it makes the whole thing invisible including all child objects and even disables the dynamic shadow)

If used correctly though, dynamic shadows should still be visible. ;)

If you want your custom objects to have a dynamic shadow be sure the hasDynamicShadow is set to 1 on BOTH your object and the geometry template it uses.

For example:

The object:

Code: Select all

ObjectTemplate.create SimpleObject Your_Object1
ObjectTemplate.geometry Your_Object1_m1
ObjectTemplate.hasDynamicShadow 1
And the geometry:

Code: Select all

GeometryTemplate.create StandardMesh Your_Object1_m1
GeometryTemplate.file Example/Examplefiles/Your_Object1_m1
GeometryTemplate.hasDynamicShadow 1
Also make sure you actually make a shadow mesh in 3DSMax or Gmax for that mesh if it doesn't have one!
ImageImageImage
I have cameras in your head!
Post Reply