Author |
Topic: need some help with ranks |
HITMAN934 |
|
General Member Since: Sep 6, 2004 Posts: 160 Last: Aug 29, 2007 [view latest posts] |
|
|
Category: CoDUO Mapping Posted: Monday, Feb. 6, 2006 02:10 pm |
|
Ok I just got back to work on a old mod of mine and was about to give it out as a beta but as I was testing it I saw that artillery was not working the way it should. I found why it was not working right but now I need some help fixing it. You see I added more ranks and you still get artillery on rank 4 but when you move up to rank 5, 6, 7, 8, ect you don't get artillery no more. here is the code
Code: giveBinoculars(spawnweapon)
{
binoctype = "binoculars_mp";
self takeWeapon("binoculars_mp");
self takeWeapon("binoculars_artillery_mp");
// if they are highest rank then they get the artillery strike binoculars
if ( self.pers["rank"] == 4 && level.allow_artillery)
{
if(self.pers["team"] == "allies")
{
switch(game["allies"])
{
case "american":
binoctype = "binoculars_artillery_mp";
break;
case "british":
binoctype = "binoculars_artillery_mp";
break;
case "russian":
binoctype = "binoculars_artillery_mp";
break;
}
}
else if(self.pers["team"] == "axis")
{
switch(game["axis"])
{
case "german":
binoctype = "binoculars_artillery_mp";
break;
}
}
See the line if ( self.pers["rank"] == 4 && level.allow_artillery) I like to make that so it would give artillery for rank 4 and up but how ?
edited on Feb. 6, 2006 09:11 am by HITMAN934 |
|
|
|
LUN4TIC |
General Member Since: Apr 13, 2004 Posts: 162 Last: Feb 15, 2006 [view latest posts] |
|
|
|
Pop322 |
|
General Member Since: Oct 26, 2005 Posts: 50 Last: Jun 11, 2007 [view latest posts] |
|
|
Category: CoDUO Mapping Posted: Monday, Feb. 6, 2006 04:28 pm |
|
i only started scripting not long ago but maybe try this..
Code: if ( self.pers["rank"] == 4,5,6,7,8 && level.allow_artillery)
dunno if it will work but try it ^^
Pop322 |
|
|
|
HITMAN934 |
|
General Member Since: Sep 6, 2004 Posts: 160 Last: Aug 29, 2007 [view latest posts] |
|
|
|
supersword |
General Member Since: Jul 28, 2004 Posts: 1990 Last: Apr 18, 2024 [view latest posts] |
|
|
|
|
Category: CoDUO Mapping Posted: Monday, Feb. 6, 2006 07:40 pm |
|
Have a look inside This Mod.
It might be some help! |
|
|
|
HITMAN934 |
|
General Member Since: Sep 6, 2004 Posts: 160 Last: Aug 29, 2007 [view latest posts] |
|
|
Category: CoDUO Mapping Posted: Monday, Feb. 6, 2006 09:29 pm |
|
supersword writes...Quote: Have a look inside This Mod.
It might be some help!
I looked at it and the code for the _rank_gmi.gsc has nothing that I am looking for. You see the game has 5 ranks and the 5th rank is the 40 points rank that gives you artillery. Well I made 5 new ranks to be added with the other ranks and I tested them and they all work as well. The problem is that you get artillery for the 40 point rank but after you move up to one of the new ranks you don't get artillery anymore. I found the reason why that is but i don't know how to fix it. The problem is that artillery in the _rank_gmi.gsc file are only set for rank 5 and I need to know how to set it so that people will get artillery for rank 5 and up. |
|
|
|
StrYdeR |
General Member Since: May 11, 2004 Posts: 11671 Last: Oct 7, 2021 [view latest posts] |
|
|
|
|
Category: CoDUO Mapping Posted: Tuesday, Feb. 7, 2006 12:55 am |
|
try something like:
if ( self.pers["rank"] >3 )
self.level.allow_artillery
not tested - but it should work
|
|
|
|
HITMAN934 |
|
General Member Since: Sep 6, 2004 Posts: 160 Last: Aug 29, 2007 [view latest posts] |
|
|
Category: CoDUO Mapping Posted: Sunday, Mar. 26, 2006 07:19 pm |
|
Ok sorry for the late late reply but I have not been well and am only getting better now plus this is my last year in school so I been busy trying to pass it.
StrYdeR the code you gave me did not work but I got what I wanted any way so now I will be nice and give out what I did so other who are trying to do something like what I am doing can
I changed the code
Code: if ( self.pers["rank"] == 4 && level.allow_artillery)
to
Code: if ( self.pers["rank"] > 3 == level.allow_artillery)
and now I can get artillery for rank 4 and up. |
|
|
|