Particles: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
Fidcal (talk | contribs)
Line 26: Line 26:


* Note that 'Choose Model' does not assign a model or models to be emitted such as a leaf or snowflake (see [[Particle Editor]]) No, if you choose model then it just assigns a visible model shape to the entity in the normal way. I guess one could use a chimney pot in our example but the particle effect would have to be customised to line up so we shall create a separate particle effect and just place it over a chimney. Depends on what you are doing whether you need a model at the position of the particle effect. It does save on entities, but it is less flexible.
* Note that 'Choose Model' does not assign a model or models to be emitted such as a leaf or snowflake (see [[Particle Editor]]) No, if you choose model then it just assigns a visible model shape to the entity in the normal way. I guess one could use a chimney pot in our example but the particle effect would have to be customised to line up so we shall create a separate particle effect and just place it over a chimney. Depends on what you are doing whether you need a model at the position of the particle effect. It does save on entities, but it is less flexible.
==Switching Particles on and off==
func_emitter can be turned on and off by using target from any targetting entity eg a button or lever.
Particle effects can also be created using the [[Stim/Response]] system.
==Starting OFF at game start==
To start a particle effect OFF at game start give the func_emitter the property and value...
start_off 1
You can then make it start when you want by using target from any targetting entity eg a button or lever.
Note that the particle effect may be very briefly visible at game start then turn off within a second. This is normal and I don't think can be avoided. In most cases this doesn't matter if the effect is not in the player's view right at game start.


== Creating Your Own Particle Effects ==
== Creating Your Own Particle Effects ==

Revision as of 02:53, 14 June 2010

written by Fidcal


Introduction

Particles are VERY flexible - they can function as rain, snow, falling leaves, oscillating leaves and foliage, smoke, mist, flame, trickling sand, trickling water, drips, waterfall, spray, fountain - anything that can be made up of particles, big or small, fast or slow.

There are already many particle effects available to the Dark Mod mapper. This tutorial is just the basics of how to get particle effects, new or old, into your mission...


Getting Particle effects into your game

First, all that is assumed is you know the essentials described in Dark Radiant Must Know Basic Intro

Like so many things - it's easy when you know how. Let me describe by example. Say you want to have some smoke coming out of a chimney in your mission...

  • Right click and select Create Entity. Select func_emitter from the list.
  • Add the property : model
  • If you select the model property then you see two buttons at the bottom - Choose Model and Choose Particle.
  • Select the Choose Particles button (see below for information on Choose Model)
  • Select a particles effect from the list. For chimney smoke there are a couple of Doom ones - admin_hall_smk_cone.prt and mc2_hall_smk_cone.prt though they are a little bright (but could be modified in the Particles Editor and resaved as a new particles effect.) There are also a couple of Dark Mod ones - chimney_smoke1.prt and chimney_smoke2.prt at this time. Other DM stuff is under tdm_ but it's worth exploring the whole list to see what is available.
  • All that remains is to position your func_emitter over a chimney.
  • Note that there is a DR bug that does not allow you to rotate the func_emitter on the X or Y planes; however, there's some question whether most particles care about where the emitter is rotated.

That will give you a start. Try out some of the others so you see what is available and what is possible and then you can move on to more advanced stuff...

  • Note that 'Choose Model' does not assign a model or models to be emitted such as a leaf or snowflake (see Particle Editor) No, if you choose model then it just assigns a visible model shape to the entity in the normal way. I guess one could use a chimney pot in our example but the particle effect would have to be customised to line up so we shall create a separate particle effect and just place it over a chimney. Depends on what you are doing whether you need a model at the position of the particle effect. It does save on entities, but it is less flexible.


Switching Particles on and off

func_emitter can be turned on and off by using target from any targetting entity eg a button or lever.

Particle effects can also be created using the Stim/Response system.


Starting OFF at game start

To start a particle effect OFF at game start give the func_emitter the property and value...

start_off 1

You can then make it start when you want by using target from any targetting entity eg a button or lever.

Note that the particle effect may be very briefly visible at game start then turn off within a second. This is normal and I don't think can be avoided. In most cases this doesn't matter if the effect is not in the player's view right at game start.


Creating Your Own Particle Effects

You can create your own particle effects - or even easier - modify existing ones. To do this read Particle Editor.