• 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 My mutator request: ONE WAY MOVER

Basically, this would be an extension of the mover class.

Interface: Add a single boolean checkbox to the Mover properties, labelled "bOneWay"

Function:
When a normal mover has been triggered and then gets triggered again, it does the entire opening motion backwards. For instance, a door will swing closed the exact same way it swung open. That's fine for doors and gates - but for vehicles, planes, and other uses it's terrible, since those vehicles would travel backwards when retriggered.

This mover would function by resetting the mover to its starting point each time it's triggered.

Goal: To create reusable, resetable movers for mappers. This way a mapper can create a single mover for, say, an airplane, and just trigger that mover multiple times. Each time the mover will automatically reset.

Uses:
  • Create airstrikes
  • Moving trains and trams
  • Convoys
  • Katyusha launches
 
Something like planes flying over that don't go backwards can easily be done if that's what you want. A mover that doesnt return to Key 0 (going backwards) is possible without coding anything. Have to think about how I did it though..

I think I did it with an AIScript that waited for the triggerevent, after that it performed the action and then it ended. Whereas a normal AIScript would go back to step one (waiting for event). So what you would get is a AIScript with the following:

0 - ACTION_WAITFOREVENT - The trigger event
1 - ACTION_TRIGGEREVENT - Mover
2 - ACTION_ENDSECTION

That would do for one time only movers.

Theres also a ACTION_MOVETOPOINT that has a destination tag. Maybe if you set that to a volume it would instantly go back there without travelling the whole distance?
 
Last edited:
Upvote 0