Spawning

Questions and answers about the how and why of making maps.
Post Reply
CUPCAKE
Private First Class
Private First Class
Posts: 303
Joined: Sat Sep 30, 2006 2:31 pm

Spawning

Post by CUPCAKE »

Hey everyone,
I've been making a map and it works very well so far. My only question is why does my tank spawn inside of the base? By that, I mean that when I log on to my map, and spawn, I'm stuck in the base and can't move. The only way to get out is to self destruct or press the jump button and the forward button a lot until the tank reaches the edge (self destruct is easier...)
Thanks,
User avatar
SkillDude
Private First Class
Private First Class
Posts: 336
Joined: Sun Apr 01, 2007 4:50 pm
Location: United States

Post by SkillDude »

It depends, if the base is at the exact same elevation as a box object or mesh, you may have to slightly move up the base by say 0.05 to get yourself to spawn on the base.

If your base is also floating in the air without touching the ground or an object, you may have to make yourself spawn above the base instead of below it.

Don't know if this helps, just telling you my experience.
User avatar
CannonBallGuy
Private First Class
Private First Class
Posts: 2083
Joined: Wed Apr 12, 2006 1:31 am
Contact:

Post by CannonBallGuy »

Showing the map would help......
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
CUPCAKE
Private First Class
Private First Class
Posts: 303
Joined: Sat Sep 30, 2006 2:31 pm

Post by CUPCAKE »

Ahh, I see. My base is floating. I'll try adding a box under it...

Well, when i added the boxes below, the tank only spawned in that box
Then I realized that the base was 3 quarters sticking out of the map. When I fixed that, it worked!
User avatar
DeathFire
Private First Class
Private First Class
Posts: 23
Joined: Sun Dec 24, 2006 9:50 am
Contact:

Post by DeathFire »

i too got a problem with spawning (actually respawning)
my problem is that when i log in I'm on my team base but when I'm dead i respawn above my base around the 500 feet(or whatever you want to call it)
heres a picture of it:
Image
can somebody tell me what i did wrong?
the code for my respawning-zones is this:
zone
position 350 350 21
rotation 0
size 50 50 20
team 1
end

zone
position -350 -350 21
rotation 0
size 50 50 20
team 3
end
User avatar
joevano
General
General
Posts: 1863
Joined: Sat Jun 18, 2005 1:08 pm
Location: South Bend, Indiana, USA

Post by joevano »

Ah, the dreaded air spawn (with lots of them CPU utilization goes WAY up) :)

Again I am talking about something I only have a vauge knowledge of, but we used to have this problem all the time on Lasermania. It was caused by there being no "safe" place to spawn. As I understand it, if there were too many lasers trained on the enemy spawn area, and bzflag calculated that there was no spawn area that could be spawned to safely, it would spawn you 500 ft in the air. Of course this just made it really fun for the team with all the lasers, it would rain tanks (literally) and you just picked em off as they fell. The solution on Lasermania was to create safe spawn zones that could not be constantly covered by laser fire (the spawn pods). I remember hearing talk that the routine looks at 20 degree to each side of where a laser is pointing to be unsafe (that is my vague recollection). So my question would be do you have laser World Weapons that point at your base? There are other things that can cause airspawns too, but I never asked what they were.
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
DeathFire
Private First Class
Private First Class
Posts: 23
Joined: Sun Dec 24, 2006 9:50 am
Contact:

Post by DeathFire »

i want to use a sw anti spawn world weapon but i didn't coded it in yet so i don't have anything dangerous pointed at my base (maybe a teleporter but thats all)
User avatar
blast
General
General
Posts: 4933
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Post by blast »

You probably want to verify that you have -sb (spawn on buildings) enabled in your server configuration as well. Might not be the problem, but still something to check.
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image
User avatar
DTRemenak
General
General
Posts: 625
Joined: Thu Jan 16, 2003 4:54 am
Location: U.S.
Contact:

Post by DTRemenak »

donny_baker is mostly correct. High spawns are normally caused by having no safe place to spawn. Spawn safeties can be modified with bzdb. The following are considered to make a spawn point imminently dangerous (unsafe):

A tank with shockwave within _spawnSafeSWMod * _shockOutRadius
A tank with steamroller or burrow within _spawnSafeSRMod * _tankRadius
A tank within _spawnSafeRadMod * _tankRadius facing within 20 degrees
A tank with laser any distance away facing within 20 degrees

Notes:
1. 20 degrees is a total arc here, so it's 10 degrees to each side, not 20 degrees to each side.
2. World weapons are not taken into account, only tank weapons. This needs to be fixed.
3. We don't do collision detection on the safety arcs, we act as if the field is completely empty. That could be improved.
4. We don't do any comparisons to shots already on the field, as that requires a server side state.
5. In CTF mode with our default spawn policy, if you are set to restart on base, we do NOT check to see if the base is imminently dangerous, we just drop you onto it.

We also have several other spawn policies included with the build by default. In 2.1 at least (not sure about 2.0) they can be selected with the -spawnPolicy bzfs option.
"Default" is described above.
"Dangerous" will spawn you in an imminently dangerous location (as defined above) if at all possible, and if not, then as close to an enemy as possible.
"Random" does absolutely no safety checking, just makes sure you're not inside a building or under water, then places you.

Plugins can also override the spawn position.

If someone wants to clean this all up and wikify it, they're welcome to.
User avatar
DeathFire
Private First Class
Private First Class
Posts: 23
Joined: Sun Dec 24, 2006 9:50 am
Contact:

Post by DeathFire »

blast wrote:You probably want to verify that you have -sb (spawn on buildings) enabled in your server configuration as well. Might not be the problem, but still something to check.
it works!!! thanks!
cop @ laserball's crazy new server
Post Reply