2018-07-21 01:59:31

so i have a map, with a base tile, at 0 to 100 0 0 0 0, and i want to make it so if i press c i can here coords? i also want to know how to make it so i can't walk passed the borders of the map, as well as the cintacts for spawning things for a map, i know spawn_tile, but what else is there?

----------
“Yes, sir. I am attempting to fill a silent moment with non-relevant conversation.”
“You don’t tell me how to behave; you’re not my mother!”
“Could you please continue the petty bickering? I find it most intriguing.” – Data (Star Trek: The Next Generation)

2018-07-21 06:48:35

The thing is, that's not enough information to answer the questions smile
For example, how are you storing the player's coordinates? Do you have variables x and y, or is there a player class, and the coordinates are properties of the class?

Once you know that, getting coordinates is pretty straight forward, since you can say something like speech.speak("At coordinates " + x + ", " + y + ".");, or use an alert if that's what you're using for output.

As for staying in bounds... take a look at the chapter on ifs and conditionals again, since that should make it more apparent.

看過來!
"If you want utopia but reality gives you Lovecraft, you don't give up, you carve your utopia out of the corpses of dead gods."
MaxAngor wrote:
    George... Don't do that.

2018-07-21 08:55:52

First, The function spawn_tile isn't something that comes with bgt. It is probably a part of an include. All of those, Tiles, walls, etc are depending on the map handling system you coded for your game. Coordinates can be vectors, ints, doubles, etc and as c a e jones said they might be the propertis of that class. Although I believe if you read manual and have understood it clearly, calling a variable in any from shouldn't be a big deal

---
Co-founder of Sonorous Arts.
Check out Sonorous Arts on github: https://github.com/sonorous-arts/
my Discord: kianoosh.shakeri2#2988

2018-07-21 09:06:48

you would have to say:
if(key_pressed(KEY_C))
{
speak(me.x+" "+me.y+" "+me.z);
}
that should work if you have a vector with the name me and you use that for the positioning of your player or what ever

best regards
never give up on what ever you are doing.

2018-07-21 14:18:01

We run into the issue though if someone trying to code beyond their meant. Don't use public classes until you can write your own, etc. Write anything that you ca, even if its something stupidly small, but entirely your own code. You're trying to cut corners by using all these includes, which really do cut some of the crap out of coding, but you have to know what's going on under the hood before you use these classes.

Facts with Tom MacDonald, Adam Calhoun, and Dax
End racism
End division
Become united

2018-07-22 03:08:56

@4, you need a speak function before you can go using that. Assuming he's not using any other includes, that will need to be defined.

2018-07-30 04:05:17 (edited by dash 2018-07-30 04:05:33)

If you want i can upload example code of map and localistaion.

Mao!
--
TD programs website available under new address.
https://tdprograms.ovh/

2018-07-30 14:00:45

hi fox
about the  coords? , you can use like this code that i use if you did the x, y and z
if(key_pressed(KEY_C))
{
v.say(me.x+", "+me.y+", "+me.z);
}

this is as far  i know

And as anyone who's gone mountain climbing knows ,The serene snow-covered peaks that look so tranquil from a bdistance, Are the deadliest
sound is my vision
i rarely check my private messages on the forum, so if you want to contact me please use my email, or dm me  at oussama40121 on tw