Player spawn and 3D Floor trouble

Discuss all aspects related to modding Zandronum here.
User avatar
IdeIdoom
Zandrone
Posts: 1112
Joined: Mon Jun 04, 2012 6:19 am
Location: Meldola, Italy
Contact:

Re: Player spawn and 3D Floor trouble

#21

Post by IdeIdoom » Sat May 07, 2016 3:51 pm

Rheap wrote:
SwordGrunt wrote:Modulating takes a number and essentially "limits" it to the passed divisor. It returns the remainder of the division, which will always be between 0 and 9 since you are dividing by 10. This means that players 0-9 will be teleported to destinations 10-19, and players 10-19 will also be teleported to destinations 10-19 in the same order, and so forth. This makes it so you only 10 teleport destinations for an unlimited amount of players - if you want to use less teleport destinations, such as four, change the %10 to %4 instead and you'd then only need spots with TIDs 10, 11, 12, 13.

I don't see anything wrong with that script. Did you set the Z height properly for all the teleport destinations?
Now works, but there is a trouble: when i test it with 10-20 bot spawn, some spawn below the 3D Floor. I secure that all teleport z height and player things are on 3d floor.
There are no PlayerStartZHeight things IIRC, so even tho the player spawn is on a 3d floor, it ignores ZHeight and the 3d floor 'cause it's not an actual sector structure. Unless I'm wrong.
THE ROMANIAN POWERImage

Code: Select all

<+Dastan>	edd
<+Dastan>	boxxy skin when
<+Shift>	dastan you really want to fap at it this much and now you are going crazy and shredding your hair into a million tiny pieces for this boxxy skin to come out that way you can cum out
<+Dastan>	Shift, yes
--------------------------------------------------------------------
21:53:26  <@Estar>	well, if i'd be a girl, i would say ideidoom has ok looks

User avatar
SwordGrunt
Forum Regular
Posts: 377
Joined: Thu Jun 07, 2012 8:43 pm

Re: Player spawn and 3D Floor trouble

#22

Post by SwordGrunt » Sat May 07, 2016 9:29 pm

You have to make sure the number of teleport destinations is the same as the modulator. In the example posted previously, it's 10, so you need 10 distinct teleport destinations numbered from 10 to 19. If a player is not being teleported, then there is no teleport destination (or it has the wrong Z height) corresponding to his number (again, in this example, destinations with tags 10 to 19).
IdeIdoom wrote:
Rheap wrote:
SwordGrunt wrote:Modulating takes a number and essentially "limits" it to the passed divisor. It returns the remainder of the division, which will always be between 0 and 9 since you are dividing by 10. This means that players 0-9 will be teleported to destinations 10-19, and players 10-19 will also be teleported to destinations 10-19 in the same order, and so forth. This makes it so you only 10 teleport destinations for an unlimited amount of players - if you want to use less teleport destinations, such as four, change the %10 to %4 instead and you'd then only need spots with TIDs 10, 11, 12, 13.

I don't see anything wrong with that script. Did you set the Z height properly for all the teleport destinations?
Now works, but there is a trouble: when i test it with 10-20 bot spawn, some spawn below the 3D Floor. I secure that all teleport z height and player things are on 3d floor.
There are no PlayerStartZHeight things IIRC, so even tho the player spawn is on a 3d floor, it ignores ZHeight and the 3d floor 'cause it's not an actual sector structure. Unless I'm wrong.
By default, they ignore Z height, but there is a MAPINFO property to override that - I don't think it's supported by Zandronum 2.1, however.

User avatar
Rheap
 
Posts: 26
Joined: Tue Apr 05, 2016 3:39 pm

Re: Player spawn and 3D Floor trouble

#23

Post by Rheap » Sun May 08, 2016 10:47 am

SwordGrunt wrote:You have to make sure the number of teleport destinations is the same as the modulator. In the example posted previously, it's 10, so you need 10 distinct teleport destinations numbered from 10 to 19. If a player is not being teleported, then there is no teleport destination (or it has the wrong Z height) corresponding to his number (again, in this example, destinations with tags 10 to 19).
IdeIdoom wrote:
Rheap wrote:
SwordGrunt wrote:Modulating takes a number and essentially "limits" it to the passed divisor. It returns the remainder of the division, which will always be between 0 and 9 since you are dividing by 10. This means that players 0-9 will be teleported to destinations 10-19, and players 10-19 will also be teleported to destinations 10-19 in the same order, and so forth. This makes it so you only 10 teleport destinations for an unlimited amount of players - if you want to use less teleport destinations, such as four, change the %10 to %4 instead and you'd then only need spots with TIDs 10, 11, 12, 13.

I don't see anything wrong with that script. Did you set the Z height properly for all the teleport destinations?
Now works, but there is a trouble: when i test it with 10-20 bot spawn, some spawn below the 3D Floor. I secure that all teleport z height and player things are on 3d floor.
There are no PlayerStartZHeight things IIRC, so even tho the player spawn is on a 3d floor, it ignores ZHeight and the 3d floor 'cause it's not an actual sector structure. Unless I'm wrong.
By default, they ignore Z height, but there is a MAPINFO property to override that - I don't think it's supported by Zandronum 2.1, however.
Now i understand, but if i want 20 player spawn, i need only simple change the valute from 10 to 20 and the TIDs from 10-19 to 20-29?

User avatar
Tiger
Retired Staff / Community Team Member
Posts: 381
Joined: Thu May 31, 2012 6:21 am
Location: United States
Contact:

Re: Player spawn and 3D Floor trouble

#24

Post by Tiger » Sun May 08, 2016 11:06 am

SwordGrunt wrote:By default, they ignore Z height, but there is a MAPINFO property to override that - I don't think it's supported by Zandronum 2.1, however.
Correct, that property does work just fine in the latest Zandronum 3.0 build.
Rheap wrote: but if i want 20 player spawn, i need only simple change the valute from 10 to 20 and the TIDs from 10-19 to 20-29?
Please don't make hackish scripts for something that already exists and works far better than a potentially broken map script. Please use the ZMAPINFO property UsePlayerStartZ, you can find the information about this property on the ZDoom wiki.
Nicholas Gautier

User avatar
SwordGrunt
Forum Regular
Posts: 377
Joined: Thu Jun 07, 2012 8:43 pm

Re: Player spawn and 3D Floor trouble

#25

Post by SwordGrunt » Sun May 08, 2016 2:53 pm

Tiger wrote:
SwordGrunt wrote:By default, they ignore Z height, but there is a MAPINFO property to override that - I don't think it's supported by Zandronum 2.1, however.
Correct, that property does work just fine in the latest Zandronum 3.0 build.
Rheap wrote: but if i want 20 player spawn, i need only simple change the valute from 10 to 20 and the TIDs from 10-19 to 20-29?
Please don't make hackish scripts for something that already exists and works far better than a potentially broken map script. Please use the ZMAPINFO property UsePlayerStartZ, you can find the information about this property on the ZDoom wiki.
I don't see the script being hackish but, more importantly, if someone wants to play their mod in the current Zandronum 2.1 (which is the version almost all public servers are hosted with) then I strongly encourage hacking their way around the limitations encountered, as I've done countless times on a large project of mine. While more testing on the 3.0 builds is always good, and I approve of making mods targeted at that version, I think people should be free to play on the current official version since odds are much higher they'll have other people to play with.

Rheap wrote: but if i want 20 player spawn, i need only simple change the valute from 10 to 20 and the TIDs from 10-19 to 20-29?
Yes, the modulator would be 20 (PlayerNumber()%20), but you would need 20 teleport destinations, TIDs from 10 to 29. I would use 8 player spawns at most, that's already a lot of people in the game, but you can use as many spawns as you want as long as the number of spawns and teleport destinations is the modulator (in this case, 20) and the TIDs range from 10 to modulator+9 (in this case, 10 to 29).

User avatar
Rheap
 
Posts: 26
Joined: Tue Apr 05, 2016 3:39 pm

Re: Player spawn and 3D Floor trouble

#26

Post by Rheap » Sun May 08, 2016 4:56 pm

SwordGrunt wrote:
Tiger wrote:
SwordGrunt wrote:By default, they ignore Z height, but there is a MAPINFO property to override that - I don't think it's supported by Zandronum 2.1, however.
Correct, that property does work just fine in the latest Zandronum 3.0 build.
Rheap wrote: but if i want 20 player spawn, i need only simple change the valute from 10 to 20 and the TIDs from 10-19 to 20-29?
Please don't make hackish scripts for something that already exists and works far better than a potentially broken map script. Please use the ZMAPINFO property UsePlayerStartZ, you can find the information about this property on the ZDoom wiki.
I don't see the script being hackish but, more importantly, if someone wants to play their mod in the current Zandronum 2.1 (which is the version almost all public servers are hosted with) then I strongly encourage hacking their way around the limitations encountered, as I've done countless times on a large project of mine. While more testing on the 3.0 builds is always good, and I approve of making mods targeted at that version, I think people should be free to play on the current official version since odds are much higher they'll have other people to play with.

Rheap wrote: but if i want 20 player spawn, i need only simple change the valute from 10 to 20 and the TIDs from 10-19 to 20-29?
Yes, the modulator would be 20 (PlayerNumber()%20), but you would need 20 teleport destinations, TIDs from 10 to 29. I would use 8 player spawns at most, that's already a lot of people in the game, but you can use as many spawns as you want as long as the number of spawns and teleport destinations is the modulator (in this case, 20) and the TIDs range from 10 to modulator+9 (in this case, 10 to 29).
Good, thanks to all for help me with ACS scripting.

Post Reply