Author Topic: More new stuff (and what you can do with it)  (Read 10108 times)

0 Members and 1 Guest are viewing this topic.

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Re: More new stuff (and what you can do with it)
set-object-relative-x would be easy.

Doing it with acceleration and stuff like you're saying would be a bit harder, but would be flexible later on.

Basically you'd have to create (Well, probably I'd have to create) a forced-movement system using the camera code algorithms. Probably as simple as adding a variable to objects, creating another Camera array, iterating that through every frame and overriding an object's movement so long as the forced movement hasn't been done yet.

Throw in a SEXP to add the object to the list and set the object's variable and that'd give you mostly what you're asking.

That'd be the simplest method, but it wouldn't give you exactly what you're asking. Instead you'd get a set-object-position function in the style of a set-camera-position function. (Or since that's not implemented yet, set-ship-rotation/set-camera-rotation)


Right now the SEXP just changes the current speed. gradual movement would require changes to either the object's phyiscs info, or overriding the object's phyiscs info. Either way you'd need a separate set of arrays and checks per frame.
-C

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
Re: More new stuff (and what you can do with it)
I may be able to get some manually-controlled accel/decel by using a single every-time or repeating event per ship and setting a variable for each that gets it set lower and lower, or higher and higher each instance of the event.  Of course, this won't work until that bug about models refusing to be being moved down their x-axis is fixed.
The Trivial Psychic Strikes Again!