Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2005
    Posts
    1

    Problem exporting script from Particle System Editor

    I am trying to create an actor out of an emitter. I downloaded the patch so that could use the new Particle System Editor. I created a folder for my package in the UT2004 folder and gave it a 'Classes' subfolder. In Unreal Level Editor I already had the emitter made so I selected it and opened the Particle Editor from the Tools menu. I selected the Export to Script button and it created a .uc file in my classes folder.
    The problem arises when I run ucc make. I have added my package to the EditPackage list in the UT2004 folder and ucc make finds it but gives me the following error:
    Error, Unexpected 'Begin'
    Compile aborted due to errors
    Apparently Unreal Level Editor is writing incomplete code for me. Here is the code it provided me in the .uc file:

    class FireEmitter extends Emitter;

    Begin Object Class=Emitter Name=Emitter0
    Emitters(0)=SpriteEmitter'myLevel.SpriteEmitter0'

    Emitters(1)=SpriteEmitter'myLevel.SpriteEmitter1'

    bHidden=True
    bNoDelete=False





    Rotation=(Pitch=-1960,Yaw=5328)

    End Object

    As you can see it is a two part emitter with one sprite emitter for fire and another for smoke.
    Does anyone know what I need to add to the code so that the compiler will like it? "Unexpected" implies that I am missing something simple like a set of brackets or something. I suspect this is an easy fix but I don't have any idea how unreal script is organized. Thanks.
    Last edited by RamonStick; 04-26-2005 at 02:22 PM.

  2. #2
    Join Date
    Sep 2003
    Location
    Raleigh, NC
    Posts
    7,272
    Here is a functioning emitter class so you can see what it should look like:

    Code:
    class ONSAVRiLRocketExplosion extends Emitter;
    
    defaultproperties
    {
         Begin Object Class=SpriteEmitter Name=SpriteEmitter7
             UseColorScale=True
             RespawnDeadParticles=False
             UseSizeScale=True
             UseRegularSizeScale=False
             UniformSize=True
             AutomaticInitialSpawning=False
             UseRandomSubdivision=True
             ColorScale(0)=(Color=(B=64,G=64,R=64,A=255))
             MaxParticles=2
             AddLocationFromOtherEmitter=1
             StartLocationShape=PTLS_Sphere
             SizeScale(0)=(RelativeSize=1.000000)
             SizeScale(1)=(RelativeTime=1.000000,RelativeSize=1.500000)
             InitialParticlesPerSecond=5000.000000
             DrawStyle=PTDS_AlphaBlend
             Texture=Texture'AW-2004Particles.Weapons.DustSmoke'
             TextureUSubdivisions=4
             TextureVSubdivisions=4
             LifetimeRange=(Min=1.000000,Max=1.000000)
         End Object
         Emitters(0)=SpriteEmitter'Onslaught.ONSAVRiLRocketExplosion.SpriteEmitter7'
    
         Begin Object Class=SpriteEmitter Name=SpriteEmitter5
             RespawnDeadParticles=False
             SpinParticles=True
             UseSizeScale=True
             UseRegularSizeScale=False
             UniformSize=True
             AutomaticInitialSpawning=False
             BlendBetweenSubdivisions=True      
             Opacity=0.800000
             MaxParticles=8
             StartLocationShape=PTLS_Sphere
             SphereRadiusRange=(Min=32.000000,Max=64.000000)
             StartSpinRange=(X=(Max=1.000000))
             SizeScale(0)=(RelativeSize=0.750000)
             SizeScale(1)=(RelativeTime=1.000000,RelativeSize=2.000000)
             StartSizeRange=(X=(Min=75.000000,Max=75.000000))
             InitialParticlesPerSecond=2000.000000
             Texture=Texture'ExplosionTex.Framed.exp1_frames'
             TextureUSubdivisions=2
             TextureVSubdivisions=4
             LifetimeRange=(Min=0.400000,Max=0.400000)
         End Object
         Emitters(1)=SpriteEmitter'Onslaught.ONSAVRiLRocketExplosion.SpriteEmitter5'
    
        
         AutoDestroy=True
         bNoDelete=False
    }
    I also think these two lines of your code:
    Code:
     Emitters(0)=SpriteEmitter'myLevel.SpriteEmitter0'
    
    Emitters(1)=SpriteEmitter'myLevel.SpriteEmitter1'
    should probably have myLevel replaced with the package.name of your class.

    If you want to be able to place the emitter in maps, you would also need to change the first part to:
    Code:
    class ONSAVRiLRocketExplosion extends Emitter
            placeable;
    Last edited by ffejnosliw; 04-26-2005 at 02:48 PM.

  3. #3
    Join Date
    Apr 2005
    Posts
    19
    Also add defualt properties instead of leaving the code hanging in the open.

    It should look like

    class FireEmitter extends Emitter;

    defualt properties
    {
    Begin Object Class=Emitter Name=Emitter0
    Emitters(0)=SpriteEmitter'myLevel.SpriteEmitter0'
    Emitters(1)=SpriteEmitter'myLevel.SpriteEmitter1'
    bHidden=True
    bNoDelete=False
    Rotation=(Pitch=-1960,Yaw=5328)
    End Object
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •