Frictional Games Forum (read-only)

Full Version: New Question: How to create a door
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8
Just like the shelf you made yourself, open the book rows, book piles and the open books with the model editor, change the type to object and subtype to static, save in entities of your own custom story and use it inside the level editor. You have to make 1 different entity only(1 book_row02, 1 book_row01, 1 book_pile01, and all other types.). For the candlestick, you also have to change the type to object and subtype to static.
One more thing: make sure the Staticphysic box is checked in the level editor for them all, or someone might push it away before using the hammer.
Sorry for the late answer, I didn't see the edit, and it took some time to test it myself to see if it works.
(06-21-2012, 04:40 PM)FastHunteR Wrote: [ -> ]Just like the shelf you made yourself, open the book rows, book piles and the open books with the model editor, change the type to object and subtype to static, save in entities of your own custom story and use it inside the level editor. You have to make 1 different entity only(1 book_row02, 1 book_row01, 1 book_pile01, and all other types.). For the candlestick, you also have to change the type to object and subtype to static.
One more thing: make sure the Staticphysic box is checked in the level editor for them all, or someone might push it away before using the hammer.
Sorry for the late answer, I didn't see the edit, and it took some time to test it myself to see if it works.
No problem for the late answer Smile
And thanks, Ill try that!

EDIT:
Will the candles still give light, even when when changed to object?
Yes, they will still give a light. Even if not, you can just make a ?pointlight? yourself.
(06-21-2012, 05:12 PM)FastHunteR Wrote: [ -> ]Yes, they will still give a light. Even if not, you can just make a ?pointlight? yourself.
Hmm, you're right.
But there is no way to light a candle that is a object, right?
Maybe you could make a callback for when you use that candle, it activates a pointlight, but it's better to just let it be lit
(06-21-2012, 05:22 PM)FastHunteR Wrote: [ -> ]Maybe you could make a callback for when you use that candle, it activates a pointlight, but it's better to just let it be lit
Yeah, I think it's better too.
So, bookshelf problem is solved ^^
Now for the cave_in, I put the script in the same .hps folder next to the bookshelf script?
And then how do I make to activate it in-game, if possible? Like step an area that would make the cave_in appear.
if the cave in script is in the same map as the bookshelf one, but both in 1 script file and let it have the same name as the map.
for activating the cave_in, it depends what exactly you want. Do you want the cave in to happen when you go in a specific place, when you pick something up (name please) or use something(also a name)?
(06-21-2012, 05:40 PM)FastHunteR Wrote: [ -> ]if the cave in script is in the same map as the bookshelf one, but both in 1 script file and let it have the same name as the map.
for activating the cave_in, it depends what exactly you want. Do you want the cave in to happen when you go in a specific place, when you pick something up (name please) or use something(also a name)?
I want the cave in to happen when I go in a specific place Smile
make a script area for that specific place, name it something(in this example cavein_area)
add to the script:
under void OnStart():
AddEntityCollideCallback("Player", "cavein_area", "cavein_function", true, 1);
Now, somewhere not inside a function:
void cavein_function(string &in asParent, string &in asChild, int alState)
{
//Your stuff to happen, like setentityactive and all that
}
you can look at the engine scripts page to see which is for what, not too hard.
Edit: If that doesn't work, switch "Player" with "cavein_area"
(06-21-2012, 05:46 PM)FastHunteR Wrote: [ -> ]make a script area for that specific place, name it something(in this example cavein_area)
add to the script:
under void OnStart():
AddEntityCollideCallback("Player", "cavein_area", "cavein_function", true, 1);
Now, somewhere not inside a function:
void cavein_function(string &in asParent, string &in asChild, int alState)
{
//Your stuff to happen, like setentityactive and all that
}
you can look at the engine scripts page to see which is for what, not too hard.
Edit: If that doesn't work, switch "Player" with "cavein_area"
Do I make a new void OnStart() or do I write the script under the shelf one?
Pages: 1 2 3 4 5 6 7 8