Elven 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 862 
	Threads: 37 
	Joined: Aug 2011
	
 Reputation: 
26
		
	 | 
	
		
			
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   ?
			  
			
			
 
			
		 |  
	 
 | 
 
	| 08-16-2011, 04:55 PM  | 
	
		
	 | 
 
 
	
		
		Rapture 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 1,078 
	Threads: 79 
	Joined: May 2011
	
 Reputation: 
30
		
	 | 
	
		
			
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  | 
	
		
	 | 
 
 
	
		
		Elven 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 862 
	Threads: 37 
	Joined: Aug 2011
	
 Reputation: 
26
		
	 | 
	
		
			
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   ?
			  
			
			
 
			
		 |  
	 
 | 
 
	| 08-16-2011, 05:15 PM  | 
	
		
	 | 
 
 
	
		
		nemesis567 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 874 
	Threads: 65 
	Joined: May 2011
	
 Reputation: 
10
		
	 | 
	
		
			
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  | 
	
		
	 | 
 
 
	
		
		SonOfLiberty796 
 
 
		
			Senior Member 
			
			
			
 
			
	Posts: 371 
	Threads: 39 
	Joined: Aug 2011
	
 Reputation: 
2
		
	 | 
	
		
			
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  | 
	
		
	 | 
 
 
	
		
		JenniferOrange 
 
 
		
			Senior Member 
			
			
			
 
			
	Posts: 424 
	Threads: 43 
	Joined: Jun 2011
	
 Reputation: 
33
		
	 | 
	
		
			
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  | 
	
		
	 | 
 
 
	 
 |