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?
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


Messages In This Thread
How to create falling rock? - by Elven - 08-16-2011, 04:55 PM
RE: How to create falling rock? - by Rapture - 08-16-2011, 05:12 PM
RE: How to create falling rock? - by Elven - 08-16-2011, 05:15 PM
RE: How to create falling rock? - by nemesis567 - 08-16-2011, 05:17 PM
RE: How to create falling rock? - by SonOfLiberty796 - 08-16-2011, 06:45 PM



Users browsing this thread: 1 Guest(s)