Forced forward movement

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
LilWhiteMouse
Posts: 2270
Joined: Tue Jul 15, 2003 7:00 pm
Location: Maine, US
Contact:

Forced forward movement

Post by LilWhiteMouse »

How is forced forward movement accomplished? I can't download the Robotech demo (server not found), and my only copy went with my crashed HDD. Is there any way to do it via ACS?
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

ThrustThing?
User avatar
Hirogen2
Posts: 2033
Joined: Sat Jul 19, 2003 6:15 am
Operating System Version (Optional): Tumbleweed x64
Graphics Processor: Intel with Vulkan/Metal Support
Location: Central Germany
Contact:

Post by Hirogen2 »

Last time I used ThrustThing() the player kept on moving... did I do something wrong?
User avatar
Biff
Posts: 1061
Joined: Wed Jul 16, 2003 5:29 pm
Location: Monrovia, CA, USA

Post by Biff »

You must have, unless it was a frictionless surface. It's always worked properly for me.
ThrustThing( angle, distance, -, -, - )
Although, I was never convinced that it was actually distance rather than speed, I wonder if it indicates a distance over which a "force" is applied and acceleration is inversely proportional to mass of the thing. ???
Cyb
Posts: 912
Joined: Tue Jul 15, 2003 5:12 pm

Post by Cyb »

you could use currents/wind or convayer belts. the latter only works if you're actually touching the floor though, so you probably want wind or currents (for above/below deep water).

http://zdoom.doomworld.com/reference/ac ... SetCurrent
http://zdoom.doomworld.com/reference/ac ... or_SetWind
http://zdoom.doomworld.com/reference/ac ... h_SetForce
User avatar
LilWhiteMouse
Posts: 2270
Joined: Tue Jul 15, 2003 7:00 pm
Location: Maine, US
Contact:

Post by LilWhiteMouse »

Don't all these things force the player in a specific direction? I want the player to move in the direction they're facing, like the Robotech demo.
Cyb
Posts: 912
Joined: Tue Jul 15, 2003 5:12 pm

Post by Cyb »

oh I dunno, I never played the robotech demo, was it for zdoom? the only way I could think of doing it would be if there was a function that returned the player's angle and then simply thrust the player in that direction constantly, but I don't know if such a function exists...
User avatar
Biff
Posts: 1061
Joined: Wed Jul 16, 2003 5:29 pm
Location: Monrovia, CA, USA

Post by Biff »

Hmm, if it were only possible to activate +forward by script, that should always move the player in the facing direction. Sounds like a real long-shot request.
User avatar
Hirogen2
Posts: 2033
Joined: Sat Jul 19, 2003 6:15 am
Operating System Version (Optional): Tumbleweed x64
Graphics Processor: Intel with Vulkan/Metal Support
Location: Central Germany
Contact:

Post by Hirogen2 »

That could be made an ACS enhancement, Randy?
Biff wrote:ThrustThing( angle, distance, -, -, - )
When ThrustThing is called from a linedef, angle can range from 0 to 255, but internally (also scripts) it is passed as an int, so -- assuming that angle is an unsigned int --, could this be made:

Code: Select all

ThrustThing(-1, dist, ...)
Which means using current angle. This could work since angle usually is only 0-255, even in scripts.
The -1 of course must be stored as 0xFFFF(FFFF) in the BEHAVIOR lump.
User avatar
Biff
Posts: 1061
Joined: Wed Jul 16, 2003 5:29 pm
Location: Monrovia, CA, USA

Post by Biff »

Will acc compile the -1 as you say is needed?
Cyb
Posts: 912
Joined: Tue Jul 15, 2003 5:12 pm

Post by Cyb »

the only thing acc is concerned with in terms of acs specials is that they have the proper number of arguments and that the functions actually exist and have the correct syntax. other than that you can do whatever you want.

for instance you could open up zspecial.acs and change thrustthing to take three arguments instead of 2, and then do thrustthing(9, 64, 128); and acc would be happy and compile it. I'm not sure what would happen when zdoom attempted to run it (I imagine it would just ignore the 3rd argument), but it would compile
Locked

Return to “Editing (Archive)”