• 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 this hot stripper trader needs help

gunslingor

Grizzled Veteran
Jan 11, 2011
232
56
Please help me repair this bad *** stripper mutator and anim... to view, open under actor and anim... then in actor, drop decoration/****ing****. select pose under properties/****ing**** tab.

Note that this mutator appears to crash my server, but it seems to work in solo... and help is appreciated... its going in the dumpster if noone can fix =(... to bad, so cool

Link to files: https://docs.google.com/file/d/0B71fEvZJKoXBVHZ1NXNtdFRqQkE/edit?usp=sharing

Is there another way to accomplish this without muts? All I want to ddo is replace the typical trader with the stripper. Everytime I try to use one of these great muts commiejoe made me, they either break the server or my local installation. I cannot figure out why, the code looks so freakin simple!
 
Last edited:
Without testing I would write it somehow like this, first off a custom mutator:
Code:
class NudeTraderMut extends Mutator;

function PreBeginPlay()
{
	local WeaponLocker W;

	AddToPackageMap();
	foreach AllActors(Class'WeaponLocker',W)
		if( W.Class==Class'WeaponLocker' )
		{
			Spawn(Class'NudeTrader',,,W.Location,W.Rotation);
			W.Destroy();
		}
}

defaultproperties
{
	GroupName="KF-NoTraderz"
	FriendlyName="Nude Trader"
	Description="Nude trader!"
	LifeSpan=0.1
}
Then the nude trader herself:
Code:
Class NudeTrader extends WeaponLocker;

#exec OBJ LOAD FILE=KF_PalaceTextures1.utx
#exec OBJ LOAD FILE=PalaceAnims.ukx

function SetOpen(bool bToOpen)
{
	if( bToOpen )
	{
		NetUpdateTime = Level.TimeSeconds - 1;
		bClientTrigger = !bClientTrigger;
		if( Level.NetMode!=NM_DedicatedServer )
			ClientTrigger();
	}
}
simulated event PostBeginPlay()
{
	AnimEnd(0);
}
simulated function AnimEnd( int Channel )
{
	if( Level.NetMode!=NM_DedicatedServer )
	{
		Channel = Rand(3);
		if( Channel==0 )
			LoopAnim('dropped');
		else if( Channel==1 )
			LoopAnim('home');
		else LoopAnim('home2');
	}
}
simulated event ClientTrigger()
{
	local int i;
	
	i = Rand(4);
	if( i==0 )
		PlayAnim('s_cheer1');
	else if( i==1 )
		PlayAnim('s_cheer2');
	else if( i==2 )
		PlayAnim('s_cheer3');
	else PlayAnim('s_cheer4');
}

defaultproperties
{
	Mesh=>InsertNudeMeshHere<
}
 
Upvote 0
Honestly, this is beyond me... I think I'm just going to have to trash her. Isn't there a simpler way of doing this. I was trying to use the weapons locker and just replace the skin but obviously that didn't work. I guess its just same old trader chick for my map =(. I really don't want to have a mutator and anim file, pain in the butt after all these months with them. No other options that are simpler and easier?
 
Upvote 0
Honestly, this is beyond me... I think I'm just going to have to trash her. Isn't there a simpler way of doing this. I was trying to use the weapons locker and just replace the skin but obviously that didn't work. I guess its just same old trader chick for my map =(. I really don't want to have a mutator and anim file, pain in the butt after all these months with them. No other options that are simpler and easier?
The code above with what Marco has given is a mutator that replaces all traders with your chick trader. This is not bound to your map and will work for all maps. Just place normal traders in your map and then turn this mutator (compiled first of course) on and it'll be as you desire.
 
Upvote 0
The code above with what Marco has given is a mutator that replaces all traders with your chick trader. This is not bound to your map and will work for all maps. Just place normal traders in your map and then turn this mutator (compiled first of course) on and it'll be as you desire.

You have to understand just how long I've been having this issue... at least a year... and I haven't been able to play my map online since then. Its finally fixed after this rebuilding effort, and its about 3 weeks to completion. If I personally really embark on trying to fix the chick again, it will be at least another 3 months as I do not know this antiquate language nad have no experience with scripts or mutators in this environment, they have only caused me pain.

What your proposing sounds great though, to sort of disassociate the map from the mut so that my map can run without the mut and so that other maps can usse the cool trader as they like... but again, if this is goiing to happen, I really need someone to handle everything for me and just to give me the finished files.. If I then go to get the mutator whitelisted and there are issues... someone will need to fix it for me, so I simply cannot handle it. I'm a computer engineer with years of programming, but I no longer have the time and willingness to learn unreal script at this time.

If anyone wants to take on this task of finishing and stabilizing this mutator (particular regarding concerns for netplay and separating the mutator to be general to all maps) Then they will have earned a tag in my map if they want =).
 
Last edited:
Upvote 0
UnrealScript is simply a derivative of C++ if you've every worked in any of the C languages it shouldn't take you 5min to pick up. heck, half the tutorials are around baby step you through the process.

You are confusing matters by mixing terms around. You say you want a mutator, but it sounds like what you want is simply an animated prop for the map to use. That iirc requires a really small bit of coding to achieve.

Code:
class Stripper extends Decoration;

#exec OBJ LOAD FILE=Stripper.ukx

simulated function PostBeginPlay()
{
	if( Level.NetMode!=NM_DedicatedServer )
		LoopAnim('Idle');
}

Add additional statements for other animations as required.

The prop is then put into the map via the actor browser.
 
Last edited:
Upvote 0
UnrealScript is simply a derivative of C++ if you've every worked in any of the C languages it shouldn't take you 5min to pick up. heck, half the tutorials are around baby step you through the process.

You are confusing matters by mixing terms around. You say you want a mutator, but it sounds like what you want is simply an animated prop for the map to use. That iirc requires a really small bit of coding to achieve.

Code:
class Stripper extends Decoration;

#exec OBJ LOAD FILE=Stripper.ukx

simulated function PostBeginPlay()
{
    if( Level.NetMode!=NM_DedicatedServer )
        LoopAnim('Idle');
}
Add additional statements for other animations as required.

The prop is then put into the map via the actor browser.

Basically, want I "think" I want is pretty clear... a hot trader babe. But there are consequences to this. I've had such issues with this throughout the year, I really like the idea of separating the map from the custom stripper chick so that my map can still be played without the anim and .u files.

Maybe I'll give it one more go using the method of replacing the trader so that my map can still be played without the mutator... its just a tough environment to understand and documentation isn't great. I apologize, this is really a "do it for me" request and not a "I want to learn" request. I usually don't make these, but I just think this is the only instance in my entire life were I am going to have a need for this knowledge and its not worth the massive effort I've already put in. I really just want someone to do it for me before I release my map.

Using your code above, is there a way to do this without having a separate anim and .u file? i.e. can scripts and anims go in the maps mylevel packages similar to textures and statics? That's what I want, either the hot stripper babe in my map with no .u or anim file with fully functional netplay and solo, or alternatively, a .u and anim file that is fully functional in solo and netplay and is disassociated with the map. Anyone want to "do it for me"?
 
Last edited:
Upvote 0
You should be able to package the assets into the 'mylevel' package. Meaning they become saved in the map file and distribute with the map itself.

I have tried to Rename both the actor and anim, but it appears the functionality is broken in the sdk. I think I'm officially throwing in the towel, as I personally have spent to many months trying to figure this out. I don't have any clue why having such problems with the coding in this sdk, but ive had enough... It's just to old with to many problems and ambiguities. I resign.
 
Upvote 0
it seems I have read you wrong thoughtout the whole thing as Gartley has noticed this too. You should be able to add it to the animations file in th myLevel BUT when you place the trader, change the mesh to your custom chick. All done as some other maps use this for custom traders.

I actually already tried something along these lines. I placed the usual weapons locker trader. I then changed the display-->mesh property to my stripper chick. Upon testing, the stripper chick was there, but just the mesh and no animation. I think the problem is that the original trader display-->mesh property is supposed to be a "skeletal mesh" where as my stripper chick is an "animation". Both appear to be discrete structures (e.g. there are separate mesh and animation browsers). So I think its just grabbing the mesh portion and there is no way to set the animation without the mutator stuff.

One thing that would be nice, perhaps a simplified solution someone could help me with, is to take all these animations, convert them to the format needed by the traditional trader chick, combine them somehow so the chick just cycles thru the annimations, and somehow combine this new skeletonmesh thing with mylevel.... all of it is beyond me.

I have tried to rename the animations to mylevel package but it did not work, nothing happened and no mylevel package was created.

I've also tried to just apply the stripper chick texture to the normal trader but that didn't work obviously. Does anyone think they can do it... apply these animations somehow directly to the weapons locker instance and make sure everything is contained within mylevel? Also to make sure this works in netplay because it crashes servers on map vote for some reasons. Keep in mind the .u and anim files work now as is, the only issue is that the mut seems to crash servers and that I don't want to force people to download these additional 2 files to play the map.... unless they literally come with/in the map and cause zero problems... including white listing and netplay and map voting, in which case they'd have to be separate from my map.

I really am lost....

Do you guys have some sample maps that use custom traders without mutators? That might help.
 
Last edited:
Upvote 0