PDA

View Full Version : Beginner's Tutorial: Moving Brush Destruction


CarlBillen
03-31-2002, 03:23 AM
Level : Beginners
Assumed Knowledge : Basic Navigation, The Basic Room Tutorial
Encountered Entities : Moving Brush, PlayerMarker, Damager, Trigger
What will you have learned:
- How to make something you can destroy
- How to use a Damager to destroy stuff
- How to use a Trigger for counting
- How do give the players a certain set of weapons when spawning
This tutorial assumes you are using the Serious Sam: The Second Encounter editor.


So let's begin!

1. Make a new map and save it as 'Moving Brush Destruction'. Remember to save regularly!

2. Make a room by creating a Conus Primitve with the following parameters:
Position: X=0, Y=0, Z=0
Size: Width=10, Length=16, Height=8
and make sure that the Room flag is checked.

3. Add this to the World Base by pressing the Add button.

4. Toggle the shadows off (by pressing H) so that you can see something.

5. Give the room a nice texture by going to polygon mode (press P) and doubleclicking the room; this selects all the sides in the room. Then press W and select Textures. You can then choose a nice texture. I like the Default.tex found in the "3-1 Gothic Castle" directory of the textures (I am using Serious Sam : The Second Encounter textures), because every square corresponds to the dimensions of a 1x1 square (which is 1 meter by 1 meter)

6. Press W to get the shortcut list and choose 'Basic Entities'. Drag a Moving Brush entity on your map, press Q to invoke the Tools window and set the position to : X=-2, Y=0, Z=-7.

7. Go to entity mode by pressing E, select the Moving Brush and set its Name property to mbRed.

8. Give the brush a shape bij adding a Conus Primitive with the following parameters:
Position: X=-2, Y=0, Z=-7
Size: Width=4, Length=2, Height=2
and ensure that the Room flag is NOT checked.

9. Press the add button to the World Base.

10. Go to polygon mode (press P), select all the sides of the shape just added (by doubleclicking the shape) and give it a red texture. You can do this by choosing a texture, or you can do like I did: keep the Default.tex texture, invoke the tools window by pressing Q, select the Texture tab, and click on the color button to choose a color, like RGB(255,0,0).

11. Go to entity mode (by pressing E) and select the red block. Remember we called it mbRed? Set the following properties:
Health = 1 -> if health = -1 then it can't be damaged
Debris count = 12 -> if it is destroyed, it will show 12 pieces of debris
Cube factor = 1 -> determines the size of the debris
Color of debrises : a red color -> determines the color of the debris

12. Save the level, press 6 on the Numeric keypad to make the 3D view full screen and test the level (by pressing T while the pointer is on one of the map views or 3D view). You will see a nice red block in the room. You can shoot it several times, but you can't destroy it! Why? Because you can only damage a Moving Brush with certain weapons... So let's check that out first... Press Esc to stop testing, and press 0 on the Numeric keypad to get your regular editing view back.

13. Drag a PlayerMarker entity (it's a Basic Entity, you can use the shortcut W key again) onto the map and set its position to X=0, Y=0, Z=4. Set the property GiveWeapons to 16383 (this value enables all weapons).

14. Save and test the map again, and notice which weapons can destroy the red block. You will notice after some experimenting that only the Rocket Launcher, the Grenade Launcher, the Laser Rifle and the Cannonball (but not the Cannonball Explosion!) can affect the block.

15. Select the PlayerMarker entity again and set the Given Weapons property to 2176. This value represents the Rocket Launcher (128) and the Laser Rifle (2048), and we want them both, so 128+2048=2176. Note that the Knife and The Colt are always given to the player, even if you don't enable them (by setting Given Weapons to 0).
Set the Max Ammo Ratio property to 1, to ensure that we have 100% of the maximum ammo per weapon (0.5 would result in 50% ammo; 0 does not result in 0% ammo, because there's always a minimum limit of available ammo).

16. Select the red block (you should still be in entity mode) and set its Health to 100.

17. Save and test the level; count the shots before the block is destroyed. Now you can toy around by varying the red block's Health and counting the shots to have an idea how much damage each weapon does to the block. Note that the Rocket Launcher does less damage if you're shooting right next to the block, because the explosion does less damage than a direct hit (you will notice this if you increase the block's health a bit, because the Rocket Launcher does a lot of damage! Remember to set the Health back to 100 if you experimented a bit with different values.

18. Set the PlayerMarker's Give Weapons to 2048 (Laser Rifle only). You might have noticed that each shot does 20 damage to the block. Because this weapon does not hurt you if you're standing too close to your target when firing at target, we're going to continue using it in this tutorial. Feel free to use another weapon, but this tutorial assumes you only do 20 damage per shot.

19. Let's make two more blocks to destroy :). Goto entity mode (press E), select the red block and copy it (by using the menu or pressing Ctrl+C). Point on a free spot on the map, paste it (Ctrl+V), and modify its name to mbGreen. Set its Position to X=2, Y=0, Z=-7, and Color of debrises to a green color (like RGB(0,255,0)). Paste a second block, but call it mbBlue, place it at X=0, Y=2, Z=-7 and give the debrises a blue color (like RGB (0,0,255)). Switch to polygon mode and modify the textures so that mbGreen has a green texture, and mbBlue has a blue texture (you can use my trick with the color button on the Texture tab again if you wish).

20. Save the level again and test it. You now have a blue block on top of the red and green blocks, and when you destroy a block in shatters in pieces which have the same color as the block.

21. But wait! When you destroy the green and red block, and the blue block stays hovering in the air! You can now treat this situation in several ways:
a) Do nothing: let the block float (it worked perfectly in Worms ;))
b) Make the block drop down. But because this tutorial is about 'Moving Brush Destruction', we are going to choose...
c) Destroy the blue block when the green and red one are destroyed.

22. Drag a Damager (it's a Basic Entity) onto the map, and place it at position X=0, Y=0, Z=-2 and set the following properties:
Name: dmgBlue
Ammount: 50
Type: Projectile
Set Entity to Damage: mbBlue
Each time the damager is triggered, it will do 50 damage to the blue block.
If you click the 'Show Targets' button (or press G) you will see an arrow going from the damager to the blue block, showing the relation between the Damager dmgBlue and the Moving Brush mbBlue. I will assume you'll keep the Show Targets option on for the rest of the tutorial.

23. Select the red block, and set the following properties:
Blowup Event - Target : dmgBlue
Blowup Event - Event Type : Trigger Event.
Do the same for the green block.
You will notice there are two arrows pointing from the red and green block to the damager, showing the relationship between the blocks that will trigger an event when destroyed ('blown up') and the damager.

24. Save and test the level. Shoot at the green and red block, and when the second block is destroyed, the blue block will be destroyed as well.

25. Now do you remember that every Laser Rifle shot did 20 damage? Test the level again and destroy the red block. The destruction of the red block triggers the damager, which does 50 damage to the blue block. So only 3 shots (which is 60 damage) are needed to destroy the blue block. Conclusion: if you destroy a block underneath the blue one, you will indirectly damage the blue block.

26. But what if you don't want that? You'd like to have the situation that if you destroy an underlying block, that this results in no Health loss for the blue block. How is this done?

27. Drag a Trigger (that's another Basic Entity) onto the map and place it at position X=-2, Y=0, Z=-2. Set the following properties:
Name: trgSupportingBlockDestroyed
Count: 2
Count Use: True (check the checkbox)
Event Type Target 01: Trigger Event
Target 01: dmgBlue
Furthermore, select the red and green block and change their Blowup Event - Target to trgSupportingBlockDestroyed.
Finally, set the damager's Ammount property to 100 (which is the same value as the Health of the blue block).

28. Whoa! What does this all mean? Well, if the red or green block is destroyed, its Blowup Event triggers the Trigger. Now this trigger will count (Count Use = True) how many times it has been triggered, and if it is triggered 2 times (Count = 2) then the trigger will trigger the Damager. This damager does 100 damage (Ammount = 100) to the blue block, which has a Health of 100 damage, which results in the blue block's destruction. You don't believe me?

29. Save and test the level. You will notice that after one of the underlying blocks has been destroyed, you still need 5 laser shots to destroy the blue block. There has been no Health loss to the blue block when the red or green block has been destroyed.

30. You know know how to blow things up, either by shooting them, and/or indirectly via a damager. Have fun! :D


Comments are always welcome :P . Because I am still very new at using the Serious Editor, feel free to point at errors that might have crept in, or if something isn't clear enough, I'll try to write it in a different way.

Carl

Shrinker
03-31-2002, 03:39 AM
donīt you think the Assumed Knowledge is a bit too high for beginners??

Earthling
03-31-2002, 04:47 AM
Basic Navigation and Basic Room Tutorial isn't that much...

CarlBillen
03-31-2002, 05:04 AM
Well, with
Assumed Knowledge : Basic Navigation, The Basic Room Tutorial
I meant that you have done at least the 'Navigation Tutorial' and the 'The Basic Room Tutorial' from the 'Serious Sam : The Second Encounter' Serious Editor Help File, which means that the beginner already knows how to use editor a little, and has made his very first room. That is what I meant with 'Assumed Knowledge'.

And with
Encountered Entities : Moving Brush, PlayerMarker, Damager, Trigger
What will you have learned:
- How to make something you can destroy
- How to use a Damager to destroy stuff
- How to use a Trigger for counting
- How do give the players a certain set of weapons when spawning

I meant that after having done the tutorial, the beginner will probably have used a Moving Brush (the thing you want to destroy), a Damager, a Trigger (both for 'indirect destruction') and a PlayerMarker entity (for the weapons selection) for the first time.

And I thought I made the tutorial pretty clear, even for a beginner; I often mentioned which key to press; I explicitly told which are the important properties to set, and at which position to place everything. And I made this a kind of 'feel free to experiment' tutorial, so I thought I would be good for beginners...

I thought it was around the same level as the 'Breakable Glass Tutorial' written by GaryP which can be found at http://www.3dactionplanet.com/serioussam/tutorials/breakglass.shtml

Actually, I myself have only followed the Navigation Tutorial, the Basic Room Tutorial and this Breakable Glass Tutorial. This last tutorial was so much fun to follow that I started experimenting with the Trigger and Damager, and then I came up with the 'destroy the thing on top of two other things' idea, and I decided while I was trying this out, to write down all the steps I did. I then put it into a nicer form and the tutorial I posted is the result of this... So my 'Assumed Knowledge' isn't too big either ;)

Carl

Iirion Claus
03-31-2002, 08:39 AM
How about asking Seriously! to add it to their tutorials section?

Naythn
03-31-2002, 09:11 AM
Originally posted by Iirion Claus
How about asking Serious Editing (http://www.massassi.net/serious) add it to their tutorials section?

http://forums.seriouscommunity.com/images/icons/icon14.gif

toastar
03-31-2002, 09:49 AM
Originally posted by Naythn


http://forums.seriouscommunity.com/images/icons/icon14.gif
:rofl:

Michael Harris
03-31-2002, 11:06 AM
Yes, if you are so inclined..... submit it to Seriously! (and also consider submitting it to the Serious Editing site www.massassi.net/serious ........ as they seem to get tutorials posted a lot faster that Seriously! .......... and its good to share the wealth).

I gather that both sites would probably prefer to receive it in the form of plain text rather than HTML, though they'll accept HTML if that's what you prefer or if you find it a better way of supplying images. Images would be good. If submitting in plain text form, just put a standardly formatted note of some point at each point that an image is to go, containing the image file name, for their reference when they convert it to HTML)....... and send the images along with the text.