Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to create falling rock?
Author Message
Elven Offline
Posting Freak

Posts: 861
Joined: Aug 2011
Reputation: 26
Post: #1
How to create falling rock?

I want to create that once player has passed one hole, a many rocks or huge rock would fall in front of it and player cant return anymore to the previous room.

How can I do that Smile?

The Interrogation
Chapter 1

My tutorials
08-16-2011 04:55 PM
Find all posts by this user Quote this message in a reply
Rapture Offline
Posting Freak

Posts: 964
Joined: May 2011
Reputation: 26
Post: #2
RE: How to create falling rock?

Well the easiest way would to make some rocks in the editor, set them to inactive. Then when they trigger your event, you set them active.
08-16-2011 05:12 PM
Find all posts by this user Quote this message in a reply
Elven Offline
Posting Freak

Posts: 861
Joined: Aug 2011
Reputation: 26
Post: #3
RE: How to create falling rock?

Hmm yes, I thought about that possibility as well... But I more meant like when person is looking live action. Is that possible Smile?

The Interrogation
Chapter 1

My tutorials
08-16-2011 05:15 PM
Find all posts by this user Quote this message in a reply
nemesis567 Offline
Posting Freak

Posts: 879
Joined: May 2011
Reputation: 10
Post: #4
RE: How to create falling rock?

Yes it is. You can do it using different ways. Physics, animation, movable props. Think a little bit and you'll find a way.

Today I dreamt the life I could live forever. You only know that when you feel it for you know not what you like until you've experienced it.
08-16-2011 05:17 PM
Find all posts by this user Quote this message in a reply
SonOfLiberty796 Offline
Senior Member

Posts: 371
Joined: Aug 2011
Reputation: 2
Post: #5
RE: How to create falling rock?

You could set the rocks inactive until the player triggers the event (Like what Rapture said) by setting up a script in the level editor then setting everything up in the .hps file

For instance, you use "AddEntityCollideCallback("Player", "rocksfalling", "rocksfall", true, 1);"
This means when the player collides with the "rocksfalling" script box (that you setup in the level editor) the event "rocksfall" begins, hence, the rocks fall and block the door.

Then "void rocksfall (string &in asParent, string &in asChild, int alState)" and use your commands from there.

So technically like this for example:

void OnStart()
{
AddEntityCollideCallback("Player", "rocksfalling", "rocksfall", true, 1);
}

void rocksfall (string &in asParent, string &in asChild, int alState)
{
(put all your commands in here, which would be the rocks falling)
}
08-16-2011 06:45 PM
Find all posts by this user Quote this message in a reply
JenniferOrange Offline
Senior Member

Posts: 424
Joined: Jun 2011
Reputation: 33
Post: #6
RE: How to create falling rock?

I always thought the easiest way was to set the rocks up in the air, making sure they're entites so they'll move around, and setting them inactive. When the player hits the script area, have them all activate and they'll look realistic falling from the ceiling.

[Image: button.png]
08-17-2011 12:55 AM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)