ID:172800
Mar 25 2004, 4:37 pm
|
|
For my new ff7 game I have chocobos that you can buy, but then I thought why not let the player buy chocobo stables as well. All that I need that I can't seem to code would be: How do you code it to when you talk to someone your key name is assigned to a turf called "stable". There will be a lot of the same turf around so how would you get it to be assigned to one that doesnt already have someones key name on it. And then how could you get an object(the chocobo) to be teleported to your stable by using a verb?
|
In response to Loduwijk
|
|
I couldn't get that to work but how would you get just to have your name assigned to a turf when you talk to it and then how would you get mob/NPC/chocobo that your key name is assigned to be teleported to the turf with your name. And a code I can put in my chocobo code under the "Talk" verb that would assign your key name to it.
|
You will want a way to claim a stable as well (obviously). For this example I will use a simple claiming verb.
You will also want someones stable variable to be reset when they enter back into the world, the variable will not stay referencing the turf indefinately. That is where the stable_loc variable comes into play. To get the stable turf, you will need to get ahold of the coordinates in the stable_loc.
When you want to put the animal back, just move it.
If you want to dissalow others from entering the stable, then just do it in the stable's Enter().