Discaster 2
Author: | Disthron
|
Submitted: | 22nd October, 2009
|
Favourites: | 0 |
Genre: | Demo
| Downloads: | 493
|
Rated: |
|
|
Edited By Disthron on 2/9/2011
Edited By Disthron on 10/26/2009
Edited By Disthron on 10/22/2009
Hi every one.
I've continued working with the Ray Casting object and have figured out how to make walls that can be demolished and doors that can be unlocked with switches.
To make the breakable walls, at the start when the walls are being loaded for the collision detection I checked the Material ID (the number for the texture) for the wall that was being loaded. If the Material matched the one I had decided would be breakable instead of using the normal wall segment I created an active object to act as the wall instead. Then I loaded the walls x and y coordinates into a couple of the variables.
When the player shoots the wall, it takes the x and y coordinates stored in the object and changes that walls texture. Then destroys the object so the player can walk through.
For the switches/doors. Again, when the walls are being loaded in I check to see if the Material ID corresponds to one of the switches in the level. So in this demo there are 4 separate switch textures that all look the same but open different doors. When a Material ID matches one of the switches I create an active object in place of a wall, like with the destructible walls, this time I put the texture ID of the door I wont the switch to open.
When the door is loaded, if it's texture corresponds to one of the locked doors I load it's Material ID into the door object and set a "locked" property so the door will not open until it is "unlocked".
Finally, when the player activates the switch it searches through all the doors looking for a matching Material ID. Unlocking all the doors that have it.
Well that's a brief overview of how I did it. I hope that helps. Also, the source is included so you can take a look at that too. I'd be really interested to here any feedback from you guys and galls. What you liked, what you didn't like.
I uploaded a video of it to youtube if you'd like to check that out.
http://www.youtube.com/watch?v=72lhe2y4nyE
------------------------ [EDIT] ------------------------
I have been told that the downloads for my Discaster demos are down. So I have comiled them into 1 zip and re-uploaded them. Discaster 1-4 all point to the same download witch has all the demos.
Review This Download
http://www.megaupload.com/?d=XSRBXS4K (1.70 mkb )
|
|
Disthron
Registered 08/02/2005
Points 1101
Is this worth a look? Let others know! Favourite
|