i need to make a jack in system like in other matrix games, but how???
i can't figure out the code
ID:175009
![]() Jun 22 2003, 8:53 am
|
|
I'm really new to coding but I'll try to help you get started.
I think the first thing to do would be to setup a few VARs or variables like this... mob var //this will give you the abililty to retain a few variables to refer to later in your code Jacked //this will keep info on if someone is jacked in or not. 1 if they are, 0 if not. Operator //this will let you mark who is and is not an operator 0 if not 1 if yes. Caller //This would let you know who's on the hardline so that they can be brought out of the matrix. After that you could setup an object that works on Click()or Bump() and have it bring up an alert offering to do a JACK function and Unjack which would if (usr.client) usr.FP_Move(11,15,2) which would then send them into the matrix (or in normal terms, transport them wherever your matrix map is) And unjack would return them to the ship if they were Caller = 1 I know this sounds confusing, it is kinda confusing to me to lol. But I "think" it should work. |
Swimmer4LifeH2O wrote:
obj/Computer THANKS A LOT MAN!!! UR GETTING GM ON MY GAME IF U WANT TO!! but still one prob... if u plug in you have to choose where u wanna go between "the city", "Training" and "Armoury". i hope u can help me with that too... |
Swimmer4LifeH2O wrote:
obj/Computerif("City") M.loc=locate(x,y,z) if("Armoury") M.loc=locate(x,y,z) if("Training") M.loc=locate(x,y,z)</FONT> M.inmatrix=1 |
icon='computer.dmi'
verb
Jack_In()
set src in oview(1)
for(var/mob/M in world)
if(M.inchair && M.team==usr.team)
world<<"[usr] jacks [M] into the Matrix!"
M.loc=locate(1,5,2)
M.inmatrix=1
Jack_Out()
set src in oview(1)
for(var/mob/M in world)
if(M.inmatrix && M.team==usr.team && M.tele)
world<<"[usr] jacks [M] out of the Matrix!"
M.loc=locate(1,1,1)
M.inmatrix=1
obj/Chair
icon='chair.dmi'
verb
Sit()
set src in oview(1)
usr.inchair=1
world<<"[usr] waits to be jacked into the Matrix!"
Get_Up()
set src in view(0)
usr.inchair=0
obj/Tele
icon='tele.dmi'
verb
Pick_Up()
set src in oview(1)
usr.tele=1
world<<"[usr] waits to get jacket out of the Marix!"
Hang_Up()
set src in view(0)
usr.tele=0
mob
var
inmatrix=0
inchair=0
team=""
tele=0