Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you make a map changer with spawns?

Asked by 6 years ago

Like how to make a map change and have an intermission and the players teleport to the correct team spawn? when the map loads help?

1 answer

Log in to vote
0
Answered by 6 years ago

One option is to look up scripts in Free Models to study how they do things - you're not the first to want to be able to do this.

The second option is to do it completely yourself (optionally with help like on this site when you get stuck - but you need to try it yourself and show us what your code-so-far is, first!). You need to split your task into pieces:

  1. Select a new map
  2. Spawn in the map
  3. Teleport people to the spawn locations (or kill them all so they respawn normally at the new spawn locations -- note that if you have a lobby area where people normally spawn in, you'll have to disable those spawn locations while you're doing this)
  4. Wait for the end of the round (how will you know this? ex, is it after a 5 minute timer is done? Is there a win condition?)
  5. What will you do now? Send people back to the lobby, despawn everything, or something else?
  6. Have an intermission for however long (game design question: do you really need this? What purpose does the intermission serve?)
  7. Go to step 1

Tip: In whatever script is controlling all this, you'll need a while true do loop, since you want it to keep playing maps until the server closes. Many of the above steps should be in their own function(s), for organization.

Ad

Answer this question