Spew!

You will learn how to insert a spew into a level and use its many fields for level effects.

What You Need: Basic Scripting Knowledge

Level Setup: A new level with the default room will work. Insert an object of type forcefieldnode into the level and name it "spewer".



What is a Spew, anyway? A spew is a collection of little blobs that are… spewed. Each blob is basically an animation thrown into the air with some configurable variables.

DALLAS: Insert a script, make the owner the level, the event level start; set the condition to always and the first event to ghost object (objects>ghost/unghost object [object]) spewer.

Add a new action from under the spew section, turn on spew. Set the object to spew from as spewer, the gunnum as 0, the spew type as blue fire, the spew life as –1 and uncheck all physics flags. Set IsObjectReal to true. Leave all the other properties at their defaults. You now have a pain-inflicting flame spew that is always on.

For experimental purposes, you can adjust some properties to make it more apparent how a spew works. To do this, take the above spew setup and change the Blob interval to 3. This will make each blob easily identifiable.


Great, now what did I just do? Now for the long, boring, and complex part of trying to explain what all those fields mean and how to use them...

Object: Simply the object that emits the spew blobs.

GunNum: This is the Gunpoint that the spew is emitted from.

Note that not all objects have gunpoints, why I "always" use the forcefieldnode as my spewer. You can see if an object has gunpoints by placing it in a level and looking at it in textured view. If you see little orange balls on sticks sticking out of the object, it has gunpoints. The little balls will be numbered so you can see where the gunpoints are on the object.

Spew Type: What animation is used for the blobs.

Note, the item listed as "napalm" under that field does not work; you have to use blue fire in its place.

Mass: The "weight" given to the little blobs. It can typically be left at 0; most spews don’t have much in physics.

Note: if you use the "gravity" or "reverse gravity" flags, the mass will effect how much the blobs move in response to the gravity.

Drag: The amount of stopping force the blobs have. Higher drag will make the blobs slow down, and even stop in mid air. Most often left at 0.

Physics Flags: These are check-able flags that help define how the blobs work and act in game.

Fixed Velocity: Means that the blobs will always move at the same speed throughout their life times.

Gravity: Makes the blobs affected by the levels gravity.

Note: if you don’t add gravity to a level and mass to the blobs, checking this flag will have no effect.

No Collide: Makes it so the blobs will not hit anything. Checking this flag means that a blue fire spew will not hit and damage a ship. Most often-used on steam or black smoke spews that are used for visual effect only.

Reverse Gravity: Just like the gravity flag, but makes the blobs move in reverse to the gravitational effects (rising steam).

Is Object Real: This defines whether or not the blobs are real objects, or just things to look at. Very similar to the "no collide" physics flag. Set it true if you want the blobs to hit players and other objects.

Blob Lifetime: How long each individual blob will live.

Blob lifetime X blob speed = how far the blob will go into the air.

Blob Interval: How often the spewer throws a blob into the air. Higher blob intervals means more blobs per second, lower blob intervals means less blobs per second. Unit of measurement for blob interval is delay between blobs in seconds.

Spew Life: The lifetime of the spew as a whole. Simply, how long the spewer will spew the blobs from its "start point", or when the script turns on the spew. Setting the spew life at –1 makes the spew never turn off.

Blob Size: The size of the blob, or, how big the animation is that’s thrown into the air.

Blob Speed: The speed at which the blobs move.

Randomize: Makes the spew have a slight offset on the blob interval, creating a more realistic spew. "Always" leave true J

Spew Handle: This is the name you can assign to a spew. This would be used in a script where a flame spew would remain on until a switch was flipped to turn it off. For spews that are not going to be turned off, or timer controlled, this can be left blank.