Mostly Harmless
Legacy:ElevatorTriggerPlus
From Unreal Wiki, The Unreal Engine Documentation Site
The elevator trigger only responds to proximity. This class disables proximity but adds tag event response.
//============================================================================= // ElevatorTriggerPlus. //============================================================================= class ElevatorTriggerPlus extends Triggers; // A special trigger devised for the ElevatorMover class, since // detecting one trigger message is not enough to determine 2 or more // different commands (like up/down). When an event // triggers it, it sends a message to the ElevatorMover with the desired // keyframe change and moving time interval. var() int GotoKeyframe; var() float MoveTime; var() bool bTriggerOnceOnly; // // Called when something triggers the trigger. // function Trigger( actor Other, pawn EventInstigator ) { local ElevatorMover EM; // Call the ElevatorMover's Move function if( Event != '' ) foreach AllActors( class 'ElevatorMover', EM, Event ) EM.MoveKeyframe( GotoKeyFrame, MoveTime ); if( bTriggerOnceOnly ) // Ignore future touches. SetCollision(False); }
Implementation
- open actor browser
- click on "triggers"
- click "trigger" -> "new script"
- package: MyLevel
- name : ElevatorTriggerPlus
- put the code over the small code UT put there
- tools -> compile changed
- use the trigger in your level before you save and exit or it wont save it
(there's a page that explains this you can link to: Create A Subclass)
Credit
Taken from http://forums.beyondunreal.com/showthread.php?t=88718
Credit to "The_Countess".