BZW Map FX: Lightning/Lighting = :?:

Questions and answers about the how and why of making maps.
Post Reply
User avatar
LeGeeko
Private First Class
Private First Class
Posts: 21
Joined: Wed Jun 27, 2007 6:36 pm

BZW Map FX: Lightning/Lighting = :?:

Post by LeGeeko »

I've been toying around with the BZW format recently, and I have 2 great map ideas. The first, Multiple Levels of CHAOS, is in Works In Progress section, currently in "first beta stage".

The second is a HUGE pyramid in the center of the map, surrounded by small(er) ones, with lightning coming from the small ones and hitting the HUGE one. With a lot of climb-able structures, too.

The only problem with the second idea is that I have no clue how one would call up a texture "on cue", like a World Weapon. I could use lasers for the lightning, but that would use a LOT of lasers.

I'm sure it can be done with textures, similar to a dynamic color, but how? :?: How does one create a material that will "flash" on and off? ( like so: :oops: - LOL :D )

In the wiki, there are several unexplained features of the material object, so that's not helping me very much... Even a detailed explanation of the material object and it's parameters would be great.

Thanks a bunch! :)
User avatar
joevano
General
General
Posts: 1863
Joined: Sat Jun 18, 2005 1:08 pm
Location: South Bend, Indiana, USA

Post by joevano »

Louman did lightning on his The Guantlet map, IIRC

might help to look at the map code here...
There is nothing worse than aggressive stupidity. -- Johann Wolfgang von Goethe
"How many legs does a dog have if you call his tail a leg? Four. Calling a tail a leg doesn't make it a leg." -- Abraham Lincoln
User avatar
LeGeeko
Private First Class
Private First Class
Posts: 21
Joined: Wed Jun 27, 2007 6:36 pm

Post by LeGeeko »

Thanks donny, I'll look into it.
User avatar
joevano
General
General
Posts: 1863
Joined: Sat Jun 18, 2005 1:08 pm
Location: South Bend, Indiana, USA

Post by joevano »

Would help if I added the link to the map...
http://my.bzflag.org/bb/viewtopic.php?t=9693
There is nothing worse than aggressive stupidity. -- Johann Wolfgang von Goethe
"How many legs does a dog have if you call his tail a leg? Four. Calling a tail a leg doesn't make it a leg." -- Abraham Lincoln
User avatar
LeGeeko
Private First Class
Private First Class
Posts: 21
Joined: Wed Jun 27, 2007 6:36 pm

Post by LeGeeko »

Yes, it might, but I already had the map on my computer. :) Thanks anyway! :)

I extracted the Lightning code from the BZW file. Pretty cool stuff. Just one more question: is it possible to rotate an object on the X or Y axes, instead of the default Z axis? Thanks again! :)
User avatar
CannonBallGuy
Private First Class
Private First Class
Posts: 2083
Joined: Wed Apr 12, 2006 1:31 am
Contact:

Post by CannonBallGuy »

look up "spin" - try the bzw manpage
Image

Merry Christmas!

"Look, if I don't buy booze for the kids, I don't get any incriminating pictures to show to their parents, my business goes down the sink, my girlfriend leaves me and the baby goes on ebay. So help me search..."

"go Play With Toys urself in a dark alley u donkey ******" - Lt-Kirby2007
Legolas_
Private First Class
Private First Class
Posts: 513
Joined: Thu Jan 20, 2005 10:24 pm

Post by Legolas_ »

The coding for spin is thus:

Code: Select all

spin angle nx ny nz    # (repeatable)
I would assume that angle would be in degrees, and the nx, ny, nz would specify which axes to spin it upon, but I am not sure.
meeba
Master Sergeant
Master Sergeant
Posts: 507
Joined: Sun Mar 12, 2006 10:49 pm
Location: N. Sanity Beach

Post by meeba »

Legolas_ wrote:The coding for spin is thus:

Code: Select all

spin angle nx ny nz    # (repeatable)
I would assume that angle would be in degrees, and the nx, ny, nz would specify which axes to spin it upon, but I am not sure.
That is almost correct, although it is important to note that only one of nx, ny, and nz can be 1. The other two must be 0. Also note that it is repeatable, so if you need more than one axis rotated upon, you can repeat it using a different vector for rotation.
User avatar
L4m3r
Hater of Everything
Hater of Everything
Posts: 724
Joined: Tue Feb 08, 2005 5:15 am
Location: Los Angeles

Post by L4m3r »

TangenT wrote:[That is almost correct, although it is important to note that only one of nx, ny, and nz can be 1. The other two must be 0.
Nope.

nx, ny, and nz are the three components of a unit vector which defines the axis of rotation. While in the vast majority of cases you will have one of these (usually nz) as 1 and the other two as 0, it is by no means necessary.

In fact, you don't really even have to use a unit vector, as bzfs will scale it for you if necessary.
Optimism is just a milder alternative to denial.
Legolas_
Private First Class
Private First Class
Posts: 513
Joined: Thu Jan 20, 2005 10:24 pm

Post by Legolas_ »

So,

Code: Select all

Spin 50 0 1 0
would give me a 50 degree rotation on the y axis?
meeba
Master Sergeant
Master Sergeant
Posts: 507
Joined: Sun Mar 12, 2006 10:49 pm
Location: N. Sanity Beach

Post by meeba »

L4m3r wrote:
TangenT wrote:[That is almost correct, although it is important to note that only one of nx, ny, and nz can be 1. The other two must be 0.
Nope.

nx, ny, and nz are the three components of a unit vector which defines the axis of rotation. While in the vast majority of cases you will have one of these (usually nz) as 1 and the other two as 0, it is by no means necessary.

In fact, you don't really even have to use a unit vector, as bzfs will scale it for you if necessary.
Sorry, just posting what I remember hearing from Jeff at one point when I was having trouble with it. Using two of them wasn't quite working right.
User avatar
CannonBallGuy
Private First Class
Private First Class
Posts: 2083
Joined: Wed Apr 12, 2006 1:31 am
Contact:

Post by CannonBallGuy »

Code: Select all

spin 180 1 0.5 0.25
should spin the object by 180° in the x-axis, 90° in the y-axis and 45° in the z-axis.
Image

Merry Christmas!

"Look, if I don't buy booze for the kids, I don't get any incriminating pictures to show to their parents, my business goes down the sink, my girlfriend leaves me and the baby goes on ebay. So help me search..."

"go Play With Toys urself in a dark alley u donkey ******" - Lt-Kirby2007
User avatar
LeGeeko
Private First Class
Private First Class
Posts: 21
Joined: Wed Jun 27, 2007 6:36 pm

Post by LeGeeko »

Thanks a ton, guys! That's exactly the info I need. :)
Post Reply