ID:179731
 
okies, i got a dilema yet again. I want the Ic talk to be like 5 spaces within the mob only. something like that. My code goes like this:
mob
verb
ic(msg as text)
world << "[usr]: [msg]"

im thinking you gotta put something like (src,5) somewhere because i saw it in a seperate forum about superheroes and distances on the map. Please help me out.
look up view() and range() procs in the reference.

And, consider reading the ZBT tutorail, if you already have, read it again because you're missing something.
In response to GateGuardian
oh just give him the stupid code:

ic(msg as text)
view(5) << "[usr]: [msg]"




view() is everyone is view.. oview is everyone execpt you in view (i think)
In response to Rcet
Well when people ask questions that are answered right away in the first tutorial they should ever read, it makes me think they aren't researching the information like they're supposed to, which means they'll have more dumb questions later, and most people don't like to spend time answering dumb questions, we'd rather do something useful.
In response to GateGuardian
I've been giving out alot of code lately, because I've been bored.
In response to Nadrew
Another good reason to look up information in the references is that you won't be boggled when someone gives you code that doesn't work right.
In response to GateGuardian
we did look up in the rescources we found it, but its not explainable. I work on examples. I NEED examples. The resources do not give these. This is why i come here. when i get a code, i understand it. Its better than the stupid resource because they dont tell you how to set it up right. You have to figure that out. And with all the lines of code in the game, how CAN you figure it out.
In response to Selderan
with reasoning

declare a new mob type of /mob/char, and define a variable within it called hp. Set hp's intial value to 20.

all of that is the same as

mob
char
var
hp = 20

creating code from instruction is quite simple if you ask me.

FIREking
In response to Selderan
Selderan wrote:
we did look up in the rescources we found it, but its not explainable. I work on examples. I NEED examples. The resources do not give these. This is why i come here. when i get a code, i understand it. Its better than the stupid resource because they dont tell you how to set it up right. You have to figure that out. And with all the lines of code in the game, how CAN you figure it out.

Sigh, again you proove you havent looked. Here is a snippet from view() in the Reference:

Format:
view(Dist=5,Center=usr)
Returns:
A list of visible objects within Dist tiles of Center.

If that doesnt explain it, the EXAMPLES below should(Which are as well a snippet from that same proc right below it...)

Example:
view() << "to all in sight of [usr]"
view(src) << "to all in sight of [src]"
view(1,src) << "to all within reach of [src]"

And if that doesnt explain it, well, then you need to go back and understand the core elements of OOL(Object Oriented Language).

Alathon
In response to Selderan
Selderan wrote:
we did look up in the rescources we found it, but its not explainable. I work on examples. I NEED examples. The resources do not give these.

Quoted directly from the refernce entry on view():
Example:
view() << "to all in sight of [usr]"
view(src) << "to all in sight of [src]"
view(1,src) << "to all within reach of [src]"

Looks like there are examples to me.
In response to FIREking
FIREking wrote:
with reasoning

declare a new mob type of /mob/char, and define a variable within it called hp. Set hp's intial value to 20.

all of that is the same as

mob
char
var
hp = 20

creating code from instruction is quite simple if you ask me.

FIREking

Hp?? I already knew how to that...
In response to Selderan
Selderan wrote:
FIREking wrote:
with reasoning

<font color = red>declare a new mob type of /mob/char, and define a variable within it called hp. Set hp's intial value to 20.</font>

all of that is the same as

mob
char
var
hp = 20

<font color = red>creating code from instruction is quite simple if you ask me.</font>

FIREking

Hp?? I already knew how to that...

You missed the entire point of that apparently. Just for convenience I highlited the important parts.

It would help you, as well as us(We would not spend as much time answering questions that are already answered) if you would just read the information that is already given to you. The Reference, the guide, the Demos, the Libraries, the Tutorials all have incredibly helpful information, and it is ONLY when you cannot find anything within those resources that you should post here.

Alathon
In response to Selderan
i was pointing out how to code from sentences.......
i didnt want you to look at the code, i wanted you to look at the code compared to the sentence i wrote so you can figure out how to write code from sentences.
as alathon has pointed out.

FIREking