ID:142280
 
On my pokemon game i tried making a building so i made it then at the door i put House1_enter and then i made the inside and at the exit i out House1_exit and when i tested it i was just taken to a black part. I am not sure what is happening.
Firstly, this is a Code Problems question (you should probably have posted the code). Don't move it now though, as a mod will get to it.

The location you specified doesn't exist. Here is an implementation that will work well.
turf
//This is used to relocate and entering mob to the
//specified tag. I'll describe the tag variable below.
var/location_tag = null

Entered(mob/m)
//This searched for the turf in the world with the
//tag variable you specified.
var/turf/t = location_tag && locate(location_tag)

if(t && istype(t))
//If t exists and it's a turf, relocate the
//mob there.
m.loc = t

The tag variable is a var that is given to all atoms. You can use the locate() proc to find an /atom with a given tag. To set the tag, use the instance editor in Dream Maker's map editor. To do that, you right-click on an object and choose the "Edit Instance..." option.
In response to Popisfizzy
the code doesn't work.
In response to Rayquaza1903
You didn't do any of the following, did you:
  • Copy and paste the code and expect it to work.
  • Actually type the code, but failed to read anything else to figure out how the code actually works.
  • Failed to apply the tag to both the location you're transporting to and the location_tag variable.
In response to Popisfizzy
well sorry. I am new at this.

Can you tell me which parts i edit?
In response to Rayquaza1903
None. Read the last line in my original post for instructions on how to use this code. An addendum: do the same thing for the locate_tag variable for the object you want to move from.
In response to Popisfizzy
I have no clue what to do with that code. i cant understand what your talking about.
In response to Rayquaza1903
1) Type the code into a file in Dream Maker.
2) Compile. If there are no errors, than you're good.
3) Use the instance editor, which I told you about in the other post, to set it up the way you want.
4) Ta da! You're finished.

If you don't understand any of what I'm saying, then you need to read the DM Guide.
In response to Popisfizzy
Popisfizzy wrote:
If you don't understand any of what I'm saying, then you need to read the DM Guide.

In truth, he'd need to read something more for complete beginners like Zilal's tutorials. :\
In response to Popisfizzy
I did that and compiled and there are 3 errors.

turf.dm:2529: Inconsistent indentation
turf.dm:2530: Inconsistent indentation
turf.dm:2531: Inconsistent indentation
In response to Kaioken
i did read the tutorial.
In response to Rayquaza1903
The ZBT's cover indentation. Read again, then.
Also, no matter the case anyway, after the ZBT's, on to the DM Guide, like Pop said. Read the article I linked to.
In response to Kaioken
the code indents seem perfect
In response to Rayquaza1903
But it is not, because it is inconsistent, like the error says. To fix it, your best bet is to NOT copy code from the forums but write it on your own, or de-indent that whole block of code and re-indent it properly on your own.
In response to Kaioken
i did that and no errors. so i went to the map editor and i right clicked on the turf thingy or whatever and it didnt have the edit instance option. It had New Instance, Find Instance on, generate instance from. icon-states, and generate instances from directions. now wat did i do wrong?
In response to Rayquaza1903
Do more experimenting and attempts before posting. Here, I'll make it foolproof for you.
1) You're supposed to click on an existing spot on the map itself.
2) At the bottom of the right-click context menu, you'll have all the atom types that are on that tile. Select the one of them that you wish to edit.
3)The additional menu will have options to Delete or Edit vars of that specific, individual object instance.
In response to Kaioken
there is no context menu.
In response to Rayquaza1903
In response to Rayquaza1903
Sheesh, pay attention to all points and posts addressed at you. [link] [link]
In response to Popisfizzy
i dont get what the tag is though.
Page: 1 2