Page 2 of 3

Posted: Mon Apr 26, 2004 6:39 pm
by jv_map

Code: Select all

destinations:
  if(local.p.dmteam == allies)
  {
    thread tele1
  }
  else
   // must be axis if gametype >= 2
  {
    thread tele2
  }
end 

Posted: Mon Apr 26, 2004 8:36 pm
by WarTech
jv_map wrote:

Code: Select all

destinations:
  if(local.p.dmteam == allies)
  {
    thread tele1
  }
  else
   // must be axis if gametype >= 2
  {
    thread tele2
  }
end 

I can always count on your for a fast reply..Thanks a bunch. You know this is already running on a live server on a nice OC48 line. You should stop by and then you can give me some ideas on how to improve it before I release it.

Any way thanks YOU DA MAN!!!

ip 69.56.218.196

<TWZ>WarTech.

Posted: Mon Apr 26, 2004 9:08 pm
by WarTech
jv_map wrote:

Code: Select all

destinations:
  if(local.p.dmteam == allies)
  {
    thread tele1
  }
  else
   // must be axis if gametype >= 2
  {
    thread tele2
  }
end 
Well tested it and it behaves just if there was only one spawn tele for both teams. Still can not make diferrence betwing the allies from axis. They all continue to spawn using only one spawn point. Any more Ideas?

<TWZ>WarTech

Posted: Mon Apr 26, 2004 9:57 pm
by tltrude

Code: Select all

destinations: 
  local.p = parm.other
  if(local.p.dmteam == allies) 
  { 
    thread tele1 
  } 
  else 
   // must be axis if gametype >= 2 
  { 
    thread tele2 
  } 
end 
You need to adjust your timing because the teleporter and a target must already be there before the player teleports. Will the player already have choosen a team when he spawns at the spawn point?

Posted: Mon Apr 26, 2004 11:34 pm
by WarTech
tltrude wrote:

Code: Select all

destinations: 
  local.p = parm.other
  if(local.p.dmteam == allies) 
  { 
    thread tele1 
  } 
  else 
   // must be axis if gametype >= 2 
  { 
    thread tele2 
  } 
end 
You need to adjust your timing because the teleporter and a target must already be there before the player teleports. Will the player already have choosen a team when he spawns at the spawn point?
Yes the players already have choosen their teams. What exactly you mean by the adjusting timing?

Thanks

<TWZ>WarTech

Posted: Mon Apr 26, 2004 11:48 pm
by WarTech
tltrude wrote:

Code: Select all

destinations: 
  local.p = parm.other
  if(local.p.dmteam == allies) 
  { 
    thread tele1 
  } 
  else 
   // must be axis if gametype >= 2 
  { 
    thread tele2 
  } 
end 
Rats it still continue to use only one destination regardless of which team your in. There is got to be a way to tell it that this one is axis therefore use the axis destination and same for the allied. it justs keeps using one selection. We are missing something in the code. LOL.

<TWZ>WarTech

You need to adjust your timing because the teleporter and a target must already be there before the player teleports. Will the player already have choosen a team when he spawns at the spawn point?

Posted: Tue Apr 27, 2004 1:26 pm
by WarTech
jv_map wrote:

Code: Select all

destinations:
  if(local.p.dmteam == allies)
  {
    thread tele1
  }
  else
   // must be axis if gametype >= 2
  {
    thread tele2
  }
end 

Well from what I can tell its not detecting whos Allies or Axis thus it only uses one of the tele for all. It behaves as there were only one thread not two. Is like is not making a decission to eather go to tele1 or else tele2. Any Ideas? I have tried many combinations to no avail. Sample of code below:

It either cant tell between teams or wich tele to use. It continues to use only one tele for both teams. Is there any other way to clearly tell it to use one for allies and the othere for axis?

This is for TDM (gametype 2)

//Teleport Trigger
local.tele = spawn trigger_teleport
local.tele target tele
local.tele.origin = ( -2644.00 1572.00 539.00 )
local.tele setsize ( -360.00 -32.00 -15.00 ) ( 150.00 32.00 64.00 )
local.tele wait 0.2
local.tele delay 0
thread destinations
end

destinations:
local.p.dmteam = parm.other
if(local.p.dmteam==axis)
{
thread tele1
}
else
{
thread tele2
}
end

tele1:
//Teleport dest 1 Allies
local.teledest = spawn func_teleportdest
local.teledest targetname tele
local.teledest.origin = ( 27.00 -923.00 600.00 )
local.teledest setsize ( -32.00 -32.00 -4.00 ) ( 32.00 32.00 8.00 )
end

tele2:
//Teleport dest 2 Axis
local.teledest = spawn func_teleportdest
local.teledest targetname tele
local.teledest.origin = ( 217.00 -9223.00 6100.00 )
local.teledest setsize ( -32.00 -32.00 -4.00 ) ( 32.00 32.00 8.00 )
end

tele

Posted: Tue Apr 27, 2004 1:34 pm
by tltrude
"tele" is a command word and should not be used as a targetname.

Re: tele

Posted: Tue Apr 27, 2004 1:42 pm
by WarTech
tltrude wrote:"tele" is a command word and should not be used as a targetname.
What should I use then? If I remove that line the script will not work. Post me a modification as to how it should look them.

Thanks

BTW I am monitoring this so I can post reply asap after testing.

tele

Posted: Tue Apr 27, 2004 3:03 pm
by tltrude
This seems to work. Sorry. I changed your coordinates for my test map. See what I mean about "tele" being a command word?

Code: Select all

main:

	level waittill prespawn

	exec global/ambient.scr mohdm7
	thread tele1
	thread tele2
	thread teleport

	level waittill spawn


end

teleport:  //Teleport Player

	local.tele = spawn trigger_multiple targetname "tele_trigger" 
	local.tele.origin = ( 64 -896 -56 ) 
	local.tele setsize ( -32.00 -32.00 -4.00 ) ( 32.00 32.00 8.00 )
  
 while (1)
	{
	$tele_trigger waittill trigger
	local.player = parm.other 
		if (local.player.dmteam == "allies") 
		{ 
		local.player tele $teled1 
		} 
		if (local.player.dmteam == "axis")  
		{ 
		local.player tele $teled2  
		}
	wait .1
	} 
end 

tele1:      //Teleport dest 1 Allies 

	local.teledest = spawn func_teleportdest targetname "teled1" 
	local.teledest.origin = ( 416 32 -56 ) 
	local.teledest setsize ( -32.00 -32.00 -4.00 ) ( 32.00 32.00 8.00 ) 
end 

tele2:      //Teleport dest 2 Axis
 
	local.teledest = spawn func_teleportdest targetname "teled2"
	local.teledest.origin = ( -416 32 -56 ) 
	local.teledest setsize ( -32.00 -32.00 -4.00 ) ( 32.00 32.00 8.00 ) 
end

Posted: Tue Apr 27, 2004 3:35 pm
by Bjarne BZR
What is the difference between:
1) Using trigger_teleport
2) Using the tele command
3) Setting the origin of the player

The teleports support telefrag protection?

I used setting the origin of the player in a "move spawns" mod for The Hunt, and it has the advantages:
1) Works in MOH:AA ( I got the teleport to work as well, but it behaved strangely )
2) Instant. ( The players never notice a transition, they "start" at the new position )

Re: tele

Posted: Tue Apr 27, 2004 3:53 pm
by WarTech
tltrude wrote:This seems to work. Sorry. I changed your coordinates for my test map. See what I mean about "tele" being a command word?

Code: Select all

main:

	level waittill prespawn

	exec global/ambient.scr mohdm7
	thread tele1
	thread tele2
	thread teleport

	level waittill spawn


end

teleport:  //Teleport Player

	local.tele = spawn trigger_multiple targetname "tele_trigger" 
	local.tele.origin = ( 64 -896 -56 ) 
	local.tele setsize ( -32.00 -32.00 -4.00 ) ( 32.00 32.00 8.00 )
  
 while (1)
	{
	$tele_trigger waittill trigger
	local.player = parm.other 
		if (local.player.dmteam == "allies") 
		{ 
		local.player tele $teled1 
		} 
		if (local.player.dmteam == "axis")  
		{ 
		local.player tele $teled2  
		}
	wait .1
	} 
end 

tele1:      //Teleport dest 1 Allies 

	local.teledest = spawn func_teleportdest targetname "teled1" 
	local.teledest.origin = ( 416 32 -56 ) 
	local.teledest setsize ( -32.00 -32.00 -4.00 ) ( 32.00 32.00 8.00 ) 
end 

tele2:      //Teleport dest 2 Axis
 
	local.teledest = spawn func_teleportdest targetname "teled2"
	local.teledest.origin = ( -416 32 -56 ) 
	local.teledest setsize ( -32.00 -32.00 -4.00 ) ( 32.00 32.00 8.00 ) 
end
Great job. I see what you mean. Thanks for the work. Check up you PM.

<TWZ>WarTech

info_player_start

Posted: Tue Apr 27, 2004 4:59 pm
by tltrude
Bjarne BZR - He is using this for singleplayer maps that have only the info_player_start as a spawn spot. The "func_teleportdest" will automattically kick the player off the destination spot, so other players can land there.

I switched it from using a trigger_teleport to using a trigger_multiple because it takes to long to spawn a new trigger each time a player joins or switches teams. So, the trigger will always be there for anyone spawning or when someone tries to block the spot.

I don't know if it will work right when 32 people try to spawn at the same time. But, it is worth a shot.

Re: info_player_start

Posted: Tue Apr 27, 2004 6:44 pm
by Bjarne BZR
tltrude wrote:The "func_teleportdest" will automattically kick the player off the destination spot, so other players can land there.
I hoped it had a function like that :)

Re: info_player_start

Posted: Tue Apr 27, 2004 10:05 pm
by WarTech
tltrude wrote:Bjarne BZR - He is using this for singleplayer maps that have only the info_player_start as a spawn spot. The "func_teleportdest" will automattically kick the player off the destination spot, so other players can land there.

I switched it from using a trigger_teleport to using a trigger_multiple because it takes to long to spawn a new trigger each time a player joins or switches teams. So, the trigger will always be there for anyone spawning or when someone tries to block the spot.

I don't know if it will work right when 32 people try to spawn at the same time. But, it is worth a shot.
Well its more than that; let me explaning it to you guys:

I already have the maps setup with spawn points for the allies and axis team. The reason for the tele usage is due to two of the maps for some strange reason once in a while spawn a couple of players in the original single player spawn location, wich I am not using in the maps therefore the players cant access the designated combat zone. I have tried to remove the spawn point, rename it ,,etc. Still continues to do it here and there, not all the time. SO!!!! to get around that bug I dropped a tele port at the same spawn location that keeps persisting and teleport the few players that fall in that trap to a predefine war zone location. Now with the help of tltrude I can designate teleportation to the appropriate team zone intead of dropping all players in one chaotic location.

THANKS FOR THE SCRIPT TOM UR DA MAN. I hope I can a few more tricks from you guys so I can finish the mod. Its upto 26 maps and boy they are turning to be fun. Just got me some 8 to 10 more maps and its done.

I may even take the time to add rain to some of the maps that dont have rain. Now check this new trick that will come with the mod. One map can be played several times and look totally different each time all done thru script, even have large maps sectioned off where you can also run the maps more than once and players will spawn in totally different location and changing the game play. Some of these already running on server ip 69.56.218.196

<TWZ>WarTech