Sign in to follow this  
Followers 0
Jumpy

XP for activating and other stuff?

13 posts in this topic

 

Wazzap peepz. I am working on a new dr map and I want so when the acti is actiing he will get lots of XP and also I added a trigger at the end of the secret and I want a shitload of XP given when its triggered.

So what is the code for giving xp? BTW I have this array thingy:

addTriggerToList( name )
{
    if( !isDefined( level.trapTriggers ) )
        level.trapTriggers = [];
    level.trapTriggers[level.trapTriggers.size] = getEnt( name, "targetname" );
}
	addTriggerToList( "trap1_trig" );
	addTriggerToList( "trap2_trig" );
	addTriggerToList( "trap3_trig" );
	addTriggerToList( "trap4_trig" );
	addTriggerToList( "trap5_trig" );
	addTriggerToList( "trap6_trig" );
	addTriggerToList( "trap7_trig" );
	addTriggerToList( "trap_trig" );
	addTriggerToList( "bounce_trig" );
	

But idk how it works and also when I added this code:

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

..and compiled reflections it gives me an error like some plugin that couldnt be found. How can I prevent dat?

and also... peepz.. im not trying to hack my rank or some stupid shit okeh? just trying to figure this out..

Thank you!

 

Here is the error:

YJvbBpB.png

 

and in the console:
xKTXXrD.png
 
The code for both:
 
50xp()
{
 trig = getEnt("50xp_trig","targetname");
 trig1 = getEnt("4000xp_trig","targetname");
 trig waittill("trigger", player);
 iPrintLnBold( " " + player.name + " ^1is ^2rich ^3now! " );
 trig delete();
 trig1 delete();
 
 //player braxi\_rank::giveRankXP("", 9000);
}


4000xp()
{
 trig = getEnt("4000xp_trig","targetname");
 trig1 = getEnt("50xp_trig","targetname");
 trig waittill("trigger", player);
 iPrintLnBold( " " + player.name + " ^3is ^2a ^1turd... " );
 trig delete();
 trig1 delete();
 
 //player braxi\_rank::giveRankXP("", 1);
}

 

0

Share this post


Link to post
Share on other sites

Okay, so that addTriggerToList function links to a variable in the deathrun mod, what ever trigger targetname you add to that list the mod will think it's a trap, so when that trigger is use, it will give XP to who ever activated it

 

Now to your second question.

 

When compiling reflections for your map, it pretty much opens the map in CoD4 itself to get reflections so it has to load the map GSC but it also only load stock scripts in raw/maps/mp and not the deathrun mod where you'll find the the folder braxi and the _rank.gsc, so when it runs your map and goes through your code and not running the deathrun mod, it tries to load "player braxi\_rank::giveRankXP( "", 500);" but of course it isn't going to find it because you don't have a that file directory under the raw folder. 

 

So there two ways to solve this problem

 

1) Comment out the code when compiling reflections

 

2) Decompile the DEFAULT deathrun mod and move the braxi folder into your raw directory so it can read & find the code in your map.gsc

 

 

p.s giving shit loads of xp for a secret is lame give them something more visual appealing like a new gun, model, trail fx, model following them etc... just something cool and fun.

1

Share this post


Link to post
Share on other sites

Thanks for the quick and helpful reply! About the shitload of XP; my map is called mp_dr_wealth and my idea is to give everyone a lot of XP if they do something. Is that a good idea? I mean, the map mp_dr_up, on TeX everyones voting for up because you can do the bounce and get a shitload of XP... Also how do I add the stuff you said like: gun, model etc?

1

Share this post


Link to post
Share on other sites

You shouldn't be making a map that is only liked because it's an xp farm, you try and make it to such a quality that people enjoy it for the gameplay. Not the xp.

2

Share this post


Link to post
Share on other sites

If you make a good map people will want to play it because its good, not just because it gives you a bit more XP than some other maps 

0

Share this post


Link to post
Share on other sites

Okay, so that addTriggerToList function links to a variable in the deathrun mod, what ever trigger targetname you add to that list the mod will think it's a trap, so when that trigger is use, it will give XP to who ever activated it

 

Now to your second question.

 

When compiling reflections for your map, it pretty much opens the map in CoD4 itself to get reflections so it has to load the map GSC but it also only load stock scripts in raw/maps/mp and not the deathrun mod where you'll find the the folder braxi and the _rank.gsc, so when it runs your map and goes through your code and not running the deathrun mod, it tries to load "player braxi\_rank::giveRankXP( "", 500);" but of course it isn't going to find it because you don't have a that file directory under the raw folder. 

 

So there two ways to solve this problem

 

1) Comment out the code when compiling reflections

 

2) Decompile the DEFAULT deathrun mod and move the braxi folder into your raw directory so it can read & find the code in your map.gsc

 

 

p.s giving shit loads of xp for a secret is lame give them something more visual appealing like a new gun, model, trail fx, model following them etc... just something cool and fun.

and what do I do when I am going to release my map? I mean the XP script? Do I just delete these // or?

0

Share this post


Link to post
Share on other sites

Remove the // or anything commenting out the scripts you want to work, yes.

0

Share this post


Link to post
Share on other sites

Im getting a bad syntax error like 50xp(); bad syntax or some shite

 

Heres the code:

50xp()
{
 trig = getEnt("50xp_trig","targetname");
 trig1 = getEnt("4000xp_trig","targetname");
 trig waittill("trigger", player);
 iPrintLnBold( " " + player.name + " ^1is ^2rich ^3now! " );
 trig delete();
 trig1 delete();
 
 //player braxi\_rank::giveRankXP("", 9000);
}
4000xp()
{
 trig = getEnt("4000xp_trig","targetname");
 trig1 = getEnt("50xp_trig","targetname");
 trig waittill("trigger", player);
 iPrintLnBold( " " + player.name + " ^3is ^2a ^1turd... " );
 trig delete();
 trig1 delete();
 
 //player braxi\_rank::giveRankXP("", 1);
}

anyone?

0

Share this post


Link to post
Share on other sites

Has nothing to do with those functions, the error is showing a function CALL. Might wanna run the map in developer 1 and check console to see what line is causing the error.

Or could just look for 50xp(); in your scripts and look ABOVE that line, probably forgot a semicolon or similar.

 

Though, agree with people above, don't just give people XP, pls.

0

Share this post


Link to post
Share on other sites

Has nothing to do with those functions, the error is showing a function CALL. Might wanna run the map in developer 1 and check console to see what line is causing the error.

Or could just look for 50xp(); in your scripts and look ABOVE that line, probably forgot a semicolon or similar.

 

Though, agree with people above, don't just give people XP, pls.

I don't know what the problem is... I checked the semicolons but it just gives me that annoying error also I checked in the console but it didn't say anything about the error... OMG I need some serious help here buoyz

0

Share this post


Link to post
Share on other sites

It might help if you post a screenshot of the error and a section of your code before the line it tells you the error is at, and the section after...

Edit: In the second screenshot, you need to scroll down a little so we can see where the error is... make sure you do /developer 1 in console before you run your map.

0

Share this post


Link to post
Share on other sites

It might help if you post a screenshot of the error and a section of your code before the line it tells you the error is at, and the section after...

Edit: In the second screenshot, you need to scroll down a little so we can see where the error is... make sure you do /developer 1 in console before you run your map.

Idk, it doesn't say anything about errors....

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