ID:178228
 
I am trying to make a mob that is seeable by only the usr that is fighting it. Same for any other user in battle too. Ok i have a battle field where all players fight but are invisable to each other the only thing is i need the mobs there fighting to act the same way except only visible to the player doing battle with it.
Just move the mob and the player fighting to a place where no one else can see.
You need the image() proc.

When you move the mob to the battlefield, create an image of it's icon on top of it, send the image to the mob who can see it, and set the monster's icon to null.
In response to Shadowdarke
How using image() can you make the player see it and others around dont.
In response to Dekuh
I told you, "when you move the mob to the battlefield, create an image of its icon on top of it, send the image to the mob who can see it, and set the monster's icon to null."
In response to Shadowdarke
you could also use the invisibilty() because its from 1-100 so you could change their invisibility to like 5 when everyone else is 1, and then after the battle set it back to 1. you're going to have to use this... so you can see yourself in the battle. the example below makes you invisible to other people, and you can see yourself. (by the way you are going to have to give monsters that invisibility also)

invisibility = 5
usr.sight |= SEE_SELF


~Aleis~
In response to Aleis
Aleis wrote:
you could also use the invisibilty() because its from 1-100 so you could change their invisibility to like 5 when everyone else is 1, and then after the battle set it back to 1. you're going to have to use this... so you can see yourself in the battle. the example below makes you invisible to other people, and you can see yourself. (by the way you are going to have to give monsters that invisibility also)

This would work to make one group of monsters invisible to other people, but if you want 3 players in the same space that dan not see each other and can not see the monsters belonging to the other players, you need images instead of invisibility.
In response to Shadowdarke
I see your point shadowdark tried that way and still having problems. Could you show a example of how to use the image proc. There isnt one and i have no idea of how to use it.
In response to Dekuh
when you move the mob to the battlefield, create an image of its icon on top of it:

var/I = image(Monster.icon,Monster,Monster.icon_state,MOB_LAYER,Mons ter.dir)

send the image to the mob who can see it

Player << I

and set the monster's icon to null

Monster.icon = null
In response to Shadowdarke
ok every thing is running well except the other players are still able to strike the mob. Your playing and s_damage comes poping up on your target. When you said Player << I
I use usr and usr.client << I is Player a usable command.
In response to Dekuh
Player was just for use in the example, meaning the mob that you want the monster to be visible to. I don't have your code, so I can't guess what var you are using to indicate the player.

If you use s_damage, it will be visible to everyone in that space, even though they can't see your monsters. You will either have to write your own number floating routine that uses images, or plead with Spuzzum to expand s_damage to do what you what.
In response to Shadowdarke
Ok the image stuffs great but is there a way to make the mob only attackable by the person in battle who can see it.
like how invisibilaty makes a mob undetecable to attacks. Is there a way to make the enemy mob act in the same fashion but be seen and attackable by the usr. Ok once through again all chars are moved to the same area for battle. I have made it that they cant see each other with the invisibile proc but they are able to see them selves. I need this to be done to the mob enemy as well. I have a setup that each character has a random invisable number at start of game. Can i make a mob be on the same invisible scale as the usr. So if two or more battles are happening they and their mob are invisible to the other usr and same for the first usr.
In response to Dekuh
You could generate lists of potential targets when you move them to the battlefield, then only allow them to pick from the list. You won't be able to use veiw() or similar procs, because all combatants are technically in view.

Pseudocode:
Battle starts
determine number of monsters
empty the player's list of monster targets
for(var/loop = 1 to number of monsters)
create a monster
do the stuff to hide it from everyone but the player
make this player the monster's target
add this monster to the player's target list
during battle, the player may only target monsters in their target list
i need to find some way of seeing a mob at a certain lv of invisibility and only at that number. So if the mob is at say invisibility = 20 and you are at an invisibility of 20 i want both mob and usr to see each other. Other mobs at different levels are still invisible to both.
In response to Dekuh
You'll want to use the see_invisible var. If you set see_invisible = 20, then whatever you set it for will be able to see atoms with visibility <= 20.
In response to Dekuh
Invisibility is not suited for what you are trying to do. If you can see the monsters with invisibility 20, you will also see monsters with invisibility set from 0 to 19.

Considering the degree of difficulty you are having with this, perhaps you should consider the much easier method of having multiple battlefields and not worrying with all these visibility and image issues.

You could try a client.screen based system, but that is still much harder than a multiple battle map system.
In response to Shadowdarke
How would you go about seting or using this. This sounds like a usable plan can you show me an example of using this.