Add translation parameter to all spawning functions

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Add translation parameter to all spawning functions

by Graf Zahl » Tue Nov 28, 2006 2:37 am

Right now there is no constant support in DECORATE - but it sure should be added ASAP because many of the multi-parameter DECORATE functions can get quite unreadable.

by Grubber » Tue Nov 28, 2006 2:16 am

Err.. I think the names won't be available in DECORATE (I might be wrong), so you have to simply add the numbers.

by Bio Hazard » Tue Nov 28, 2006 2:08 am

You separate them with '|'. (e.g. SIXF_ABSOLUTEPOSITION|SIXF_ABSOLUTEANGLE)

by Anakin S. » Tue Nov 28, 2006 1:32 am

So if you want multiple flags, do you just add them up?

by Graf Zahl » Mon Nov 27, 2006 10:27 am

HotWax is correct. Here's the current flags. I think the names speak for themselves so I won't explain them.

SIXF_TRANSFERTRANSLATION=1,
SIXF_ABSOLUTEPOSITION=2,
SIXF_ABSOLUTEANGLE=4,
SIXF_ABSOLUTEMOMENTUM=8,
SIXF_SETMASTER=16

by Cutmanmike » Mon Nov 27, 2006 9:36 am

Oh. I thought that was for flags as in +DROPOFF and whatnot.

by HotWax » Mon Nov 27, 2006 9:34 am

I'm betting the answer lies in the "flags" argument. ;)

by Cutmanmike » Mon Nov 27, 2006 9:32 am

So how do you define which uses relative and absolute?

by Graf Zahl » Mon Nov 27, 2006 9:30 am

Coordinates are always offsets from the spawning actor. There are 2 modes for both speed and position: relative and absolute.

Relative means that the spawn position and movement direction depends on the spawned actor's angle.
Absolute means the values are differences in absolute map coordinates (e.g. a positive x-value always means 'east'.)

by Cutmanmike » Mon Nov 27, 2006 9:24 am

Oh neat.

by HotWax » Mon Nov 27, 2006 9:20 am

Graf Zahl wrote:Both position and speed can be expressed relative to the spawned actor's angle or in global map units.

by Cutmanmike » Mon Nov 27, 2006 9:06 am

Graf Zahl wrote:A_SpawnItemEx(classname, xpos, ypos, zpos, xspeed, yspeed, zspeed, angle, flags)
Hmm, is the x y z position from the actor that spawns the "item"? Also how would xyz speed work?

Oh yeah, wait for the docs :)

by HotWax » Mon Nov 27, 2006 8:35 am

Holy..... That's awesome! Thanks, Graf!

by Electronic Samurai » Mon Nov 27, 2006 3:25 am

Neat!

Thanks much, Graf.

by Graf Zahl » Mon Nov 27, 2006 2:18 am

A_SpawnItemEx(classname, xpos, ypos, zpos, xspeed, yspeed, zspeed, angle, flags)

Both position and speed can be expressed relative to the spawned actor's angle or in global map units.

High flexibility requires a lot of information. You can see what the flags mean by looking at the source. This will be documented when it's officially released.

Top