Sign in to follow this  
Followers 0
BosnianArmy

Calling last help for my map

11 posts in this topic

Hey there,

 

 

I'm wondering whats wrong with this script (for weapon and sniper room) since I'm geting this error: bad syntax/ level.activ setOrigin (acti.origin);

 

Others are saying my script is somehow broken and it should work.

 

Here are my 2 endroom scripts (sniper and weapon)

weapon_endroom()
{
level.weapon_trig = getEnt( "weapon_endroom_trig", "targetname"); //The trigger
jump = getEnt( "jump_weapon_origin", "targetname" ); //the origin the jumper will teleport
acti = getEnt( "activator_weapon_origin", "targetname" ); //the origin the acti will teleport

while(1) //loop
{
level.weapon_trig waittill( "trigger", player ); //waits until the jumper activates the room
level.oldTrig delete();
level.bounceTrig delete();
level.knife_trig delete();
level.sniper_trig delete();
if( !isDefined( level.weapon_trig ) ) //defines that it is the weapon trigger
return;        

player setOrigin( jump.origin ); //teleports the jumper
player TakeAllWeapons(); //takes all weapons from jumper
player GiveWeapon( "ak74u_mp" );
player giveMaxAmmo( "ak74u_mp" );
player GiveWeapon( "p90_mp" );
player giveMaxAmmo( "p90_mp" );
//jumper weapon 
if( isDefined( level.activ ) && isAlive( level.activ ) //makes sure the activator exists and is alive, otherwise it'll try to do things to a non-existant acti (._. )


level.activ setOrigin( acti.origin ); //teleports acti
level.activ TakeAllWeapons(); //takes all weapons from acti
level.activ GiveWeapon( "ak74u_mp" );
level.activ giveMaxAmmo( "ak74u_mp" );
level.activ GiveWeapon( "p90_mp" );
level.activ giveMaxAmmo( "p90_mp" );
 
wait 0.05;
        player.maxhealth = 100;
        level.activ.maxhealth = 100; //gives players normal health if damaged
player switchToWeapon( "tomahawk_mp" );
level.activ SwitchToWeapon( "tomahawk_mp" ); //this line means they switch to the weapon
iPrintLnBold( " ^4" + player.name + " ^7has chosen ^4WEAPON ^7room!" ); // announces on screen the player name and the knife room
while( isAlive( player ) && isDefined( player ) ) //if the player is alive the room will stay closed so no one can enter.
wait 1;
}
}
sniper_endroom()
{
    level.sniper_trig = getEnt( "sniper_endgame_trig", "targetname");
    jump = getEnt( "sniper_jump_origin", "targetname" );
    acti = getEnt( "sniper_acti_origin", "targetname" );
    
    while(1)
    {
        level.sniper_trig waittill( "trigger", player );
		level.oldTrig delete();
		level.bounceTrig delete();
		level.knife_trig delete();
		level.weapon_trig delete();

        if( !isDefined( level.sniper_trig ) )
        
        
        player setOrigin( jump.origin ); // Teleport jumper
        player TakeAllWeapons(); // Takes all jumper weapons 
        player GiveWeapon( "rpg_mp" ); //jumper weapon 
        player giveMaxAmmo( "rpg_mp" );		
{
        level.activ setOrigin( acti.origin ); //Teleports acti
        level.activ TakeAllWeapons(); // Take all acti weps 
        level.activ GiveWeapon( "rpg_mp" ); // Give acti a tomahawk
        level.activ giveMaxAmmo( "rpg_mp" );		
        wait 0.05;
		player.maxhealth = 100; // Player health
		level.activ.maxhealth = 100; // Acti health
        player switchToWeapon( "tomahawk_mp" ); //player weapon
        level.activ SwitchToWeapon( "tomahawk_mp" ); // Activator weapon
        iPrintLnBold( " ^4" + player.name + " ^7has chosen ^4SNIPER ^7room!" );     //change to what you want it to be
        while( isAlive( player ) && isDefined( player ) )
            wait 1;

	return;
}
0

Share this post


Link to post
Share on other sites

Activator isn't defined or alive in freerun, so you're trying to do things to a non existent activator..

 

if( isDefined( level.activ ) && isAlive( level.activ ) )

{

stuff here

0

Share this post


Link to post
Share on other sites

Activator isn't defined or alive in freerun, so you're trying to do things to a non existent activator..

 

if( isDefined( level.activ ) && isAlive( level.activ ) )

{

stuff here

 

 

so it has to be like this?..

sniper_endroom()
{
    level.sniper_trig = getEnt( "sniper_endgame_trig", "targetname");
    jump = getEnt( "sniper_jump_origin", "targetname" );
    acti = getEnt( "sniper_acti_origin", "targetname" );
    
    while(1)
    {
        level.sniper_trig waittill( "trigger", player );
		level.oldTrig delete();
		level.bounceTrig delete();
		level.knife_trig delete();
		level.weapon_trig delete();

        if( isDefined( level.activ ) && isAlive( level.activ ) )
        
        
        player setOrigin( jump.origin ); // Teleport jumper
        player TakeAllWeapons(); // Takes all jumper weapons 
        player GiveWeapon( "rpg_mp" ); //jumper weapon 
        player giveMaxAmmo( "rpg_mp" );		
{
        level.activ setOrigin( acti.origin ); //Teleports acti
        level.activ TakeAllWeapons(); // Take all acti weps 
        level.activ GiveWeapon( "rpg_mp" ); // Give acti a tomahawk
        level.activ giveMaxAmmo( "rpg_mp" );		
        wait 0.05;
		player.maxhealth = 100; // Player health
		level.activ.maxhealth = 100; // Acti health
        player switchToWeapon( "tomahawk_mp" ); //player weapon
        level.activ SwitchToWeapon( "tomahawk_mp" ); // Activator weapon
        iPrintLnBold( " ^4" + player.name + " ^7has chosen ^4SNIPER ^7room!" );     //change to what you want it to be
        while( isAlive( player ) && isDefined( player ) )
            wait 1;

	return;
}
0

Share this post


Link to post
Share on other sites
sniper_endroom()
{
    level.sniper_trig = getEnt( "sniper_endgame_trig", "targetname");
    jump = getEnt( "sniper_jump_origin", "targetname" );
    acti = getEnt( "sniper_acti_origin", "targetname" );
    
    while(1)
    {
        level.sniper_trig waittill( "trigger", player );
		level.oldTrig delete();
		level.bounceTrig delete();
		level.knife_trig delete();
		level.weapon_trig delete();

        if( !isDefined( level.sniper_trig ) )
        
        
        player setOrigin( jump.origin ); // Teleport jumper
        player TakeAllWeapons(); // Takes all jumper weapons 
        player GiveWeapon( "rpg_mp" ); //jumper weapon 
        player giveMaxAmmo( "rpg_mp" );		
		if isDefined( level.activ ) && isAlive( level.activ )
		{
			level.activ setOrigin( acti.origin ); //Teleports acti
			level.activ TakeAllWeapons(); // Take all acti weps 
			level.activ GiveWeapon( "rpg_mp" ); // Give acti a tomahawk
			level.activ giveMaxAmmo( "rpg_mp" );		
			wait 0.05;
			player.maxhealth = 100; // Player health
			level.activ.maxhealth = 100; // Acti health
			player switchToWeapon( "tomahawk_mp" ); //player weapon
			level.activ SwitchToWeapon( "tomahawk_mp" ); // Activator weapon
		}
        iPrintLnBold( " ^4" + player.name + " ^7has chosen ^4SNIPER ^7room!" );     //change to what you want it to be
        while( isAlive( player ) && isDefined( player ) )
            wait 1;

	return;
}

Cba to fix your awful formatting

0

Share this post


Link to post
Share on other sites

Activator isn't defined or alive in freerun, so you're trying to do things to a non existent activator..

 

if( isDefined( level.activ ) && isAlive( level.activ ) )

{

stuff here

he said it's a  BAD SYNTAX not LEVEL.ACTI IS NOT AN ENTITY.

 

The reason why the person that made the script has a if( isDefined(level.activ) is so that the rest of the script will carry on if LEVEL.ACTI is defined, so techincally the rest of the script shouldn't work unti level.acti is defined and that is defined when activator is spawned.

 

But the real error is this

0459a9740aa9f29be3cb0f2d7b114df3.png

 

Who ever was checking your script didn't have a clue what they was doing or they're blind

 

anyway, fix the script and tidy it up a bit

 

http://pastebin.com/Rnr6qkq6

0

Share this post


Link to post
Share on other sites

Or you could just not have any endrooms at all. Quit being such a conformist and worrying if people will play your map or not. Make the map the way it's supposed to be, instead of adding in all the extra BS just to get a few more plays.

0

Share this post


Link to post
Share on other sites

Or you could just not have any endrooms at all. Quit being such a conformist and worrying if people will play your map or not. Make the map the way it's supposed to be, instead of adding in all the extra BS just to get a few more plays.

 

So.. I need to make a map without bounce/sniper/weapon/knife and no one will play it then after all the hard work inside (hours of mapping and scripting), I guess its smart (no).

 

I will make a map in the future I believe just a small map (minecraft theme, I got minecraft textures) and will add only knife and sniper and maybe old.

0

Share this post


Link to post
Share on other sites

So.. I need to make a map without bounce/sniper/weapon/knife and no one will play it then after all the hard work inside (hours of mapping and scripting), I guess its smart (no).

 

I will make a map in the future I believe just a small map (minecraft theme, I got minecraft textures) and will add only knife and sniper and maybe old.

Look at every single one of the classic deathrun maps. EVERY. SINGLE. ONE. Besides the newer 4GF maps. did ANY OF THEM have custom end rooms? No. Do you know how many people enjoyed that mod? Do you know at that time the own creator of the mod actually enjoyed her own mod? Do you realize that although you may not get "players" you're still gaining experience in mapping? Not every single map you're going to make is going to be a success. Look at some great maps, take underworld for example. It's hardly ever played anymore, and usually when it is on the vote list it's outvoted by some stupid map like sm_world or something, which gets boring after the 500000x playing it.

 

So seriously, who cares whether the map is played or not, because odds are it'll be played a few times cuz it's new, and people will go right back to the same old boring maps which get played 1000 times a day. 

0

Share this post


Link to post
Share on other sites

will add only knife and sniper and maybe old.

Should be the other way round imo...

 

old and maybe sniper/knife :/

0

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0