What's new

Game Mods How to change the time duration of ac130 killstreak?

  • Thread starter liop12
  • Start date
  • Views 348
L

liop12

Newbie
Messages
2
Reaction score
0
I want to extend the time duration of ac130 in my mod. I don't know which .gsc file I should create in my mod folder( is it in damage.gsc or ac130.gsc or somewhere else?). Secondly, my guess is, this line should be changed,

init()
{
level.ac130_use_duration = 40;
level.ac130_num_flares = 2;

and make something like this,

duration()
{
self endon("death");
self endon("disconnect");

while(1) {
level.ac130_use_duration = 60;
}
}

But this doesn't work.
 
S

Smokey xKoVx

Enthusiast
Messages
847
Reaction score
369
you wouldn't need to put a "while" to change the time.

also it may not be working because you are not using the dvar.
example:

0527e5d9b1388731b988a4648873256c.png


you only changed the level.ac130_use_duration and thats only telling the game to set the value of that dvar to 40 at the top.
try setting the dvar yourself and see what happens.

etc
setdvar("ui_ac130usetime","99");
seeing as you are on ps3, u prob need :
setdvar("developer","1");
setdvar("developer_script","1");
as well (but i could be wrong)

Also, where are you putting the code
in a patch_mp.ff im guessing?
 
L

liop12

Newbie
Messages
2
Reaction score
0
you wouldn't need to put a "while" to change the time.

also it may not be working because you are not using the dvar.
example:

0527e5d9b1388731b988a4648873256c.png


you only changed the level.ac130_use_duration and thats only telling the game to set the value of that dvar to 40 at the top.
try setting the dvar yourself and see what happens.

etc
setdvar("ui_ac130usetime","99");
seeing as you are on ps3, u prob need :
setdvar("developer","1");
setdvar("developer_script","1");
as well (but i could be wrong)

Also, where are you putting the code
in a patch_mp.ff im guessing?

Thank you for your reply. I don't know how to use patch.ff as you said, but what I have done is only making a new file in my mod folder calling it _ac130.gsc and trying to modifying it as described. I am playing MW2 on my PC. Just I want to make what you said above clear, the expression "you only changed the level.ac130_use_duration and thats only telling the game to set the value of that dvar to 40 at the top." I think this is exacly what I mean, to tell the game set the value 60 seconds instead of 40 but in fact this doesn't tell the game to do that by the fact that when I launch my mod ac130 waits for 40 sec and not 60. Secondly, I am new in modding, where I put those codes you mentioned above, inside "init()" or before? and, do I have to activate them as usual by calling them in doDvar()?
 
S

Smokey xKoVx

Enthusiast
Messages
847
Reaction score
369
erm i wouldnt call it in _ac130 or inside an int na.

i would say in your own .gsc file (the one made)
add a player connect and on player spawned and put the code just after the player spawns.
etc

init()
{
level thread onPlayerConnect();

}
onPlayerConnect()
{
for(;:wink:
{
level waittill( "connected", player );
player thread onPlayerSpawned();

}
}

onPlayerSpawned()
{
for(;:wink:
{

self waittill("spawned_player");
if(self GetEntityNumber() == 0)
{
self setClientDvar("ui_ac130usetime","999");
}
}
}


im not sure if you are making a mod menu with this, but yeah you would put it in your own playerspawned etc.


cause whats happening (im guessing) is because you are setting the ac130 stuff before the player connects/spawns. its not actually changing.
Kinda like if you set FOV in the init(), it wouldnt actually change the players fov.
if that makes sense lol
 
Top Bottom