|
Author Topic:   How to adjust spewer to send in all 3 directions equally?
Irascible
Member
posted April 22, 2003 06:42 AM            
I can't figure out what spew min and max is exactly all about. I have a variation on the tri-mirv nuke. But I want to have the spewer spit the 3 nukes out in 3 direction, each 120 degrees from each other - so that they look like they've split a pie up into three.

So far the only thing I can figure out is that I set gravity to zero for the projectiles; and I set the min and max of the y value to zero so that they fly horizontal. I think I need to do 3 separate spewers so that each projectile goes in the exact same direction each time. But I can't figure out how to set the x and z values. Thanks for any help.

IP:

KiLlEr
Member
posted April 22, 2003 09:09 AM            
*** CALCULATIONS HAVE BEEN CORRECTED ***

You will need 4 spewers.

One spewer launches 3 other spewers sequentially.

Then each of the 3 spewers would have thier min/max set to one direction.

i.e. to fire a nuke north:

min = 0, 0, 20
max = 0, 0, 20

to fire a nuke east:

min = 20, 0, 0
max = 20, 0, 0

to fire a nuke west:

min = -20, 0, 0
max = -20, 0, 0

The 'Das Tornado' does something similar.

To fire it at a 120 deg angle from north (velocity 0, 0, 20) , you would need to do some trig to figure out the correct X and Z velocities. Then you'd set the max and min of a spewer to the same values. Then reverse the sign of the X value to get the X,Z velocities of the other spewer and set its min and max.

Here's the low down of the x&z values (V is your velocity vector). TM won't do the computations obviously

spewerNorth.ent:
min = 0, V, V
max = 0, V, V

spewerSouthwest.ent:
min = (V * sin 240), V, (V * cos 240)
max = (V * sin 240), V, (V * cos 240)

spewerSoutheast.ent:
min = (V * sin 120), V, (V * cos 120)
max = (V * sin 120), V, (V * cos 120)

mainSpewer.ent:
SpewType0 = spewer/spewerNorth
SpewType1 = spewer/spewerSouthwest
SpewType2 = spewer/spewerSoutheast
CycleType = 0
MaxSpewCount = 3


I set the Y velocity to V as well so it fires upwards at a 45 degree angle. To steepen the angle, give it a higher Y velocity. To flatten it lower the Y velocity. If you want a specific angle, then things get a little more complicated:

X = V * cos azmuth * sin compass-heading
Y = V * sin azmuth
Z = V * cos azmuth * cos compass-heading

the compass-heading is the X/Z direction:
North = 0 degrees
East = 90 degrees
South = 180 degrees
West = 270 degrees

The azmuth is the Y direction:
Parallel to ground (horizon) = 0 degrees
perpendicular to ground (zenith) = 90 degrees

[This message has been edited by KiLlEr (edited April 22, 2003).]

[This message has been edited by KiLlEr (edited April 23, 2003).]

IP:

Irascible
Member
posted April 22, 2003 10:28 PM            
Wow. Thanks. I can't say that I got all of that. But I understood enough to know I'll prolly take a simpler tact.

IP:

Irascible
Member
posted April 23, 2003 12:05 AM            
The highest math I ever got to was pre-calc. And I forgot most of that even. I tried entering what I thought was correct into my scientific calculator. It didn't come out right. The speed of the spewed projectiles is 70. Is it easy enough to crunch the numbers for me?

IP:

KiLlEr
Member
posted April 23, 2003 12:11 AM            
oops, I have the X and Z swapped above. :/

spewerNorth.ent:
min = 0, 70, 70
max = 0, 70, 70

spewerSouthwest.ent:
min = -60, 70, -35
max = -60, 70, -35

spewerSoutheast.ent:
min = 60, 70, -35
max = 60, 70, -35

mainSpewer.ent:
SpewType0 = spewer/spewerNorth
SpewType1 = spewer/spewerSouthwest
SpewType2 = spewer/spewerSoutheast
CycleType = 0
MaxSpewCount = 3

IP:

Irascible
Member
posted April 23, 2003 12:27 AM            
You're the man Killer. Thanks.

But.

Could you crunch those numbers so that the nukes spew perfectly flat (horizontal) and not at an angle. Thanks.

IP:

KiLlEr
Member
posted April 23, 2003 12:37 AM            
Just set the Y to 0

IP:

Irascible
Member
posted April 23, 2003 12:56 AM            
TY. I should have known at least that much since I mentioned it in the first post. It works like a charm. Coolness.

IP:

Irascible
Member
posted April 23, 2003 03:58 AM            
Killer (or anyone that knows),

On the weapon in question, I want everyone on the map to see the explosion and various effects (it's a large effect). The way to accomplish that seems to be the transitory = 0 setting. But, it seems that using that setting causes anyone who logs on to the server to see the explosion as soon as they log on, even though it may have exploded many minutes earlier. I'd prefer that to not be the case. Any ideas why that happens? Could adding a lifespan = X setting or something else in the explo ent eliminate that problem?

Just so you know (I had this done before you gave your recommended way of doing it), it goes like this:
weapon -> projectile -> explo (chains to the 3 spewers) -> (the aforementioned) spewers -> (three) projectiles -> explo
In order for everyone to see everything from anypoint on the map, it seems necessary to have transitory = 0 for just about everything. Though it may not be necessary for the final explo ent, I'm not sure. I hope that made sense.

[This message has been edited by Irascible (edited April 23, 2003).]

IP:

KiLlEr
Member
posted April 23, 2003 09:09 AM            
That is correct. Everything needs a transitory = 0 to be seen as the transitory attribute is not inherited.

But setting it to 0 will cause it to be included in the 'playback' on the client, so long as the player is close enough to see them.

I've also noticed that the maximum distance between a player and an explo/explosphere for TM to determine it should draw the explo/explosphere is far shorter in a multiplayer game than a single player.

IP:

Irascible
Member
posted April 23, 2003 11:42 AM            
You didn't say so explicitly, but I assume that playback is what a client sees as he logs on? That sort of rapid succession of effects right before you actually start playing.

So the bottom line is that you're telling me if LDA's Revenge (the weapon, not the actual revenge of which I have no knowledge ) explodes 5 minutes into the game, there's no way for a client who logs on 10 minutes into the game to avoid seeing its graphic effects.

IP:

KiLlEr
Member
posted April 23, 2003 11:56 AM            
Yeap, thats what I ment by play back.

Apparently so. When I play on my TeamCTF server, I see every weapon that was fired near the first standard checkpoint on the map (which is where the camera sits before your first spawn) since the beginning of the game. Or at least thats what it looks like. That would also explain why people have difficulty connecting to a TeamCTF server when there are people already on.

I can't prove it, unfortunatly.

IP: