Sign in to follow this  
Followers 0
Khaled

Need help ...

23 posts in this topic

Hello ,

 

 

I have couple of questions 

 

 

1- Dose iprintlnbold let all players see the message . and is [self iprintlnbold] only for the player that hit the trigger ? 

And dose [self iprintlnbold] even work ? 

 

2- i have a script but not sure if it dose work or not . i mean the trap works fine but i don't know about the xp 

 

 

www2()

{
    trig = getEnt ("trigger_move", "targetname");
aha = getEnt ("target_move", "targetname");
trig waittill("trigger", other);
trig delete();
other braxi\_rank::giveRankXP( "",20);
 
 {
  aha movex (752, 1);
       wait 3;
  aha movex (-752, 3);
 }
 
}

 

so if the activator activate the trap dose it give him 20 xp ? 

 

 

and same as teleport , when the player gets teleport is he gonna get xp .. ? and i mean xp no cheating or anything just give him xp if he finished the secret way or anything  .. :)

 

 

Script 

 

Teleport2() 

trig = getEnt ("trig_teleport2", "targetname"); 
target = getEnt ("target2", "targetname"); 
 
for(; ;)
trig waittill ("trigger", player); 
player braxi\_rank::giveRankXP( "", 100);
 
player SetOrigin(target.origin); 
player SetPlayerAngles( target.angles ); 
 iprintlnbold ("^3 You've finished the secert way^9 !!");
}

I tried it on free run didn't work i don't know if it should work online 

 

 

Sorry but this is the last :# 

 

 

 

 

 

Just need an end room script ;#

I mean  jump room knife sniper or at least give me your own end room script and i'll figured out my self 

Thanks :#  :)

0

Share this post


Link to post
Share on other sites

Answers to your questions -

 

Number 1- The IprintlnBold function prints on the players screen. If you use self IprintlnBold, yes, it only prints the message to the player that triggered it.

 

 

For your second question, instead of manually giving the activator xp, just use the addTriggerToList function:

thread AddTrigsToList();

addTriggerToList( name )
{
   if( !isDefined( level.trapTriggers ) )
      level.trapTriggers = [];
   level.trapTriggers[level.trapTriggers.size] = getEnt( name, "targetname" );
}
AddTrigsToList()
{
addTriggerToList("trigger_trap1");
addTriggerToList("trigger_trap2");
addTriggerToList("trigger_trap3");
addTriggerToList("trigger_trap4");
addTriggerToList("trigger_trap5");
addTriggerToList("trigger_trap6");
addTriggerToList("trigger_trap7");
addTriggerToList("trigger_trap8");
addTriggerToList("trigger_trap9");
addTriggerToList("trigger_trap10");
addTriggerToList("trigger_trap11");
addTriggerToList("trigger_trap12");
addTriggerToList("trigger_trap13");
addTriggerToList("trigger_trap14");
addTriggerToList("trigger_trap15");
}

Just make sure to take out any you don't use/add more. And change trigger_trap1, trigger_trap2, etc, to whatever your trigger names are. This function manually gives the activator xp, when the trap is activated.

 

Same thing for your teleport, just add the teleport trigger to list, and boom, there's the xp.

 

And, finally. You needed an endroom script, so here ya go, just change all the trigger names and the name of the script. and you're good to go:

 

 

Bounce()
{
level.bounce_trig = getEnt( "trigger_bounce", "targetname");
jump = getEnt( "bounce_jumper", "targetname" );
acti = getEnt( "bounce_acti", "targetname" );


while(1)
    {
        level.bounce_trig waittill( "trigger", player );
        if( !isDefined( level.bounce_trig ) )
            return;
        level.ak_trig delete(); //change this
level.snipe_trig delete(); //change this
level.old_trig delete(); //change this
level.inferno_trig delete(); //change this
        if(isDefined(player) && isAlive(player)) //checks if player is defined and alive
        {
            player setPlayerAngles( jump.angles );
            player setOrigin( jump.origin );
            player takeAllWeapons();
            player giveWeapon( "knife_mp" );
            player giveMaxAmmo( "knife_mp" );
            player switchToWeapon( "knife_mp" );
        }
        if(isDefined(level.activ) && isAlive(level.activ)) //Checks if level.activ is defined and activator is alive
        {
            level.activ setPlayerAngles( acti.angles );
            level.activ setOrigin( acti.origin );
            level.activ takeAllWeapons();
            level.activ giveWeapon( "knife_mp" );
            level.activ giveMaxAmmo( "knife_mp" );
            level.activ switchToWeapon( "knife_mp" );
        }
        if(isDefined(player))
            iPrintlnBold( " ^1" + player.name + " ^7has chosen Bounce Room" );
        while( isDefined( player ) && isAlive( player ) )
            wait 1;
        if(isDefined(player))
            iPrintlnBold(player.name + " has Died.");
    }
}

0

Share this post


Link to post
Share on other sites

So this should work 

main()
{
thread AddTrigsToList();
    thread www1();
	thread Teleport2();
}


addTriggerToList( name )
{
   if( !isDefined( level.trapTriggers ) )
      level.trapTriggers = [];
   level.trapTriggers[level.trapTriggers.size] = getEnt( name, "targetname" );
}

AddTrigsToList()
{
addTriggerToList("trigger1");
addTriggerToList("trig_teleport2");
}

www1()
{
    trig = getEnt ("trigger1", "targetname");
    trig = getEnt ("trig1", "targetname");
	bla = getEnt ("rotate", "targetname");
	trig waittill("trigger",player);
	trig delete();
    player braxi\_rank::giveRankXP( "", 20);
while(1)
 {
       bla rotateyaw (360, 4);
       wait 1;
	   bla rotateyaw (360, 4);
 }
 
}


Teleport2() 
{ 
trig = getEnt ("trig_teleport2", "targetname"); 
target = getEnt ("target2", "targetname"); 

for(;;) 
{ 
trig waittill ("trigger", player); 
player braxi\_rank::giveRankXP( "", 100);

player SetOrigin(target.origin); 
player SetPlayerAngles( target.angles ); 
 iprintlnbold ("^3 You've finished the secert way^9 !!");
} 
}

:# and dose not work on free round :? 

0

Share this post


Link to post
Share on other sites

So this should work 

main()
{
thread AddTrigsToList();
    thread www1();
	thread Teleport2();
}


addTriggerToList( name )
{
   if( !isDefined( level.trapTriggers ) )
      level.trapTriggers = [];
   level.trapTriggers[level.trapTriggers.size] = getEnt( name, "targetname" );
}

AddTrigsToList()
{
addTriggerToList("trigger1");
addTriggerToList("trig_teleport2");
}

www1()
{
    trig = getEnt ("trigger1", "targetname");
    trig = getEnt ("trig1", "targetname");
	bla = getEnt ("rotate", "targetname");
	trig waittill("trigger",player);
	trig delete();
    player braxi\_rank::giveRankXP( "", 20);
while(1)
 {
       bla rotateyaw (360, 4);
       wait 1;
	   bla rotateyaw (360, 4);
 }
 
}


Teleport2() 
{ 
trig = getEnt ("trig_teleport2", "targetname"); 
target = getEnt ("target2", "targetname"); 

for(;;) 
{ 
trig waittill ("trigger", player); 
player braxi\_rank::giveRankXP( "", 100);

player SetOrigin(target.origin); 
player SetPlayerAngles( target.angles ); 
 iprintlnbold ("^3 You've finished the secert way^9 !!");
} 
}

:# and dose not work on free round :? 

Your script is wrong. First of all you need to add this underneath main().

 

 maps\mp\_load::main(); 
 
 game["allies"] = "marines";
 game["axis"] = "opfor";
 game["attackers"] = "axis";
 game["defenders"] = "allies";
 game["allies_soldiertype"] = "desert";
 game["axis_soldiertype"] = "desert";
 
Now since you already have the AddTriggerToList function you dont need this: player braxi\_rank::giveRankXP( "", 100); 
so take them out.
0

Share this post


Link to post
Share on other sites
 maps\mp\_load::main(); 
 
 game["allies"] = "marines";
 game["axis"] = "opfor";
 game["attackers"] = "axis";
 game["defenders"] = "allies";
 game["allies_soldiertype"] = "desert";
 game["axis_soldiertype"] = "desert";
 

I had this already in my gsc. but i forgot to put it in the thread anyway i deleted player braxi\_rank::giveRankXP( "", 100); 

 

Now when free run ends and and lets say my friend joined the server and 2nd round started . it should work fine right ? 

 

And could i change the xp ?  or its only on the mod file ? 

main()
{
 maps\mp\_load::main(); 

 game["allies"] = "marines";
 game["axis"] = "opfor";
 game["attackers"] = "axis";
 game["defenders"] = "allies";
 game["allies_soldiertype"] = "desert";
 game["axis_soldiertype"] = "desert";

thread AddTrigsToList();
thread www1();
thread Teleport2();
}


addTriggerToList( name )
{
   if( !isDefined( level.trapTriggers ) )
      level.trapTriggers = [];
   level.trapTriggers[level.trapTriggers.size] = getEnt( name, "targetname" );
}

AddTrigsToList()
{
addTriggerToList("trigger1");
addTriggerToList("trig_teleport2");
}


www1()
{
    trig = getEnt ("trig1", "targetname");
bla = getEnt ("rotate", "targetname");
trig waittill("trigger",player);
trig delete();
while(1)
 {
       bla rotateyaw (360, 4);
       wait 1;
  bla rotateyaw (360, 4);
 }
}


Teleport2() 
{ 
trig = getEnt ("trig_teleport2", "targetname"); 
target = getEnt ("target2", "targetname"); 
for(;;)
{ 
trig waittill ("trigger", player); 
player SetOrigin(target.origin); 
player SetPlayerAngles( target.angles ); 
 iprintlnbold ("^3 You've finished the secert way^9 !!");
} 
}

 

 

0

Share this post


Link to post
Share on other sites

Also, you only add TRAP triggers in addtriggerstolist, not anything else ^^

0

Share this post


Link to post
Share on other sites
I'm getting confused so i can't put teleport trigger in addtriggerstolist only triggers for the activator o.0 ... 

0

Share this post


Link to post
Share on other sites

main()
{
   maps\mp\_load::main();

   game["allies"] = "marines";
   game["axis"] = "opfor";
   game["attackers"] = "axis";
   game["defenders"] = "allies";
   game["allies_soldiertype"] = "desert";
   game["axis_soldiertype"] = "desert";

   thread AddTrigsToList();
   thread www1();
   thread Teleport2();
   
}


addTriggerToList( name )
{
    if( !isDefined( level.trapTriggers ) )
    level.trapTriggers = [];
    level.trapTriggers[level.trapTriggers.size] = getEnt( name, "targetname" );
}

AddTrigsToList()
{

addTriggerToList("trigger1"); //There is no trigger1 ?

}
//Only activator triggers

www1()
{
    trig = getEnt ("trig1", "targetname");
    bla = getEnt ("rotate", "targetname");
    
    trig waittill("trigger",player);
    trig delete(); //Triggers get deleted after being activated if you added them to addTriggerToList so this is not needed

    while(1)
    {
        bla rotateYaw (360, 4);
        wait 1;
        bla rotateYaw (360, 4);
    }
}


Teleport2()
{
        trig = getEnt ("trig_teleport2", "targetname");
        target = getEnt ("target2", "targetname");
    for(;;)
    {
        trig waittill ("trigger", player);
        player braxi\_rank::giveRankXP( "", 100);
        player setOrigin(target.origin);
        player setPlayerAngles( target.angles );
//          iPrintLnBold ("^3 You've finished the secert way^9 !!"); //You wrote secret wrong 
        player iPrintLnBold ("^3 You've finished the secret way^9 !!"); // And you forgot the player thingie it would spam the players if you didnt add that
    }
}

and for endrooms take a look at this link

http://raid-gaming.net/forums/topic/31-mini-games-for-map/

 

 

Now since you already have the AddTriggerToList function you dont need this: player braxi\_rank::giveRankXP( "", 100); 

so take them out.

 

 

The 100 XP is for when you finish the secret ;)

So it should stay

0

Share this post


Link to post
Share on other sites

It should only be AddTriggerToList ("trig1"); because its the trap trigger that you're defining

E.g trig = getEnt ( "trig1", "targetname" );

So you need to add the trig1 or whatever you're calling your trap trigers, dont add anything else to it

0

Share this post


Link to post
Share on other sites

So now all good ? 

 

 

main()
{
 maps\mp\_load::main(); 

 game["allies"] = "marines";
 game["axis"] = "opfor";
 game["attackers"] = "axis";
 game["defenders"] = "allies";
 game["allies_soldiertype"] = "desert";
 game["axis_soldiertype"] = "desert";
 
thread AddTrigsToList();
thread www1();
thread Teleport2();
}


addTriggerToList( name )
{
   if( !isDefined( level.trapTriggers ) )
      level.trapTriggers = [];
   level.trapTriggers[level.trapTriggers.size] = getEnt( name, "targetname" );
}

AddTrigsToList()
{
addTriggerToList("trig1");
}


www1()
{
    trig = getEnt ("trig1", "targetname");
	bla = getEnt ("rotate", "targetname");
	trig waittill("trigger",player);
	trig delete();
while(1)
 {
       bla rotateyaw (360, 4);
       wait 1;
	   bla rotateyaw (360, 4);
 }
}


Teleport2() 
{ 
trig = getEnt ("trig_teleport2", "targetname"); 
target = getEnt ("target2", "targetname"); 
for(;;) 
{ 
trig waittill ("trigger", player);
player braxi\_rank::giveRankXP( "", 100); 
player SetOrigin(target.origin); 
player SetPlayerAngles( target.angles ); 
player iPrintLnBold ("^3 You've finished the secret way^9 !!");
} 
} 

 

 

So far i don't understand where should i put the teleport trigger 

0

Share this post


Link to post
Share on other sites

Great ;)

 

 

But is there any explanation !! for the teleport trigger ? 

Teleport2() 
{ 
trig = getEnt ("trig_teleport2", "targetname"); 
target = getEnt ("target2", "targetname"); 
for(;;) 
{ 
trig waittill ("trigger", player);
player braxi\_rank::giveRankXP( "", 100); 
player SetOrigin(target.origin); 
player SetPlayerAngles( target.angles ); 
player iPrintLnBold ("^3 You've finished the secret way^9 !!");
} 
} 

So

player braxi\_rank::giveRankXP( "", 100);  

 should do the job it doesn't need to put any trigger to AddTrigsTolist() Right !! ? 

 

And thanks to all who helped me :) 

0

Share this post


Link to post
Share on other sites

Great ;)

 

 

But is there any explanation !! for the teleport trigger ? 

Teleport2() 
{ 
trig = getEnt ("trig_teleport2", "targetname"); 
target = getEnt ("target2", "targetname"); 
for(;;) 
{ 
trig waittill ("trigger", player);
player braxi\_rank::giveRankXP( "", 100); 
player SetOrigin(target.origin); 
player SetPlayerAngles( target.angles ); 
player iPrintLnBold ("^3 You've finished the secret way^9 !!");
} 
} 

So

player braxi\_rank::giveRankXP( "", 100);  

 should do the job it doesn't need to put any trigger to AddTrigsTolist() Right !! ? 

 

And thanks to all who helped me :) 

If the player steps into the trigger (trig_teleport2) then they will be teleported to the SetOrigins so wherever you placed your origins.

0

Share this post


Link to post
Share on other sites

I meant the xp siikdUde 

 

if someone uses the trigger he or she will get 100 XP

0

Share this post


Link to post
Share on other sites

:facepalm:

 

The function addtriggertolist is to be used for traps and traps only.

 

Before freerun was removed from the mod, freerun would essentially delete any trigger that had been addtriggertolist(ed). So yes, it does give xp according to how much the server set trap activating to but this is not a good idea if all you want to do is give the jumper xp.

 

As others have stated, giveRankXP but please refrain from giving people xp for stupid shit like finding a secret. If we find that you are and we want to add your map we will change your script.

0

Share this post


Link to post
Share on other sites

:facepalm:

 

The function addtriggertolist is to be used for traps and traps only.

 

Before freerun was removed from the mod, freerun would essentially delete any trigger that had been addtriggertolist(ed). So yes, it does give xp according to how much the server set trap activating to but this is not a good idea if all you want to do is give the jumper xp.

 

As others have stated, giveRankXP but please refrain from giving people xp for stupid shit like finding a secret. If we find that you are and we want to add your map we will change your script.

Doesn't your auto-acti script work off addTriggerToList?

0

Share this post


Link to post
Share on other sites

Its not about finding the secret , you have to finish the secret and its pretty hard in my map to finish the secret and i would give him 40 xp instead of giving him a weapon ** and i may change it and give him a weapon :# 

 

 

 

Anyway Thanks ;)

0

Share this post


Link to post
Share on other sites

Its not about finding the secret , you have to finish the secret and its pretty hard in my map to finish the secret and i would give him 40 xp instead of giving him a weapon ** and i may change it and give him a weapon :# 

 

 

 

Anyway Thanks ;)

Post screenshots of your map maybe? :S

0

Share this post


Link to post
Share on other sites

Post screenshots of your map maybe? :S

Look at what section we're in, then re-read what you just said and then read why he's here. How does posting screen shots of his map help solve his problem?

0

Share this post


Link to post
Share on other sites

Look at what section we're in, then re-read what you just said and then read why he's here. How does posting screen shots of his map help solve his problem?

I guess I wrote wrong because I didn't mean for him to post here.
0

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  
Followers 0