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
How to create falling rock?
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#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
Rapture Offline
Posting Freak

Posts: 1,078
Threads: 79
Joined: May 2011
Reputation: 30
#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
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#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
nemesis567 Offline
Posting Freak

Posts: 874
Threads: 65
Joined: May 2011
Reputation: 10
#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
SonOfLiberty796 Offline
Senior Member

Posts: 371
Threads: 39
Joined: Aug 2011
Reputation: 2
#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
JenniferOrange Offline
Senior Member

Posts: 424
Threads: 43
Joined: Jun 2011
Reputation: 33
#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.

Ba-da bing, ba-da boom.
08-17-2011, 12:55 AM
Find




Users browsing this thread: 1 Guest(s)