ID:269723
Sep 23 2005, 7:31 am
|
|
Hi im halovader and this is where im gonna put my games on.But how do i make it that if i have an object in my Objects panal.Then i can teleport to the place its defined.Like if u enter somthing.And if you make the teleport.U come to the place its made to do it and the object deletes.The objects come at the objects panal and if u click on the object(right) and click teleport you go there.
|
Sep 23 2005, 7:45 am
|
|
Have the object have variables with the location it should locate you to set and then locate to those variables such as locate(O.(variable for the x),(O.(variable for the y), O.(variable for the z)). And then just del the object when its done.
|
Heh, you just reminded me to make those teleport scrolls, and it worked :-)
obj |
In response to Cheruby
|
|
Cheruby wrote:
Heh, you just reminded me to make those teleport scrolls, and it worked :-) > obj I meant its installed to go as example (1,1,1) |
In response to Big games.inc
|
|
Yeah, try it. It'll show up in the object's menu and the verb is hidden from the verb panel :-)
|
In response to Cheruby
|
|
BTW he cant teleport it.Nothing happens.Only the text comes.
|
In response to Big games.inc
|
|
He dosent want to teleport
obj teleporter var/tmp tel_locx tel_locy tel_locz icon = 'special.dmi' //Don't use this... icon_state = "inn" verb teleport() set category = "teleport" usr << "[src] flashes and wheeeeee!" usr.Move(locate(tel_locx,tel_locy,tel_locz)) Newchar tel_locx = 5 tel_locy = 246 tel_locz = 1 |
In response to Big games.inc
|
|
Big games.inc wrote:
BTW he cant teleport it.Nothing happens.Only the text comes. Then something is incompatible in the code, I only made really simple functions so you can see how it works. If you actually want to have it in your game you also want to make sure there's nothing already on the target turf and there are many many more things to add. But just to make sure the code I gave you actually works, try this in a new environment: mob Just make sure you have something like a 10 x 10 map, and add some icons. |
In response to Big games.inc
|
|
In that case, make sure the usr is really the mob using the scroll, or else you have to make a new mob variable.
EDIT: Actually, if the text comes then using "usr" is fine. EDIT2: I just tried, it's 95% problem with your tel_loc's, tel_locy might be too big for your map? (When that's the case usr won't Move) |
In response to Cheruby
|
|
My map is realy big.But i made it good.He only looks left when i click it.
|
In response to Cheruby
|
|
By the way the object must be deleted when used and object must come back where the player got it
|