I wanted to ask you more general stuff about static meshes. What are the drawbacks of creating meshes with UnrealEd?
And for example if I wanted to create a building with UnrealEd and save it as a static mesh what happens to the textures (especially if I use custom textures) are they saved in the myLevel package automatically or do they need an extra texture package?
I noticed my only "problem" left I have, with mapping, are the stupid sounds for breaking glass.
Ok, Kettch asked me these questions in a PM but I figured others could benefit from them as well.
Creating static meshes in the editor is only useful for very simple objects, and even then I wouldn't recommend it. My advice is to learn 3D modeling now, because you will definitely need that skill in the future. Once you start creating static meshes in a 3D app you'll hate yourself for not doing it sooner.
Custom textures (or any texture) should be referenced just fine, and you shouldn't encounter any problems as long as the player also has that custom texture package. If you're just using one texture from RigaDocks_T or something it might be better to save a copy of that texture to myLevel so players won't need to download the entire RigaDocks_T package.
As for specific downsides with creating static meshes from the editor...
Edited, see Evil Hobos post below.
In short, it is possible, but I wouldn't recommend it. A 3D app is the right way to make static meshes and it would be best to pick up on that now because BSP is rapidly becoming extinct.
Breakable Glass - Mini Tutorial
*Note* This is also how you make other destroyable objects.
So you want breakable glass eh? Well he's how you do it.
1. First step is to add the glass. In the
Actor Classes Browser navigate to
RODestroyableStaticMeshBase > RODestroyableStaticMesh and
add that to your map. Do not be alarmed when you see a panzerfaust warhead appear. It's glass, really, it just doesn't know it yet.
2. Now you need to find the glass static mesh that you will be using from the
Static Meshes Browser. I'll go with
fact_glass01 from the KrasnyiSM package but you can use other sheets of glass or even completely different objects if you like.
3. Once you have the static mesh selected go back to your
RODestroyableStaticMesh (the panzerfaust warhead) and open up its
properties (F4). Go to
Display > StaticMesh and hit the
'Use' button right beside it. You should now see that the warhead has been replaced with whatever static mesh you chose earlier. Position the window wherever you like.
4. Now you need to add the trigger that will control the breaking glass. Go to the
Actor Classes Browser > Keypoint > AIScript > ScriptedSequence > ScriptedTrigger and place the ScriptedTrigger down close to your window.
5. Open up the
ScriptedTrigger properties (F4) and go to
AIScript. Expand
[+]-Actions and click
Add. This first command is going to be
WaitForEvent, which you can find in the drop down menu right beside the current command, which is ACTION_ChangeWeapon. Once you've found WaitForEvent click
New. Under the new field,
ExternalEvent, type in
MyGlass_01.
6. The next command you will need to add is
PlaySound. Find it in the drop down menu and hit
New. Now you need to find a sound to play when the glass breaks. In your Sounds Browser go to
File > Open... Amb_Destruction and click on a sound you like. I chose
Krasnyi_Glass_Break04. Now, go back to the
Sound field located within
Action_PLAYSOUND and press
Use.
7. The final action to
add is an
Action_GOTOACTION action.
Put in
0 under the
ActionNumber. This will just reset the trigger back to the first action (0) after the sound has been played.
8. For the last step click on your
RODestroyableStaticMesh (the glass) and go into the
properties (F4). Under
RODestroyableStaticMeshBase input the following;
- bUsedDamagedMesh : False
- bWontStopBullets : True
- DestroyedEffect : Class'ROEffects.ROKrasnyi_glass1_Emitter'
- DestroyedEvent : MyGlass_01 (Important! This must match the Event in your AIScript > WaitForEvent!)
- Health : 1
- TypesCanDamage
Class'ROGame.ROWeaponProjectileDamageType'
Class'ROGame.ROWeaponBayonetDamageType'
Class'ROGame.ROWeaponBashDamageType'
Class'ROEngine.ROGrenadeDamType'
Class'ROGame.ROGrenShrapnelDamType'
If all went well you should now have a pane of glass that will get destroyed when shot at along with a matching glass shards emitter and even a sound! Let me know if you have questions/comments/etc.