Frictional Games Forum (read-only)

Full Version: [STILL NOT SOLVED] Zelda OOT Fire Temple - Fake Door Slam
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Edit: How can I change the metal door from an entity to a static object? (ticking static physics does not work in this case)

------------------------------

Any fans of Zelda here?

What I'd like to achieve is making a door slam down on the player, like in the Fire Temple in Zelda, Ocarina of Time.

- Sort of idea of what I want to achieve. Imagine it's a smooth transition.

Spoiler below!
[Image: HJkoG0J.png]
Spoiler below!
[Image: Zowdc4w.png]
Spoiler below!
[Image: s8sct3q.png]
Spoiler below!
[Image: F1f5BQf.png]

Any ideas how I can do this?
Swap the door with another version with gravity? Then you push it down with AddPropImpulse
"Swap the door with another version with gravity?" What do you mean by that?
Can't you make it a MoveObject and change the options somewhere to "Angular" or something of the sort? Study how the secret bookcase moves in the beginning level and recreate that. I don't have the tools installed at the moment, so I can't check the exact options, sorry.

Spoiler below!

Also it's funny I see this because I recently got the 3DS version of OoT and just reached the Fire Temple. I have to get the red tunic, but I turned it off for the day =P

Basically what you should do is have an unhinged door entity. Some of the doors already have unhinged version, but if it doesn't, you can make a new one in ModelEditor by just changing the entity from SwingDoor to Object -> Static.

What I would do is put a normal door with static physics in as active, and the falling door in as inactive. When the time comes that you want it to fall down, switch the normal door inactive and your falling door as active, then use the AddBodyForce script to push it just slightly toward the player so that it falls over.
I tried what you suggested, Statyk, although the code for the shelf in the early map is really hard to pick out. I just messed around with some functions to see what I could get. Using


SetMoveObjectState(string& asName, float afState);

I was able to make the hinges move, but not the door (?)

Spoiler below!
[Image: kHFByKW.png]

Any ideas?



Damascus,

I swapped it to a static object:
Spoiler below!
[Image: Voa82vX.png]
And I used this function:
Spoiler below!
[Image: eZVk3OK.png]
But it doesn't move.
OH, I did forget to mention, that when using the AddBodyForce script, it should refer to the name of the body itself, not the entity. So, for example if the entity is named "fling" and the body of the door (when you click on it in ModelEditor) is called "door_body", you would refer to it as "fling_door_body" in the script. This way you make sure it acts only on the door part and not the hinge part.

Also, make sure that the door has mass that's not 0, otherwise it won't move at all.

PS: -10,000 is probably gonna make it rocket across the room, but as long as you know it works, you can tweak it XD
(01-02-2014, 03:52 AM)Zokrar Wrote: [ -> ]"Swap the door with another version with gravity?" What do you mean by that?

What Damascus said.
A static version of the door that switches to a non static when needed.
(01-02-2014, 08:39 AM)Damascus Wrote: [ -> ]Also, make sure that the door has mass that's not 0, otherwise it won't move at all.

How do I do this? I didn't see a mass option in user defined variables. It's not the script that's not working now - the door is literally hovering in mid air

P.S., thanks for all the help so far everyone.

Edit: The door has 10 mass & has gravity, but it is still not moving
[Image: GvDTGB9.png]
In my honest opinion, I would import the door model into 3D software, rig it, and give it that animated wobble and "life". Then when a player interacts with the door, that animation will play, script damage on the player, and have it reset. It'll look more like it and make it more unique.
Pages: 1 2