dim3 Forum

Full Version: Missile stuff up
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
My missile doesn't kill!

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

//
// missile construction
//

function missileConstruct(proj)
{
        // model
        
    proj.model.on=true;
    proj.model.name="Missile";
    
    proj.setting.resetAngle=true;
    
        // light
        
    proj.model.light.on=true;
    proj.model.light.intensity=5800;
    
    proj.model.lightColor.red=1;
    proj.model.lightColor.green=0;
    proj.model.lightColor.blue=0;

        // speed
        
    proj.speed.speed=300;
    proj.speed.deceleration=10;
    proj.speed.decelerationWait=10000;
    
        // size and weight
        
    proj.size.x=350;
    proj.size.z=750;
    proj.size.y=350;
    proj.size.weight=25;
    
        // melee hits
        
    proj.melee.strikeBoneTag='Body';
    proj.melee.strikePoseName='Normal';
    proj.melee.radius=6000;
    proj.melee.damage=200;
    proj.melee.force=40;
    proj.melee.lifeTick=1000;

        // decal (for hitting map)
        
    proj.mark.on=true;
    proj.mark.name="mark_normal";
    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('Explode');

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

//
// missile spawn
//

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

//
// 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;
    }
}
I don't see anything wrong.
Any console errors?
Maybe the meele radius isn't big enough?
The script looks right.
Is it possible the thing it's hitting is invicible or has damage turned off?

[>] Brian
I shoot joefoe and he doesn't die but dies if its another gun
Okay, I just changed my script to the default one, it worked, but when i changed the damage to 100, it didn't! thats the only thing I changed
How much health does your JoeFoe have?
Murderpuss2000 Wrote:Okay, I just changed my script to the default one, it worked, but when i changed the damage to 100, it didn't! thats the only thing I changed

Did you do that in the original demo? If so I can recreate and check it out, there might be a bug, or you might just need to hit them a bunch of times (JoeFoe's have more than 100 health.)

[>] Brian
joefoe has 100 health, missile damage is 100. I'll try it in the demo now

Just tried it. Missile on 100 damage, shoot first joefoestalk, he dies then the snipers don't die after 4 or 5 direct hits
Maybe the snipers have have more health Rolleyes.
They don't, usually the first joefoe i shoot dies, then no more do after that, no matter what kind
Reference URL's