Im trying to make a code That when u click on turfs,Obj or Mobs In sight You get tleported to them BUT you leave an after image Of your self for a split seconde How would i do that?
Thanks In advance
ID:268130
![]() Mar 20 2004, 6:03 pm
|
|
![]() Mar 20 2004, 6:44 pm
|
|
show us what you tried and we might be able to help more
|
here's the code for click to an teleport and ur there lol here:
world mob = /mob/PC name = "Multi Click Demo" mob PC icon = 'PC.dmi' Login() src.loc = locate(1,1,1) alert("Click On The Tree, Bob, And The Teleporter") bob density = 1 icon = 'bob.dmi' Click()//Define The Click Inside What Your Using It For, Not With Cleint.click usr<<"That Tickels"//When You Click bob, The Person That Clicked Him Gets The Message "That Tickels" obj teleporter icon = 'tele.dmi' Click()//We'll Use This One As A Click Teleporter usr<<"You Teleport Back To Start" usr.loc = locate(1,1,1)//When They Click It, It Takes Them Back To Start turf tree icon = 'tree.dmi' Click()//same here, if you define click inside the atom instead of inside the client, you can use it multiple times! usr<<"Some Apples Fall Down" grass icon = 'grass.dmi' Click() usr<<"Yes, It's Grass," just add the turfs and no error's |
Goddz wrote:
here's the code for click to an teleport and ur there lol here: 1. Use DM tags. 2. Tell them the link to Demo instead of claiming it as your own. --SSJ4_Gohan_Majin |
WTF no What ever they Double click on The teleport to it i figured out the restbut i need now with click teleport If i DB click Example a bush,sign,tree,or mob i would go to it
|
Dranzer_Solo wrote:
WTF no What ever they Double click on The teleport to it i figured out the restbut i need now with click teleport If i DB click Example a bush,sign,tree,or mob i would go to it All you need to do is code the object, and write the DblClick() proc. obj --SSJ4_Gohan_Majin |
WTF NO NO NO NO i dobnt want if i clik on Thses special objects to take me to spawn points i want if i see grasss or a tiel or a tree In the middle of the screen and i click it i go their I dont want to have to set eachand every loc for each obj
|
What you need to do is override the DblClick() procedure for whatever you want to be able to teleport to.
For example: obj With turfs, it's slightly different, because turfs are located inside areas. In that case, just set usr's location to the turf(src) itself. To leave an "afterimage" of yourself, before actually relocating usr, create a dummy mob where he used to be, and either sleep() in the dummy mob's new code before having it delete itself, or spawn() out code in the DblClick that deletes the dummy mob. |