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
Level Editor Help Static, non-colliding and de-activeable entity?
Shadowfied Offline
Senior Member

Posts: 261
Threads: 34
Joined: Jul 2010
Reputation: 5
#1
Static, non-colliding and de-activeable entity?

I've ran into a problem in my custom story. I have a place where there's a note on a door, held up by a stick, like in the screenshot below.

(Click on it for full size)
[Image: ZHpisl.jpg]


First, I found a perfect static object which did the job perfectly as it's static and there's a checkbox called "Collides" meaning that it can be in the door without screwing it up and moving it out of place, but SetEntityActive doesn't work for static objects, as they have no "Active" checkbox.

The door is locked and when the player tries to open it, a message appears saying "I should read the note first" so when the note is picked up I want the beam / stick to disappear.

I found an identical entity which could work as well, but the problem is that entities do not have the "Collides" checkbox.

Anyone know how I can solve this? Thanks in advance.

Edit: Solved it by copying the entity and removed all collision options. While this works, it would be nice to be able to do this without having to edit an entity.

Current - Castle Darkuan
Other - F*cked Map
(This post was last modified: 02-09-2012, 11:57 AM by Shadowfied.)
02-09-2012, 11:49 AM
Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#2
RE: Static, non-colliding and de-activeable entity?

You could simply deactivate the entity. Entities can be deactivated using script, but static objects cannot. Since you've opted to use an entity over a static object, you can deactivate it when the note is picked up.

The script command is SetEntityActive("wood_stick", false);

02-09-2012, 12:44 PM
Find
Shadowfied Offline
Senior Member

Posts: 261
Threads: 34
Joined: Jul 2010
Reputation: 5
#3
RE: Static, non-colliding and de-activeable entity?

(02-09-2012, 12:44 PM)palistov Wrote: You could simply deactivate the entity. Entities can be deactivated using script, but static objects cannot. Since you've opted to use an entity over a static object, you can deactivate it when the note is picked up.

The script command is SetEntityActive("wood_stick", false);
Yes, but the wooden beam / stick is going through the door which glitches it up and moves it out of place.



Current - Castle Darkuan
Other - F*cked Map
02-09-2012, 12:46 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#4
RE: Static, non-colliding and de-activeable entity?

I know you found your own workaround, but did you try enabling static physics for the original entity?

Tutorials: From Noob to Pro
02-09-2012, 12:50 PM
Website Find
Shadowfied Offline
Senior Member

Posts: 261
Threads: 34
Joined: Jul 2010
Reputation: 5
#5
RE: Static, non-colliding and de-activeable entity?

(02-09-2012, 12:50 PM)Your Computer Wrote: I know you found your own workaround, but did you try enabling static physics for the original entity?
Yeah I did. I still need that enabled to avoid the entity falling down to the ground, but even with it enabled it still glitches the door around.

Current - Castle Darkuan
Other - F*cked Map
02-09-2012, 12:53 PM
Find
Obliviator27 Offline
Posting Freak

Posts: 792
Threads: 10
Joined: Jul 2011
Reputation: 66
#6
RE: Static, non-colliding and de-activeable entity?

Static the door as well, then unstatic when the player grabs the note.


02-09-2012, 01:23 PM
Find
Shadowfied Offline
Senior Member

Posts: 261
Threads: 34
Joined: Jul 2010
Reputation: 5
#7
RE: Static, non-colliding and de-activeable entity?

(02-09-2012, 01:23 PM)Obliviator27 Wrote: Static the door as well, then unstatic when the player grabs the note.
Very good idea. Will try it later.


Current - Castle Darkuan
Other - F*cked Map
02-09-2012, 01:25 PM
Find




Users browsing this thread: 1 Guest(s)