Author Topic: Team Spawn Help  (Read 3232 times)

Hey, I've been working an a private project and I need help.
Its team-based, and so far so good.

But, I encountered a problem: Spawns.

For example, if I made a mod with to teams named red and blue.

I made the spawn bricks, "Red team spawn", and "Blue team spawn".
Whenever the teammate dies, he re-spawns at his team's spawn.

I tried this, scripting them and everything, but whenever I die on my team, I do not re-spawn at the spawn.
Can someone give me an example code or just help?

Team 1 Spawn
Team 2 ( or maybe 0) spawn

Team 1 Spawn
Team 2 ( or maybe 0) spawn
Uhm.... What does that help?

Uhm.... What does that help?
I have a feeling you're not using the right spawns, check in the SpaceMods category for those bricks.

I have a feeling you're not using the right spawns, check in the SpaceMods category for those bricks.
He said he's making his own mod, not using TDM.



You're going to need to supply some code for us to figure out a problem.

You're going to need to supply some code for us to figure out a problem.
Aren't you the ones that do that?

You know, what I really want is just how something would work as in:
Code: [Select]
function Gameconnection::Spawnplayer(%client)
{
           (Code that makes the player spawn at teams spawn)
           
            else

            parent::Spawnplayer(%client);
}
My reasoning is, before you send the parent to make the player spawn, it does something that makes the player spawn at his teams spawn, instead of him spawning at default spawn. I don't know if it would do something with %client.player.setransform, and thats basically my question. How would it do that?



Check out the VehicleWars and TDM codes. Either of them would be a good example, although VW would probably be easier to understand probably. Why are you doing a TDM/VehicleWars remake?

Check out the VehicleWars and TDM codes. Either of them would be a good example, although VW would probably be easier to understand probably. Why are you doing a TDM/VehicleWars remake?
I actually using a heavy modified version of VW's code, I tried looking at it, but I cannot catch on. And for the reason, I'm gonna make a CTF gamemode (Different from Space Guys) That has tagging, but it will take me a while, I am planning to make baseplates with zones above them and that will be the teams' sides.

what does the parent::_ do? does it basicaly call it again, while skipping itself, so that it can function normaly?

If they aren't on a team, spawn them normally.

I actually using a heavy modified version of VW's code, I tried looking at it, but I cannot catch on.
Computermix, you do know what you're doing, right? You're not just copy+pasting? I doubt you are, but I'm just curious.



Also, since this is a modification of VehicleWars, you should probably not release it. Releasing modded stuff isn't always the greatest idea. It might get you in trouble.

If they aren't on a team, spawn them normally.
Computermix, you do know what you're doing, right? You're not just copy+pasting? I doubt you are, but I'm just curious.



Also, since this is a modification of VehicleWars, you should probably not release it. Releasing modded stuff isn't always the greatest idea. It might get you in trouble.
Of course I know, otherwise I would've never made this topic, because people on here are smart. My lord, if I copy+pasted, I may as well just run VW itself. Either that, I would have to give credit, if I were to use any parts of it. Eh, It would be dumb to just re-copy and paste the thing again.
in a folder. I basically figured the teams out, you know, "function gameconnection::Oncliententergame" stuff. And from there, I slowly added on. Still, I'm not planning to release it, but if you want me to, I can. :P

No, probably not a good idea. You'd most likely get in trouble if you released. Now if you made an expansion module for VW, that would be a whole different matter. Then you could release. What changes were you making anyway? Some might be done already.