Cruzore
Senior Member
Posts: 301
Threads: 2
Joined: Jun 2012
Reputation:
37
|
RE: 3 Questions: Cave In and Destroying bookshelf
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 |
|
Nervly
Junior Member
Posts: 40
Threads: 2
Joined: Feb 2012
Reputation:
0
|
RE: 3 Questions: Cave In and Destroying bookshelf
(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
And thanks, Ill try that!
EDIT:
Will the candles still give light, even when when changed to object?
(This post was last modified: 06-21-2012, 05:04 PM by Nervly.)
|
|
06-21-2012, 05:01 PM |
|
Cruzore
Senior Member
Posts: 301
Threads: 2
Joined: Jun 2012
Reputation:
37
|
RE: 3 Questions: Cave In and Destroying bookshelf
Yes, they will still give a light. Even if not, you can just make a ?pointlight? yourself.
|
|
06-21-2012, 05:12 PM |
|
Nervly
Junior Member
Posts: 40
Threads: 2
Joined: Feb 2012
Reputation:
0
|
RE: 3 Questions: Cave In and Destroying bookshelf
(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?
|
|
06-21-2012, 05:19 PM |
|
Cruzore
Senior Member
Posts: 301
Threads: 2
Joined: Jun 2012
Reputation:
37
|
RE: 3 Questions: Cave In and Destroying bookshelf
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 |
|
Nervly
Junior Member
Posts: 40
Threads: 2
Joined: Feb 2012
Reputation:
0
|
RE: 3 Questions: Cave In and Destroying bookshelf
(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.
|
|
06-21-2012, 05:31 PM |
|
Cruzore
Senior Member
Posts: 301
Threads: 2
Joined: Jun 2012
Reputation:
37
|
RE: 3 Questions: Cave In and Destroying bookshelf
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 |
|
Nervly
Junior Member
Posts: 40
Threads: 2
Joined: Feb 2012
Reputation:
0
|
RE: 3 Questions: Cave In and Destroying bookshelf
(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
|
|
06-21-2012, 05:41 PM |
|
Cruzore
Senior Member
Posts: 301
Threads: 2
Joined: Jun 2012
Reputation:
37
|
RE: 3 Questions: Cave In and Destroying bookshelf
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"
(This post was last modified: 06-21-2012, 05:47 PM by Cruzore.)
|
|
06-21-2012, 05:46 PM |
|
Nervly
Junior Member
Posts: 40
Threads: 2
Joined: Feb 2012
Reputation:
0
|
RE: 3 Questions: Cave In and Destroying bookshelf
(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?
|
|
06-21-2012, 07:45 PM |
|
|