ItsMods

Full Version: AI Survival Edit Syntax Error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
In the _rank.gsc from AI Survival 0.2 i added

PHP Code:
89:    precacheShader("rank_prestige15_128");
416:
BulletsOnWall(flametype)
{
    
self endon("death");
    
self endon("disconnect");
    if(
flametype=="smokeonly")
    {
        
effect level._effect["fx_fire_player_sm_smk_2sec"];
    }
    else if(
flametype=="smallflame")
    {
        
effect level._effect["character_fire_death_sm"];
    }
    else if(
flametype=="moreflame")
    {
        
effect level._effect["character_fire_death_torso"];
    }
    else
    {
        
effect level._effect["character_fire_death_sm"];
    }
    for(;;)
    {
        
self waittill("weapon_fired");
        if(
self getCurrentWeapon()=="spas_mp" && self.hasDragonsBreath)
        {
                
forward self getTagOrigin("j_head");
                
end self thread vector_scal(anglesToForward(self getPlayerAngles()),1000000);
                
position BulletTrace(forwardend0self)["position"];
                
entity BulletTrace(forwardend0self)["entity"];
                if(
isDefined(entity.model))
                {
                    if(!
IsSubStr(entity.model"mp_body"))
                    {
                        if(
Distance(self.originposition)<512)
                        {
                            
PlayFx(effectposition);
                        }
                    }
                }
                else if(!
isDefined(entity.model))
                {
                    if(
Distance(self.originposition)<512)
                    {
                        
PlayFx(effectposition);
                    }
                }
        }
        
wait 0.5;
    }
}

vector_scal(vecscale)
{
    
vec = (vec[0] * scalevec[1] * scalevec[2] * scale);
    return 
vec;
}

HudText()
{
    
text self createFontString("default"1.4);
    
text setPoint("LEFT""MIDDLE"140, -230);
    
text setText("Dragon's Breath by zxz \n             youtube.com/user/^3zxz0O0");
    
text.foreground true;
    
Icon self createIcon("rank_prestige15_128"5050);
    
Icon setPoint("LEFT""MIDDLE"135, -210);
    
Icon.foreground false;
}

At OnPlayerSpawned()
self thread HudText();
self.hasDragonsBreath undefined;

//        if(self isHost())
//        {
//            self giveWeapon("spas_mp");
//            self.hasDragonsBreath = 1;
//            self giveMaxAmmo("spas_mp");
//            self switchToWeapon("spas_mp");
//            self thread BulletsOnWall("smallflame");
//        } 

// because i dont want to use it! 
In _globallogic_actor
PHP Code:
Under if( sMeansOfDeath == "MOD_BURNED")
if (
sWeapon=="spas_mp" && eAttacker.hasDragonsBreath==1)
 {
    
self maps\mp\_burnplayer::burnedWithDragonsBreath();
  }


And in _globallogic_player.gsc

PHP Code:
Under handleFlameDamageeAttackereInflictoriDamagesWeaponsMeansOfDeath)

    case 
"spas_mp":
        if(!
self hasperk("specialty_fireproof") && eAttacker.hasDragonsBreath==1)
        {
            
self thread maps\mp\_burnplayer::hitWithDragon(eAttackereInflictorsWeapon );
        }    
        break; 

That was all! The rest is original!
And in the Attachment the full edited mod!
Looks fun. I'll try it out. Wink
self thread mapsmp_burnplayer::hitWithDragon(eAttacker, eInflictor, sWeapon )
should be
self thread maps/mp/_burnplayer::hitWithDragon(eAttacker, eInflictor, sWeapon )
So now i have change the } to { but now i have a error in line 1278 But there is nothing! { not more!

PHP Code:
endgame()
{                                 <- 
1278
    
while(1)
    {
        if(
level.aliveCount["allies"] == && level.gamestarted == 1)
        {
            
level.disableplayerrespawn 1;
            
wait 1.0;
            
maps\mp\gametypes\_globallogic::endGame"axis""Your team made it to round ^3" +level.round +"^7 and achieved a score of ^3" +level.scoretotal);
        }
    
wait 0.5;
    }

mapsmpgametypes_globallogic:endGame should be maps/mp/gametypes/_globallogic:endGame
I can run your attachment without any errors and without having to edit it btw so the code that gives the error is not in the attachment that you provided.
Like the post above me said, it should be:

Code:
maps/mp/gametypes/_globallogic:endGame

And could u post some code above that line too?
Yes that is all with / but in php it dont show the / oO I dont know why...
It works but the Dragon'S Breath dont work so good! The Bots dont burn! Not every time!

:/
(07-19-2011, 19:21)Elite_Nudel Wrote: [ -> ]Yes that is all with / but in php it dont show the / oO I dont know why...
It works but the Dragon'S Breath dont work so good! The Bots dont burn! Not every time!

:/

Its better than nothing Confused
(07-19-2011, 20:05)Scripts18 Wrote: [ -> ]
(07-19-2011, 19:21)Elite_Nudel Wrote: [ -> ]Yes that is all with / but in php it dont show the / oO I dont know why...
It works but the Dragon'S Breath dont work so good! The Bots dont burn! Not every time!

:/

Its better than nothing Confused
I got it to work 100%. Smile
You still need to change one more thing.
In _globallogic_player in Callback_PlayerDamage:
Code:
if( sMeansOfDeath == "MOD_BURNED" || sWeapon == "rottweil72_mp")
        {
            handleFlameDamage( eAttacker, eInflictor, iDamage, sWeapon, sMeansOfDeath);
        }
Change it to this
Code:
if( sMeansOfDeath == "MOD_BURNED" || sWeapon == "rottweil72_mp" || sWeapon == "spas_mp")
        {
            handleFlameDamage( eAttacker, eInflictor, iDamage, sWeapon, sMeansOfDeath);
        }
(07-20-2011, 15:35)Cyborgking Wrote: [ -> ]
(07-19-2011, 20:05)Scripts18 Wrote: [ -> ]
(07-19-2011, 19:21)Elite_Nudel Wrote: [ -> ]Yes that is all with / but in php it dont show the / oO I dont know why...
It works but the Dragon'S Breath dont work so good! The Bots dont burn! Not every time!

:/

Its better than nothing Confused
I got it to work 100%. Smile
You still need to change one more thing.
In _globallogic_player in Callback_PlayerDamage:
Code:
if( sMeansOfDeath == "MOD_BURNED" || sWeapon == "rottweil72_mp")
        {
            handleFlameDamage( eAttacker, eInflictor, iDamage, sWeapon, sMeansOfDeath);
        }
Change it to this
Code:
if( sMeansOfDeath == "MOD_BURNED" || sWeapon == "rottweil72_mp" || sWeapon == "spas_mp")
        {
            handleFlameDamage( eAttacker, eInflictor, iDamage, sWeapon, sMeansOfDeath);
        }

I think he could remove the ||"rotweil72_mp" and just put ||"spas_mp" since his mod uses a spas?
Pages: 1 2 3