Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help Getting string from perk?
#1
Okay so I'm writing up a function to select a random perk (which will be given to everyone). But in Black Ops, the perk strings/icons are different unlike in MW2 where the perk name = string & icon material.


This is my function so far:
Code:
Specialist( text, glowColor, iconType )
{
    self endon("disconnect");
    self notify("StreakPopup");
    self endon("StreakPopup");
    self.DatText = createFontString( "extrabig", "2" );
    self.DatText setPoint( "TOP", undefined, 0, 100 );
    self.DatText.glowColor = glowColor;
    self.DatText.glowAlpha = 0.2;
    self.DatText.hideWhenInMenu = false;
    self.DatText.archived = false;
    self.DatText setText(text);
    
    self.DatIcon setShader( iconType, 45, 45 );
    
    self.DatText fadeOverTime(0.75);
    self.DatIcon fadeOverTime(0.75);
    self.DatIcon.alpha = 1;
    self.DatText.alpha = 1;
    
    self.DatText.fontscale = 1.4;
    self.DatText setCOD7DecodeFX( 200, 60000, 600 );
    
    wait 4;
    
    self.DatText fadeOverTime(0.75);
    self.DatIcon fadeOverTime(0.75);
    self.DatText.alpha = 0;    
    self.DatIcon.alpha = 0;
}

Code:
level.infc_Perk1 = getRandomPerk_1();
So I need to find level.infc_Perk1's string.

Realistically:

speciality_flakjacket to string & material
Do not take life too seriously. You will never get out of it alive.
[Image: UGPjFJa.jpg]
Reply

#2
GetCSVTable?
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply

#3
Can be locked and archived.
Fix =
Code:
getPerkMaterial( perk )
{
    return tableLookUp("mp/statsTable.csv", 4, perk, 6);
}

getPerkString( perk )
{
    return tableLookUpIString("mp/statsTable.csv", 4, perk, 3);
}
@Pozzuh Dumb Bitch
Do not take life too seriously. You will never get out of it alive.
[Image: UGPjFJa.jpg]
Reply

#4
(09-27-2013, 17:47)DidUknowiPwn Wrote: Can be locked and archived.
Fix =
Code:
getPerkMaterial( perk )
{
    return tableLookUp("mp/statsTable.csv", 4, perk, 6);
}

getPerkString( perk )
{
    return tableLookUpIString("mp/statsTable.csv", 4, perk, 3);
}
@Pozzuh Dumb Bitch

lol.
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [HELP]Adding Spaces in a String dhanin 1 1,933 03-30-2013, 16:09
Last Post: Nukem
  [GSC] All Weapon/Camo/Perk/Killstreak Names DEREKTROTTER 33 25,885 01-30-2013, 15:26
Last Post: 99IRock
  whats the command to get string length pedjas 4 3,077 01-20-2013, 18:30
Last Post: pedjas
Question Help ERROR STRING koro35 3 3,335 11-20-2012, 15:51
Last Post: JariZ
  Help C# Tutorial on how to reset a string DidUknowiPwn 7 4,941 10-11-2012, 15:04
Last Post: DidUknowiPwn
  [Tutorial] Perk list Yamato 0 3,049 06-08-2012, 12:41
Last Post: Yamato
  [Request] public override int OnPlayerDamaged() hitbox string or int DeathAngel1479 15 7,699 04-15-2012, 22:55
Last Post: OrangePL
  [News] Modern Warfare 3 - Perk List Leaked Tomsen1410 3 3,288 08-19-2011, 12:31
Last Post: Tomsen1410
  All Weapons & Perk Names ( DVARS ) Eekhoorn 17 21,009 08-11-2011, 17:17
Last Post: Nemesis_NL
  Help Give perk problem Metro-Police#45 2 2,688 07-27-2011, 07:59
Last Post: Metro-Police#45

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.