ThrustThing
Thrusts the thing with the given tid in the direction specified by angle with the given force. Can be easily combined with ThrustThingZ.
72:ThrustThing (angle, force, nolimit, tid)
- angle: Byte angle to thrust the thing
- force: The force, in units per tic (1 second = 35 tics), to apply to the thing.
- nolimit: Must be set to 1 if the thrust is larger than 30
- tid: TID of the thing to thrust. If this is 0, the activator of the special is affected itself.
ThrustThing can also be used to thrust based on actor angle.
ThrustThing(angle * 256 / 360, 0, 0, 0) ThrustThing(angle * 256 / 360 + 64, 0, 0, 0)
The first line will thrust in the direction the actor is facing. Adding +64, +128, or +192 will thrust to the right, backwards, or left, respectively.
Examples
This script combines ThrustThing with ThrustThingZ to spawn an arachnotron, and make it jump ~500 map units into the air and ~200 map units to the east.
Script "Arachnotron jump" (void) { SpawnSpotFacingForced("Arachnotron", 142, 143); Delay(1); ThrustThingZ(143, 115, 0, 0); Delay(18); ThrustThing(0, 10, 1, 143); }
External links
This article is issued from Zdoom. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.