ID:151206
![]() Feb 19 2001, 11:12 am
|
|
How do you make a destination where your player will start?
|
login() Yep. There's another way that avoids having to hard-code the coordinate. You just have to set the <code>tag</code> of the starting square to something like "start". Then you can do this: mob/Login() loc = locate("start") |
mob/Hero
icon='player.dmi' density=1 login(new) src.loc = locate(2,2,3) When I type that in I get error..... Code.dm:28:error:src.loc:bad var |
On 2/19/01 6:57 pm Shane wrote:
mob/Hero I think the problem is that you have to make sure Login is indented properly under mob/Hero. Try this: mob/Hero //icon and density stuff here, then... Login() src.loc = locate(2, 2, 3) Also, be sure your Login starts with a capital L. This is the built-in proc that you're customizing. (For more info see the Reference. There's also a great tutorial about connecting to a world in the Tutorials section of the DM InfoCenter.) Good luck! |
On 2/19/01 7:52 pm Shane wrote:
mob/Hero It looks like you still don't have Login() indented properly. Remember, Login isn't a global proc; it belongs to mob/Hero. So it should be indented to the same depth as the var declarations above it. Like this: mob/Hero |
but now my game is black :*( Yes. Probably there is no such location as the coordinate that you specified. In that case, it dumps the player to the null location, which will give you an empty map. |
You might want to try making it (2,2,1)
That 3 might be doing it, whenever I play, I put a 1 there at it works, I dunno, just worth a try ;) but now my game is black :*( |
On 2/19/01 8:19 pm Shane wrote:
NO ERRORS!! W00T!! Read the coordinates: 2,2,3 That is, X:2, Y:2, Z:3 So if you don't have a third Z level, it will give you a black screen. The map is still there, but you passed the edge of it, which puts you in null location (as Dan said). |
I think i almost have it but i still get...
Code.dm:28: Inconsistent indentation. Code: mob/Hero icon='player.dmi' density=1 Login() src.loc = locate(X:2,Y:2,Z:3) |
I think i almost have it but i still get...
Code.dm:28: Inconsistent indentation. Code: mob/Hero icon='player.dmi' density=1 Login() src.loc = locate(X:2,Y:2,Z:3) |
On 2/20/01 5:16 pm Shane wrote:
I think i almost have it but i still get...Which line is 28? That would help, check over all the code and make sure an extra space didn't lurk into there. If that's not the case, try putting the src.loc = line right under the Login() line, I don't have the computer that I use to run BYOND on right now so I can't check my own code on that... Gilser |
login()
src.loc = locate(x,y,z)
under the mob that should be located.