Frictional Games Forum (read-only)
Setting static objects inactive/invisible? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Setting static objects inactive/invisible? (/thread-14868.html)

Pages: 1 2


Setting static objects inactive/invisible? - Twitchez - 04-17-2012

Hey everyone!

I'm currently working on a pretty nice explosion, but I prefer the decals in the static objects. Is it possible to make them invisible/inactive until just after the explosion? Like with entities?


All the best,
//Twitchez


RE: Setting static objects inactive/invisible? - Cranky Old Man - 04-17-2012

(04-17-2012, 03:43 PM)Twitchez Wrote: Hey everyone!



I'm currently working on a pretty nice explosion, but I prefer the decals in the static objects. Is it possible to make them invisible/inactive until just after the explosion? Like with entities?

1. Create a static object in your map.
2. Set it to inactive.
3. Trigger it to become active after the explosion.
4. Did it work? Wink




RE: Setting static objects inactive/invisible? - Your Computer - 04-17-2012

Static objects cannot be made invisible.


RE: Setting static objects inactive/invisible? - JetlinerX - 04-17-2012

[Was ninja'd by YC]

Static objects have trouble with scripts. They cant be set invisible because its SetEntityActive ();



RE: Setting static objects inactive/invisible? - Twitchez - 04-17-2012

If static objects cannot be made invisible, is there a way to edit that out in the model editor? If SetEntityActive(); doesn't work, what way do you suggest Cranky Old Man?


RE: Setting static objects inactive/invisible? - Cranky Old Man - 04-17-2012

(04-17-2012, 05:21 PM)Twitchez Wrote: If static objects cannot be made invisible, is there a way to edit that out in the model editor? If SetEntityActive(); doesn't work, what way do you suggest Cranky Old Man?
Me? I basically know as much as you do, but I know that some blood stains aren't decals. (I can't remember if they're entites or static objects, and I can't check the editor right now.) If these stains are entities, then they're entities because they are set to appear after something triggers. This suggests that you will have to turn the static objects that you want, into custom entities, probably through using the model editor.



RE: Setting static objects inactive/invisible? - Twitchez - 04-17-2012

Yes I saw that some a little brighter red blood spatter. I'm looking for some black decals though, to make it a bit more realistic like something litteraly blow up, but I have some other ideas running through my head now though...

Thanks for the help everyone! This community is one of the more helpful I've been in Smile


RE: Setting static objects inactive/invisible? - DRedshot - 04-17-2012

I thought someone made a tutorial on this, but I cannot find it on the wiki, so I'll just post what to do here.

1. Go to redist/entities and make a folder called w/e you want. (My_Entities for example)
- Inside this folder make another folder. (Call it Decal01 for now)

1.5. Go to "redist/static_objects/decals/" and look for the .dae filename which corresponds to the decal you want.
- for example, if you wanted the "blood_pool_static" decal, you would select "blood_pool_static.dae"
- Copy this file to your Decal01 folder you made earlier.

2. Open Model editor, click 'Import .dae' and browse to "entities/My_Entities/DecalName/DecalName.dae

3. Click Shapes at the left, and create a shape covering the static
- object, this will be what the player collides with, so make sure it
- follows the shape of the mesh reasonably well. You can add a couple more
- shapes to make the collision area more defined, but try not to use too
- many!

4. Select all the shapes, and click 'Create Body' (it might be on the second tab)

5. You now have a body, change any parameters you want in the second tab,
- I'd suggest 0 mass for decals (Or any static object for that matter!)
- and choose a suitable material from the list.

6. Go to the last tab,
- click 'Su'->Attach. Click on the decal's mesh, and click done!
- There should be a line conecting the mesh to the body.

7. Go into Settings->UserDefinedVariables. Make sure the entity type is not staticProp,
- otherwise you will not be able to use SetEntityActive!
- (StaticProp is not the same as Object->Static),
- You can set your entity to Object as Type: Static, and it should still be affected by SetEntityActive.

8. Now you can click 'SaveAs' and give it a new name! Now you can open it in your Level editor.

Edit: I originally got step 7 wrong, I'm really sorry. I've now edited it so it's correct now! (Thanks Your Computer)


RE: Setting static objects inactive/invisible? - Your Computer - 04-17-2012

StaticProp, AFAIK, is not affected by SetEntityActive; Object::Static is.


RE: Setting static objects inactive/invisible? - Twitchez - 04-17-2012

Thanks again TYC and especially you DRedshot lol, saving me again.

Though I get stuck at part 2 already! The file is a .dds or .mat (to be specific , dirt_coal.dds/mat)

Is it still possible?