| Home Page | Recent Changes | Preferences

VitalOverdose/VecLava

UT2004 :: Actor >> brush >> volume >> PhysicsVolume >> LavaVolume? Package:(custom)LavaVolume.
class VecLava extends LavaVolume;

struct                        Timerecord
{
var OnsVehicle                TheVec;
var float                     TheTime;
};var Array< Timerecord >     TimeRecords;

var() float                   TimeTillBurn;
var() float                   Timerfrequency;
var() class<emitter>          FlameEffectClass;

 function touch(actor other)
 {
 if (other.IsA('OnsVehicle'))
    {
    TimeRecords.insert(0,1);
    TimeRecords[0].TheVec   = OnsVehicle(other);
    TimeRecords[0].TheTime  = TimeTillBurn;
    if (TimeRecords.length == 1)
        SetTimer(0.25,false);
    }
 super.touch(other);
 }

 simulated function Timer()
 {
 Local int     counter;
 local VecLava FoundVecLava;
 local emitter SpawnedEmitter;

 for ( counter=0 ; counter< TimeRecords.length ; counter++)
     {
     foreach radiusactors(class'VecLava' , FoundVecLava , TimeRecords[counter].TheVec.default.collisionradius*1.5 , TimeRecords[counter].TheVec.location)
                         {
                         TimeRecords[counter].TheTime += 0.25;
                         if (TimeRecords[counter].TheTime == 0)
                            {
                             while(SpawnedEmitter == none)
                                   SpawnedEmitter = Spawn(FlameEffectClass , self ,, TimeRecords[counter].TheVec.Location , TimeRecords[counter].TheVec.Rotation);
                             SpawnedEmitter.setbase(TimeRecords[counter].TheVec);
                             break;
                            }
                         }
     if (FoundVecLava == none)
        {
        TimeRecords[counter].TheTime -= 0.25;
        if (TimeRecords[counter].TheTime == 3)
            TimeRecords.remove(counter , 1);
        }
     }
 if (TimeRecords.length != 0)
     SetTimer(timerfrequency,false);
 }

defaultproperties
{
     TimeTillBurn=5.000000
     FlameEffectClass=Class'OnslaughtFull.ONSAutoBomberDeathFlames'
}

Tarquin: Please could you explain what this script is for and how it works?

The Unreal Engine Documentation Site

Wiki Community

Topic Categories

Image Uploads

Random Page

Recent Changes

Offline Wiki

Unreal Engine

Console Commands

Terminology

FAQs

Help Desk

Mapping Topics

Mapping Lessons

UnrealEd Interface

UnrealScript Topics

UnrealScript Lessons

Making Mods

Class Tree

Modeling Topics

Chongqing Page

Log In