I have a lot of pictures for the problem. And I'll leave my coding for you to look at.
Pictures:
This is a Picture of me Editing the Hit Markers using the Mapping Tool:
https://photos.google.com/photo/ AF1QipNYMA6hNamHlNJp2GWTz4OePCVWpLupbDJGA5gg
This is a Picture of me Hitting the Marker and Renting the Apartment:
https://photos.google.com/photo/ AF1QipMP7ceL4i851s6pmp1i27NYn2dE2g09WokmERmf
This Next Picture is where the real problem is, I rented the apartment but the interior is still trying to rent it out.:
https://photos.google.com/photo/ AF1QipPXb3pG-0VkNyNxAmt7DP-KSIFe7VKJcc7R_c2u
And this is a Picture of me inside showing that the other marker didn't get rented out:
https://photos.google.com/photo/ AF1QipPw25X6kxqKawd-pydz1oQFA_j7liXJqK9FQ2pr
This is my Code:
//HEY EVERYONE... I HAVE BEEN TRYING TO GET A HOUSING SYSTEM WORKING, AND I'M CLOSE HOWEVER I DON'T KNOW HOW TO MATCH TO OF THE HIT MARKERS
//TOGETHER SO THE APARTMENT MARKERS SHOW UP AS BEING RENTED ON BOTH SIDES.
//I HOPE YOU CAN HELP.
//THANK YOU.
//From Housing System
//RESIDENTIAL MARKERS
turf/Markers/ApartmentRent
RedMarkerNorth
name = "Apartment"
icon = 'Markers.dmi'
icon_state = "RedNorth"
RedMarkerSouth
name = "Apartment"
icon = 'Markers.dmi'
icon_state = "RedSouth" //THESE ARE THE MARKERS FOR ENTERING OR RENTING AN APARTMENT
GreenMarkerNorth
name = "Apartment"
icon = 'Markers.dmi'
icon_state = "GreenNorth"
GreenMarkerSouth
name = "Apartment"
icon = 'Markers.dmi'
icon_state = "GreenSouth"
turf
Markers
var
Apartment
Price
WelcomeMessage = "" //VARIABLES ALL OF THE MARKERS FOR HOUSING WILL HAVE
ExLandX
ExLandY
ExLandZ
ELandX
ELandY
ELandZ
ID
obj
var //These next few variables are so you can store the object's 'x','y', and 'z'
saveX = 0
saveY = 0
saveZ = 0
turf
var
saveX = 0 //saves for the doormatt's 'x','y', and 'z'
saveY = 0
saveZ = 0
list
owner = list() //A list with all the people allowed in the house
turf/Markers/ApartmentRent/New() // THIS WAS AN ATTEMPT TO MATCH 2 MARKERS TOGETHER AUTOMATICALLY
IDMatch()
..()
turf
Markers/ApartmentRent
var
Rented = 0
proc
IDMatch(turf/Markers/ApartmentRent/b)
while(1)
if (src.ID == b.ID) //THIS WAS THE CODE TO MATCH 2 MARKERS TOGETHER
b.Rented = src.Rented
b.owner = src.owner
b.WelcomeMessage = src.WelcomeMessage
else usr << "This wasn't linked."
sleep(rand(2,7))
Enter(mob/b) //IF YOU BUMP THE MARKER
if (src.Rented == 0)
switch(alert("Would you like to Rent Apartment #[Apartment] for [Price]?", "Apartment Options", "Yes", "No"))
if ("Yes")
usr << "You've Rented this Apartment #[Apartment] for [Price]"
usr.Money -= Price
src.owner = usr
src.Rented = 1
if( src.icon_state == "GreenNorth") // CHANGES FROM GREEN TO RED TO SHOW ITS BEEN RENTED
src.icon_state = "RedNorth" //It would be helpful to make this be adjusted automatically between North and South.
else src.icon_state = "RedSouth" //
else if ("No")
usr << "Thank You for your Interest, We Hope to see you again soon."
else if (src.Rented == 1 && src.owner == usr)
var/d = (input("Welcome Back, What Would you Like to Do?", "Apartment Options") in list("Enter", "Exit", "Lock/Unlock Door", "Change Welcome Message"))
if (d == "Enter")
usr.loc = locate(ELandX, ELandY, ELandZ)
usr << "Welcome!"
if (d == "Exit")
usr.loc = locate(ExLandX, ExLandY, ExLandZ)
usr << "You Open the Door and Leave your Home."
if (d =="Lock/Unlock Door")
usr << "You Lock/Unlock Door" // Need to add locking system.
if (d == "Change Welcome Message")
var/c = (input("What Would you like your Welcome Message to be?", "Welcome Message"))
src.WelcomeMessage = c
else if (src.Rented == 1 && src.owner != usr)
usr << "This is Apartment Number [Apartment]."
usr << "The Owner of this Apartment is [src.owner]."
alert("[WelcomeMessage]", "Welcome Message")
turf/ApartmentDoor
var
Locked
RoomNumber
Owner
turf
ApartmentDoor
name = "Apartment Door"
icon = 'Door.dmi'
icon_state = "Closed"
density = 1
Locked = 1
turf
ApartmentDoor
verb
Examine()
set src in view()
set category = "Housing"
usr << "This Apartment is Room #[RoomNumber] and is Owned by [src.Owner]"
Problem description: Trying to Link 2 Markers together so if you rent an apartment its rented in the exterior and interior.