User Tools

Site Tools


hpl2:tutorials:scripting:scaresbyjenniferorange

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
hpl2:tutorials:scripting:scaresbyjenniferorange [2012/04/19 01:24]
jenniferorange [Scare 3 - Exploding Pots]
hpl2:tutorials:scripting:scaresbyjenniferorange [2012/04/19 01:25]
jenniferorange [Scare 5 - Kill The Lights]
Line 112: Line 112:
 Good luck Good luck
  
-===== Scare - Falling Objects =====+===== Scare - Falling Objects =====
  
  
Line 122: Line 122:
  
 Place your box ontop of the shelf. The very very top is the preferred place, but if you use smaller objects like pots, it can go on any shelf. Just be sure it fits right. Because the shelf I chose has a back, the box had to be placed slightly hanging off the edge of the shelf. This is perfectly fine to do, just make sure the box doesn'​t slide off before we add a prop force. Last thing we need is a script area. Because I want the Player to notice the box, I've placed my script area about a foot away from the actual shelf. If you place the script area right below the box, the box may not fall in time and scare the player, but confuse them. However you can place the script area wherever you'd like. I've re-named mine **box_fall**. Time for scripting! Place your box ontop of the shelf. The very very top is the preferred place, but if you use smaller objects like pots, it can go on any shelf. Just be sure it fits right. Because the shelf I chose has a back, the box had to be placed slightly hanging off the edge of the shelf. This is perfectly fine to do, just make sure the box doesn'​t slide off before we add a prop force. Last thing we need is a script area. Because I want the Player to notice the box, I've placed my script area about a foot away from the actual shelf. If you place the script area right below the box, the box may not fall in time and scare the player, but confuse them. However you can place the script area wherever you'd like. I've re-named mine **box_fall**. Time for scripting!
- 
- 
 <code actionscript>​void OnStart() <code actionscript>​void OnStart()
 { {
Line 152: Line 150:
 The script here is rather self-explanatory. The Player collides with the script area, it triggers the prop force, the box falls. Super easy! I also didn't add pictures for this one as I figured it wouldn'​t be too difficult to figure out. Though if you need a picture reference I will add some. The script here is rather self-explanatory. The Player collides with the script area, it triggers the prop force, the box falls. Super easy! I also didn't add pictures for this one as I figured it wouldn'​t be too difficult to figure out. Though if you need a picture reference I will add some.
  
- +===== Scare - Kill The Lights =====
-===== Scare - Kill The Lights =====+
  
  
hpl2/tutorials/scripting/scaresbyjenniferorange.txt · Last modified: 2012/04/19 01:25 by jenniferorange