• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Code Creating a new class

You were right marco, I wasn't paying attention and it wasn't recompiling it. It was still working off the original make were the class leveld off stalkers and bullpup damage, WOW was that annoying when I saw it say -error- and I was like, woah wait when did this happen?!

Error
Spoiler!

Code Mentioned on that line
Spoiler!

now is there something wrong with that line or should i be looking at parameter 1 and where would I find that?
 
Last edited:
Upvote 0
Code:
return Min(StatOther.GetCustomValueInt(Class'CrawlerKills'),FinalInt);

it's kinda funny, i beat myself up for that post when i went to sleep cause i figured it out and felt like an idiot for posting it >.<

file now compiling properly, a few bugs to fix, just one question though.

say i wanted damage instead of deaths, how do you write it for your new code marco?

the dualdamage collection formula i mean

Edit---
only one problem found, for some reason it still levels with singular pistol with this code and it doesnt matter what i kill even tho it clearly says crawlers >.>, is there a way i can write a check for singles and other speciman if yes increaseincr[0] ?

SRVetDual
Spoiler!

CrawlerKills
Spoiler!
 
Last edited:
Upvote 0
Edit---
only one problem found, for some reason it still levels with singular pistol with this code and it doesnt matter what i kill even tho it clearly says crawlers >.>, is there a way i can write a check for singles and other speciman if yes increaseincr[0] ?
...
CrawlerKills
Code:
class CrawlerKills extends SRCustomProgressInt;

function NotifyPlayerKill( Pawn Killed, class<DamageType> damageType )
{
    if( ZombieCrawler(Killed)!=None && damageType==Class'DamTypeDual44Magnum' 
        || damageType==Class'DamTypeDualDeagle' || damageType==Class'DamTypeDualies' )
        IncrementProgress(1);
}

defaultproperties
{
ProgressName="Crawler kills with dual weaponry"
}

Code:
function NotifyPlayerKill( Pawn Killed, class<DamageType> damageType )
{
	if( ZombieCrawler(Killed)!=None && (damageType==Class'DamTypeDual44Magnum' 
		|| damageType==Class'DamTypeDualDeagle' || damageType==Class'DamTypeDualies') )
		IncrementProgress(1);
}

Pay attention to what I posted earlier.

As for damage stats, I already posted earlier.
 
Last edited:
Upvote 0
Code:
function NotifyPlayerKill( Pawn Killed, class<DamageType> damageType )
{
    if( ZombieCrawler(Killed)!=None && (damageType==Class'DamTypeDual44Magnum' 
        || damageType==Class'DamTypeDualDeagle' || damageType==Class'DamTypeDualies') )
        IncrementProgress(1);
}
ah simple mistake when I was writing it, I try not to just copy and paste, I actually write it out so I can learn it. That fixed the single pistol problem but its still anything I kill with duals

Pay attention to what I posted earlier.

As for damage stats, I already posted earlier.

Yes, yes you did I apologize for reasking.


---EDIT--- may have found problem, testing
 
Last edited:
Upvote 0
Ok I believe I have found the issue in my custom weapon damage type

Error
Spoiler!

DualWield9mm
Spoiler!
also tried
Spoiler!
I have the feeling that I need to reference one of the "SRCustomProgress" files but I'm not sure which one.
I have added the custom fire method to my class

DualWielder
Spoiler!
as for the other damage type they are all coded similar so if i can eliminate one i can eliminate them all.
 
Last edited:
Upvote 0
Thank you both Marco and FLuX for your continued help. I can now move on to testing the class further and balancing it.
Hey sorry I have been rather busy with work etc so I haven't been on Steam. With christmas coming up in days time I have been working quite a bit. My apologese for not being able to help the past two days.
 
Upvote 0