ID:171425
 
This I think will be very simple to answer for most of you.What I've coded so far is a login system so the host can choose different types of games.(Here comes the question)But I want the players that log in that server to be taken to that type map.I think this can be done by var but have been messing around with it and have not been sucessful.Thanks.
Do you mean different Zs? You can just make a map file with like let's say 5 Zs and do somethin like this
mob/Login()
var/A = input("What game?")in list("1","2")
if(A == "1")
loc = locate(1,1,1)
if(A == "2")
loc = locate(1,1,2)
In response to Artekia
No all I need is when the host chooses the game all players logging in or logged in after that go to that map..so i just put
loc=locate(blah,blah,blah)
????That easy ..Is it?
In response to CodingSkillz2
What map? You have to give details.

If you want to use different maps to show complete different places that aren't connected then you're better off using z levels instead of different maps.
In response to DeathAwaitsU
The host chooses a game type and those maps fo those typs are on different map z's.BUT when the hsot chooses the game type and map,I want it so that every mob that logs in afterthat logs into that z.
In response to CodingSkillz2
Then use src.loc=locate(x,y,z)
In response to DeathAwaitsU
This locates the mob logging in where?
Or do you mean after blah as logged in src.loc=locate(blah,blah,blah)..And that will send everyone to the current game type map?
In response to CodingSkillz2
No it relocates the person logging in to the co-ordinates that you send them to. x,y,z are the co-ordinates you need to fill in according to your map.
In response to DeathAwaitsU
Mabe i'm not saying it right or I did it right..
mob
Login()
usr<<sound('halo.mid',1)
if(players<= 0)
src <<"Host choose your game type."
src.AddVerbs()
host = src
input("Game Type?","Game Type?") in list("CTF(Capture The Flag)","Maze","Slayer")
if ("CTF(Capture The Flag)")
lc()
usr.loc=locate(5,5,1)

If ctf the usr is located there,but what I want done is that every mob logging in after the host has choosen the game type is relocated to that z and not a slayer map which is on another z.So basically I want the hsot to only host that type of game on his server.
In response to CodingSkillz2
mob
var
currentgametype = ""


mob
Login()
usr<<sound('halo.mid',1)
if(players<= 0)
src <<"Host choose your game type."
src.AddVerbs()
host = src
input("Game Type?","Game Type?") in list("CTF(Capture The Flag)","Maze","Slayer")
if ("CTF(Capture The Flag)")
lc()
usr.loc=locate(5,5,1)
currentgametype = "Ctf"
if(currentgametype == "Ctf")
usr.loc=locate(5,5,1)
//other ones....


I think this is what your trying to accomplish...not sure..and if it is I am not sure that thats the best way to do it.But it gives you an idea.
In response to Dalga Productions
Dalga Productions wrote:
> mob
> var
> currentgametype = ""
>
>
> mob
> Login()
> usr<<sound('halo.mid',1)
> if(players<= 0)
> src <<"Host choose your game type."
> src.AddVerbs()
> host = src
> input("Game Type?","Game Type?") in list("CTF(Capture The Flag)","Maze","Slayer")
> if ("CTF(Capture The Flag)")
> lc()
> usr.loc=locate(5,5,1)
> currentgametype = "Ctf"
> if(currentgametype == "Ctf")
> usr.loc=locate(5,5,1)
> //other ones....
>
>

I think this is what your trying to accomplish...not sure..and if it is I am not sure that thats the best way to do it.But it gives you an idea.


The way it's laid out, you may want to change the check of input to a switch statement. I'm not sure what the lc() proc is, if it needs to be there, but you can stream line the code a bit (also I'm not sure if you can do that if after the input, there is no check) by changing (at the input line):
  gametype = input("Game Type?") in list("1","2","3")
//above line is part of the if(player... block
switch(gametype)
if("1")
lc() //don't know what this is... is it just for the host?
usr.loc=locate(5,5,1)
if("2")
lc()
//more code....


the switch statement should be outside the if(players<=0) code block, since it doesn't matter if you are the host or not, you are going to where ever the game is set up by the host.
In response to CodingSkillz2
Dont use usr in procs.