Team teleports

Request help for teeworlds-related subjects (mapping, servers, ..).
For client issues, see our repositories (https://github.com/ddnet/ddnet/issues).
Post Reply
QshaR
Posts: 86
Joined: Mon Feb 02, 2015 11:41 am

Team teleports

Post by QshaR »

Hi all!

Does anyone knows if there a possibility to make team teleport. Let me explain what is it.

If there are several teleport locations on the map, server chose random one and teleports player there. I need to somehow control this random teleport. I need the option where all members of /team were teleported to the same location chosen by random.

Right now I have no idea how to do that. Any ideas? :?
User avatar
deen
TECHNICAL Team
Posts: 3576
Joined: Mon May 05, 2014 2:30 pm
Player profile: https://ddnet.org/players/deen/
Discord: deen#5910

Re: Team teleports

Post by deen »

Not possible I think.
QshaR
Posts: 86
Joined: Mon Feb 02, 2015 11:41 am

Re: Team teleports

Post by QshaR »

Found the right spot in source: m_Core.m_Pos = Controller->m_TeleOuts[z-1][(!Num)?Num:rand() % Num];
But still very hard to change to make team tele...

Thanks anyway.
User avatar
kamillentee
Posts: 687
Joined: Sat Jul 26, 2014 11:47 pm
Player profile: http://ddnet.tw/players/kamillentee/
Clan: |*KoG*|

Re: Team teleports

Post by kamillentee »

Qshar do you mean this new random map, where its only possible to finish with luck.
As I played this map I searched the whole map for something I have to reach but there is nothing except weapons.
Could you tell me what players should have to do before finishing. I'm sure there is a way to avoid such situations because almost all is possible to map, something just with hacks but it is. So could you tell me the plan of the mapper.
QshaR
Posts: 86
Joined: Mon Feb 02, 2015 11:41 am

Re: Team teleports

Post by QshaR »

Here is the idea:

I have one big map, that consists of many many parts.
I want the players to pass random 10 parts to finish the map. So each time you start a new game you have new parts.

This is very easy to implement with teleport if you go in solo. But if you are in team - all players should get to the same teleport location.
QshaR
Posts: 86
Joined: Mon Feb 02, 2015 11:41 am

Re: Team teleports

Post by QshaR »

deen,

I looked over several files: character.cpp , projectile.cpp, ddracecommands.cpp, DDRace.cpp, gamecore.cpp, players.cpp
I can't find the line that chooses the location to teleport to.

I thought it is "m_Core.m_Pos = Controller->m_TeleOuts[z-1][(!Num)?Num:rand() % Num]" in character.cpp, but looks like my guess is wrong.
User avatar
deen
TECHNICAL Team
Posts: 3576
Joined: Mon May 05, 2014 2:30 pm
Player profile: https://ddnet.org/players/deen/
Discord: deen#5910

Re: Team teleports

Post by deen »

The teleporter is "(!Num)?Num:rand() % Num"
QshaR
Posts: 86
Joined: Mon Feb 02, 2015 11:41 am

Re: Team teleports

Post by QshaR »

ha-ha, that was funny - I compiled the other files, not the ones I edited. :D :D :D

It works fine now. Tnx
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests