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
Setting static objects inactive/invisible?
Twitchez Offline
Member

Posts: 67
Threads: 17
Joined: Mar 2012
Reputation: 1
#1
Setting static objects inactive/invisible?

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
04-17-2012, 03:43 PM
Find
Cranky Old Man Offline
Posting Freak

Posts: 986
Threads: 20
Joined: Apr 2012
Reputation: 38
#2
RE: Setting static objects inactive/invisible?

(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


Noob scripting tutorial: From Noob to Pro

(This post was last modified: 04-17-2012, 04:50 PM by Cranky Old Man.)
04-17-2012, 04:50 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#3
RE: Setting static objects inactive/invisible?

Static objects cannot be made invisible.

Tutorials: From Noob to Pro
04-17-2012, 05:04 PM
Website Find
JetlinerX Offline
Senior Member

Posts: 599
Threads: 49
Joined: Jun 2011
Reputation: 19
#4
RE: Setting static objects inactive/invisible?

[Was ninja'd by YC]

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

Lead Developer of "The Attic"
~Slade Mitchell

Chapter 3 (REL)

(This post was last modified: 04-17-2012, 05:08 PM by JetlinerX.)
04-17-2012, 05:07 PM
Website Find
Twitchez Offline
Member

Posts: 67
Threads: 17
Joined: Mar 2012
Reputation: 1
#5
RE: Setting static objects inactive/invisible?

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?
04-17-2012, 05:21 PM
Find
Cranky Old Man Offline
Posting Freak

Posts: 986
Threads: 20
Joined: Apr 2012
Reputation: 38
#6
RE: Setting static objects inactive/invisible?

(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.

Noob scripting tutorial: From Noob to Pro

04-17-2012, 05:27 PM
Find
Twitchez Offline
Member

Posts: 67
Threads: 17
Joined: Mar 2012
Reputation: 1
#7
RE: Setting static objects inactive/invisible?

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
04-17-2012, 05:32 PM
Find
DRedshot Offline
Senior Member

Posts: 374
Threads: 23
Joined: Jun 2011
Reputation: 11
#8
RE: Setting static objects inactive/invisible?

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)

(This post was last modified: 04-17-2012, 07:43 PM by DRedshot.)
04-17-2012, 05:41 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#9
RE: Setting static objects inactive/invisible?

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

Tutorials: From Noob to Pro
04-17-2012, 06:39 PM
Website Find
Twitchez Offline
Member

Posts: 67
Threads: 17
Joined: Mar 2012
Reputation: 1
#10
RE: Setting static objects inactive/invisible?

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?
04-17-2012, 07:15 PM
Find




Users browsing this thread: 1 Guest(s)