Cogito, ergo sum
Legacy:Dma/SpiderMode
WARNING: THIS CAN CAUSE MOTION SICKNESS AND VOMITING![edit]
//============================================================================= // SpiderMode // Made/Hacked by dma. // http://www.coe.uncc.edu/~danderse/ //============================================================================= class SpiderMode extends Mutator config; var int TickCount; function ModifyPlayer(Pawn Other) { local xPawn x; local PlayerController PC; x = xPawn(Other); if(x != None) { PC=PlayerController(x.Controller); if ( NextMutator != None ) NextMutator.ModifyPlayer(Other); } function Tick(float DeltaTime) { local controller C; local PlayerController PC; TickCount++; if (TickCount>=3) { TickCount=0; C=Level.ControllerList; while (C != None) { PC = PlayerController(C); if (PC != None) { if (PC.bDuck!=0 && (PC.IsInState('PlayerWalking') || PC.IsInState('PlayerSwimming'))) { PC.GotoState('PlayerSpidering'); } if (PC.bDuck==0 && PC.IsInState('PlayerSpidering')) { PC.EnterStartState(); } } C = C.nextController; } } } function PostBeginPlay() { TickCount=0; Enable('Tick'); Super.PostBeginPlay(); } defaultproperties { IconMaterialName="MutatorArt.nosym" ConfigMenuClassName="" GroupName="Spider" FriendlyName="SpiderMode" Description="Spider State Test" }
Evolution: DMA, here's an alternative way to do this...
class SpiderMut extends Mutator; var name SpiderState; function PreBeginPlay() { local class<Pawn> GamePawnClass< SEMI > if (Level.Game!=None) GamePawnClass = class<Pawn>( DynamicLoadObject( Level.Game.DefaultPlayerClassName, class'Class' ) ); GamePawnClass.default.LandMovementState = SpiderState; } function ModifyPlayer(Pawn Other) { if (Other.default.LandMovementState!=SpiderState||Other.LandMovementState!=SpiderState) { Other.LandMovementState=SpiderState; Other.default.LandMovementState=SpiderState; } if (NextMutator!=None) NextMutator.ModifyPlayer(Other); } DefaultProperties { GroupName="Spider" FriendlyName="SpiderMan" Description="Spider State Test - Number 2" SpiderState=PlayerSpidering }
El Muerte [TDS]: I see that with the first sniplet the GetServerDetails method is repeated, unless you actualy change this method you do not need to add it into your subclass again. I see this happen a lot.
Dma: I copied it from a previous mutator (dma/MutMultiJump) I wrote and forgot to remove it.
MinisterFish: I've been playing around with this and noticed some bugs such as jumping off something and the controls and views getting stuck and that there are no animations while in the PlayerSpidering state. I may play around with it some more (after school finals) and see what I can come up with.
Mosquito: I love this idea, I can't wait to compile it into a .u!
RegularX: There's a spider mute in the xxxpak which is similar to the first example as well, and trust me - there are many, many issues with using this state in normal play. Camera problems are the start, but there are also mesh problems with moving around a level in a way never really intended. Players can drop or even get completely stuck into areas.
Foxpaw: As far as I understand, the PHYS_Spider was not intended to be used for wall crawling like one would suppose. From what I've heard it's just a remnant from a couple of monsters from Unreal 1 that would run along planar walls. Since the plane that you walk on was never intended to change, many problems you may find never arose in the intended application.