ID:167864
 
Is ther a way to make certain types of mobs only appear visible to some players, until those players reach a certain level? I appreciate any help. =)
I have been thinking about this for a while and the answer is yes! The only problem is it’s very complicated. What you need to do is create a mob and set it to invisible then you want to output in on the client screen only. You will have to workout some calculations so as to put it somewhere on the clients screen and change its positions as the client moves. And you will also have to code in the collisions for each mob as well as to alter the combat system of this type of mob. Hope this is usefull

www.riddlersoft.com
In response to The Riddler
Hmm, well I think all you would have to do is set the invisibility of each monster exc, and the visibility of a mob.
You could use image objects. My example will assume this is some type of tutorial system.
var/list/tutors[0]
var/tutorial_conclusion = 5 //highest level at which they will still see tutors
mob/tutor
var/image/I
New()
tutors += src
I = new(icon, src, icon_state)
icon = null; icon_state = null

mob/player
New()
if(level <= tutorial_conclusion)
for(var/mob/tutor/tutor in tutors)
src << tutor.I

In the part of your code where you gain levels, directly after it check to see if they have passed the tutorial_conclusion level. If they have, loop through all tutors again and remove their I from the mob's client's list of images.

Also, if you cannot see them I assume you do not want them to be factored into your movement. It would be odd to bump into something that does not exist for you. Therefor, you might want to alter the movement functions slightly if you want to be able to walk on those you cannot see as if they were not there.
atom/Enter(atom/movable/A)
var/mob/M
if(ismob(A)) M = A
.=..()
if(!. && M && M.level>tutorial_conclusion)
//if entering is denied, but possibly because of an ignored tutor
//let's find out if it was because of a tutor
var/allow = 1
var/list/to_check = contents+src
if(isturf(src)) to_check += loc
for(var/atom/blockage in to_check)
if(istype(blockage, /mob/tutor) continue //tutors don't count for this
if(blockage.density)
allow = 0
break
if(allow) //if it found nothing besides tutors
.=1
In response to ADT_CLONE
I can think of 2 ways. The simple one is with invisibility and see_invisible vars. The more powerful way of doing this is making every mob invisible and using the image() proc

Exemple :
mob
var
list/image/SeenMobs=list() //List of mob images
SeeMe=0 as num //Can this mob be seen? You can use a procedure for more complexe figuring out.

proc/CheckOtherMobs()
while(src&&src.client) //Only check if the mob is a player, otherwise whats the point?
var/tmp/image/NewImage
for(var/image/I in SeenMobs) //Clear the previews mobs from the screen
del(I)

for(var/mob/M in view(5,src))
if(M.SeeMe||M==src) //If you can see the mob, or the mob is the player himself
NewImage=image(M.icon,M.loc,M.icon_state,M.layer,M.dir) //then make a new image of the mob
src<<NewImage //and show it to the player.
sleep(5) //Wait half a second before checking again

New()
spawn(5) CheckOtherMobs //Start the mob seeing procedure
..()