ID:178690
 
sry but i have no clue how to code very well.....
i need to make a warp that qill warp from 2 coordinates on the same map.....
Aleis wrote:
sry but i have no clue how to code very well.....
i need to make a warp that qill warp from 2 coordinates on the same map.....

Try this:

turf
warp
icon = 'warp.dmi'
icon_state = "warp"
Entered()
usr.x = 50 //Teleports mob to the co-ordinates of X:50
usr.y = 37 //Teleports mob to the co-ordinates of Y:37
usr.z = 1 //Teleports mob to the co-ordinates of Z:1


Lee
In response to Mellifluous
Never ever use usr in Entered(). This is wrong, wrong, wrong, wrong.

Always take the argument from Entered(); that's the atom that entered, which may not be the same as usr.

Lummox JR
In response to Lummox JR
Oh sorry :-\

I have always used usr in Entered() and its worked all the time. So if thats wrong how would I go about it another way then Lummox?

Lee
In response to Mellifluous
Mellifluous wrote:
Oh sorry :-\

I have always used usr in Entered() and its worked all the time. So if thats wrong how would I go about it another way then Lummox?
turf
Entered(atom/movable/A)
A.loc=otherloc

That's the dirt-simplest approach, anyway.

The rule of thumb with usr is to never use it outside of a verb (or click/mousedown/etc.) unless you're absolutely sure you know what you're doing with it.

Lummox JR
In response to Lummox JR
Lummox JR wrote:
Mellifluous wrote:
Oh sorry :-\

I have always used usr in Entered() and its worked all the time. So if thats wrong how would I go about it another way then Lummox?
turf
> Entered(atom/movable/A)
> A.loc=otherloc

That's the dirt-simplest approach, anyway.

The rule of thumb with usr is to never use it outside of a verb (or click/mousedown/etc.) unless you're absolutely sure you know what you're doing with it.

Lummox JR

Ok, thanks very much Lummox :)

Lee