dim3 Forum

Full Version: Problem With Missile
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
With my game, I changed a small bit in the editor - I added a few segments, and three enemies - Two with weapons which fire Missiles, and one with a weapon which fires a pulse slug. Now, every time I play, The console states:
Error: [Missile.js]
Animation doesn't exist ["Explode"].

But I definatly have this animation. It lags like crazy... Help?
Reasons it might lag:
-constant error
-some kind of useless loop in your script that leaks memory
-something has too many polys

about your animation:
-make sure it is spelled exactly the same, and make sure there are no spaces (like before or after)
-make sure it is capital
-if you must, copy it right from the script and into the animator.
writetyper Wrote:With my game, I changed a small bit in the editor - I added a few segments, and three enemies - Two with weapons which fire Missiles, and one with a weapon which fires a pulse slug. Now, every time I play, The console states:
Error: [Missile.js]
Animation doesn't exist ["Explode"].

But I definatly have this animation. It lags like crazy... Help?

I would suspect the animation problem is with the case (they are case sensitive). It's slower to check for case but I might have to change that as it's an error we see a lot.

Second, I suspect the script you added for the missile launcher does something way to frequently, you might want to paste in the script so we can take a look.

[>] Brian
Okay, maybe i should explain better.

I did nothing to the script, it was fine until I added a few extra segments in the map.
When I start the map, the console states: Could not find model: Missile or something like that. Then, The first portal has two enemies with pulse rifles, which fire "Missiles" (Which uses model Missile), and one enemy with pulse pistol, which fires "PulseSlug" (Which also uses missile), and one enemy with pulse cannon, which fires "RPC.DOWN" (Which uses "Pulse Missile Model") because his projectiles are heavily weighted so that he "fires down", and the first portal is fine. Runs at 40 fps. Then, when you enter the second portal, which has about 3 guys with pulse pistols, and two enemies with pulse rifles, and one enemy with pulse cannon down, and as soon as the pulse pistoliers start shooting, the console pops up and CONSTANTLY says "Could not find animation "Exlode" or something like that, so contantly that you can't shut the console, I can't tell you the framerate because I can't shut the console, but I estimate it's about 5, but the animation explode IS in there, and after a minute of this laggage, the console says "canot find spot to add new object" or something along those lines, and the enemies keep shooting, but no shots come out. Earlier today i completly redid the Missile model, changed its name to pulse shot, but still the same thing happened.

Please help, I spent ages making this map, and i think its by far two time better than anything else i've done.
It's the repeated errors that are slowing everything down. Try to eliminate or comment out the lines that are causing the errors to see if that fixes the slowdown. After that, we need to work to fix the errors.

I know you changed the map and think that caused it, but I think it might be a coincidence. Let's start with the scripts and go from there.

[>] Brian
The error about no more spots to spawn the effect means you have to many effects going.
btw: Don't worry 'bout the map, it'll get fixed. Wink
I'm not on my computer now, but i'll get the scripts soon. At the start of the script its says could not load model, could this be the problem? Anyway, i'll listen to you, you made it.

@ccccc: Its fixed. I tried to make a shotgun, every time I fired it it said that.


EDIT:

Missile script:

Code:
// ***********************************************************
//
// PROJECTILE: Missile
//
// ***********************************************************

//
// missile construction
//

function missileConstruct(proj)
{
        // model
        
    proj.model.on=true;
    proj.model.name="pulse_shot";
    
    proj.setting.resetAngle=true;
    
        // light
        
    proj.model.light.on=true;
    proj.model.light.intensity=5800;

        // speed
        
    proj.speed.speed=420;
    proj.speed.deceleration=100;
    proj.speed.decelerationWait=1500;
    
        // size and weight

    proj.action.autoHitTick=900;    //Auto destroys
        
    proj.size.x=350;
    proj.size.z=750;
    proj.size.y=350;
    proj.size.weight=0;
    
        // melee hits
        
    proj.melee.strikeBoneTag='Body';
    proj.melee.strikePoseName='Pose';
    proj.melee.radius=500;
    proj.melee.damage=10;
    proj.melee.force=0;
    proj.melee.lifeTick=1;

        // decal (for hitting map)
        
    proj.mark.on=true;
    proj.mark.name="mark_purple";
    proj.mark.size=600;
    proj.mark.alpha=1;    
}

//
// missile hit
//

function missileHit(proj)
{
        // this animation has the sounds, flash, shakes, and particle effects
        
    proj.model.animation.start('boom');

        // the melee
        
    proj.melee.spawnFromProjectileBone();
    
        // destroy projectile
        
    proj.action.destroy();
}

//
// missile spawn
//

function missileSpawn(proj)
{
    proj.model.animation.start('Flight');
}

//
// events
//

function event(proj,mainEvent,subEvent,eventId,tick)
{
    switch (mainEvent) {
    
        case DIM3_EVENT_CONSTRUCT:
            missileConstruct(proj);
            return;
    
        case DIM3_EVENT_SPAWN:
            missileSpawn(proj);
            return;
            
        case DIM3_EVENT_HIT:
            missileHit(proj);
            return;
    }
}

And Pulse Slug:

Code:
// ***********************************************************
//
// PROJECTILE: Missile
//
// ***********************************************************

//
// missile construction
//

function missileConstruct(proj)
{
        // model
        
    proj.model.on=true;
    proj.model.name="pulse_shot";
    
    proj.setting.resetAngle=true;
    
        // light
        
    proj.model.light.on=true;
    proj.model.light.intensity=5800;

        // speed
        
    proj.speed.speed=520;
    proj.speed.deceleration=100;
    proj.speed.decelerationWait=1500;
    
        // size and weight

    proj.action.autoHitTick=900;    //Auto destroys
        
    proj.size.x=350;
    proj.size.z=750;
    proj.size.y=350;
    proj.size.weight=0;
    
        // melee hits
        
    proj.melee.strikeBoneTag='Body';
    proj.melee.strikePoseName='Pose';
    proj.melee.radius=500;
    proj.melee.damage=19;
    proj.melee.force=0;
    proj.melee.lifeTick=1;

        // decal (for hitting map)
        
    proj.mark.on=true;
    proj.mark.name="mark_purple";
    proj.mark.size=600;
    proj.mark.alpha=1;    
}

//
// missile hit
//

function missileHit(proj)
{
        // this animation has the sounds, flash, shakes, and particle effects
        
    proj.model.animation.start('boom');

        // the melee
        
    proj.melee.spawnFromProjectileBone();
    
        // destroy projectile
        
    proj.action.destroy();
}

//
// missile spawn
//

function missileSpawn(proj)
{
    proj.model.animation.start('Flight');
}

//
// events
//

function event(proj,mainEvent,subEvent,eventId,tick)
{
    switch (mainEvent) {
    
        case DIM3_EVENT_CONSTRUCT:
            missileConstruct(proj);
            return;
    
        case DIM3_EVENT_SPAWN:
            missileSpawn(proj);
            return;
            
        case DIM3_EVENT_HIT:
            missileHit(proj);
            return;
    }
}
Anyone know what the problem is yet, or how to fix it?
Your scripts don't call for animation "explode". They call for "boom"
Yeah, and i changed the animation to boom to see if it would work.

At the start, the console says could not load model misssile.

What are the reasons a model might not load?
Pages: 1 2
Reference URL's