Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with custom entity
S4n1tyM0rs0 Offline
Junior Member

Posts: 14
Threads: 2
Joined: Feb 2012
Reputation: 0
#1
Problem with custom entity

I am trying to make custom entity for my custom story..
I wanted to give meat skin for laudanum, so meat would work as food for the player.
The only problem is that model of the entity goes always to the middle of map (Position 0 0 0).
But I can pick the item up where it's position really is. Invisible meat that increases health... Huh

Here's the entity file:

Spoiler below!
<Entity>
<EditorSession>
<ViewportConfig SelectedViewport="0" UsingEnlargedViewport="false">
<Viewport CameraPosition="0.000000 0.000000 20.000000" CameraTarget="0.000000 0.000000 0.000000" CameraZoom="0.916291" Preset="0" RenderMode="1" ShowGrid="true" />
<Viewport CameraPosition="20.000000 0.100000 0.000000" CameraTarget="0.000000 0.100000 0.000000" CameraZoom="0.916291" Preset="1" RenderMode="1" ShowGrid="true" />
<Viewport CameraPosition="0.000000 20.000000 0.000000" CameraTarget="0.000000 0.000000 0.000000" CameraZoom="0.916291" Preset="2" RenderMode="1" ShowGrid="true" />
<Viewport CameraPosition="0.305049 0.305049 0.305049" CameraTarget="0.000000 0.000000 0.000000" CameraZoom="4.550000" Preset="3" RenderMode="0" ShowGrid="true" />
</ViewportConfig>
<GlobalLightConfig AmbientLight="false" PointLight="false" />
</EditorSession>
<UserDefinedVariables EntitySubType="Health" EntityType="Item">
<Var Name="Health" Value="100" />
<Var Name="Toughness" Value="0" />
<Var Name="MaxFocusDistance" Value="0" />
<Var Name="MainPhysicsBody" Value="" />
<Var Name="EffectsOnSound" Value="" />
<Var Name="EffectsOffSound" Value="" />
<Var Name="EffectsOnTime" Value="1" />
<Var Name="EffectsOffTime" Value="1" />
<Var Name="EffectsOffLightColor" Value="0 0 0 0" />
<Var Name="EffectsOffLightRadius" Value="-1" />
<Var Name="StaticMoveCheckCollision" Value="false" />
<Var Name="StaticMoveStartSound" Value="" />
<Var Name="StaticMoveStopSound" Value="" />
<Var Name="StaticMoveLoopSound" Value="" />
<Var Name="SubItemTypeName" Value="fresh_meat" />
<Var Name="ImageFile" Value="fresh_meat.tga" />
<Var Name="PickSound" Value="Meat" />
<Var Name="HealAmount" Value="25" />
<Var Name="DissolveOnDestruction" Value="false" />
<Var Name="DissolveTime" Value="3.0" />
</UserDefinedVariables>
<ModelData Name="">
<Entities />
<Mesh Filename="E:/lux/redist/entities/item/fresh_meat/fresh_meat.dae">
<SubMesh Active="true" GroupID="0" ID="0" Name="pCylinder1" Rotation="0.000000 0.000000 0.000000" Scale="1.000000 1.000000 1.000000" SubMeshID="0" Tag="" Type="11" WorldPos="0.000000 0.000000 0.000000" />
</Mesh>
<Shapes>
<BodyShape Active="true" GroupID="0" ID="1" Name="Shape_1" RelativeRotation="0.000000 0.000000 0.000000" RelativeScale="1 1 1" RelativeTranslation="0.000000 0.000000 0.000000" Rotation="0.000000 0.000000 0.000000" Scale="0.040000 0.230000 0.040000" ShapeType="Cylinder" ShapeTypeID="1" Tag="" Type="8" WorldPos="0.000000 0.116365 0.000000" />
</Shapes>
<Bodies>
<Body Active="true" AngularDamping="0" BlocksSound="false" BuoyancyDensityMul="1" CanAttachCharacter="false" CollideCharacter="true" CollideNonCharacter="true" ContinuousCollision="true" GroupID="0" ID="3" LinearDamping="0" Mass="5" Material="Organic" MaxAngularSpeed="0" MaxLinearSpeed="0" Name="Body_1" PushedByCharacterGravity="false" Rotation="0 0 0" Scale="0.827838 1 1" Tag="" UseSurfaceEffects="true" Volatile="false" WorldPos="0.197757 0.015133 0.014043">
<Shape ID="1" />
<Children>
<Child ID="0" />
</Children>
</Body>
</Bodies>
<Joints />
</ModelData>
</Entity>
(This post was last modified: 02-05-2012, 03:31 PM by S4n1tyM0rs0.)
02-05-2012, 03:27 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
RE: Problem with custom entity

Sounds like you forgot to attach the body to the mesh.

Tutorials: From Noob to Pro
02-05-2012, 10:53 PM
Website Find
S4n1tyM0rs0 Offline
Junior Member

Posts: 14
Threads: 2
Joined: Feb 2012
Reputation: 0
#3
RE: Problem with custom entity

(02-05-2012, 10:53 PM)Your Computer Wrote: Sounds like you forgot to attach the body to the mesh.
And how to do that? Do I have to use some model editor or can I just edit my .ENT file?
02-06-2012, 02:36 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#4
RE: Problem with custom entity

(02-06-2012, 02:36 PM)S4n1tyM0rs0 Wrote: And how to do that? Do I have to use some model editor or can I just edit my .ENT file?

Well, you can try the latter, but you won't get anywhere without the model editor.

In the model editor, select the body, and on the right, under the Attachments tab, select "Su" for SubMesh. Then click Attach and left click on the meshes you want to attach to the body. When you're done, click Done.

Tutorials: From Noob to Pro
02-06-2012, 02:52 PM
Website Find
S4n1tyM0rs0 Offline
Junior Member

Posts: 14
Threads: 2
Joined: Feb 2012
Reputation: 0
#5
RE: Problem with custom entity

Thanks, it worked. Now second problem is that when I eat (use) the meat from my inventory like I do with laudanum, I can hear glass sound. How to change that sound? I would change more likely it to a custom sound but some original amnesia sound should be fine too..
02-06-2012, 03:13 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#6
RE: Problem with custom entity

(02-06-2012, 03:13 PM)S4n1tyM0rs0 Wrote: Now second problem is that when I eat (use) the meat from my inventory like I do with laudanum, I can hear glass sound. How to change that sound?

Not sure, but that might require a full conversion.

Tutorials: From Noob to Pro
02-06-2012, 03:18 PM
Website Find
S4n1tyM0rs0 Offline
Junior Member

Posts: 14
Threads: 2
Joined: Feb 2012
Reputation: 0
#7
RE: Problem with custom entity

(02-06-2012, 03:18 PM)Your Computer Wrote:
(02-06-2012, 03:13 PM)S4n1tyM0rs0 Wrote: Now second problem is that when I eat (use) the meat from my inventory like I do with laudanum, I can hear glass sound. How to change that sound?

Not sure, but that might require a full conversion.
I tried to replace sounds/ui/ui_use_health.ogg but it didn't work... Amnesia reloads the original file I think Dodgy
It should work different... Maybe I just have to make full conversion or leave the meat idea :S

(This post was last modified: 02-06-2012, 03:42 PM by S4n1tyM0rs0.)
02-06-2012, 03:42 PM
Find




Users browsing this thread: 1 Guest(s)