well im having some problems with this system. i want to make it so when u hit the verb u pick an obj then u can move it but it can move it?
client/obj
North()
if(src.mob.Moveobj!=null)
step(src.mob.Moveobj,North)
return
..()
client/obj
South()
if(src.mob.Moveobj!=null)
step(src.mob.Moveobj,South)
return
..()
client/obj
East()
if(src.mob.Moveobj!=null)
step(src.mob.Moveobj,East)
return
..()
client/obj
West()
if(src.mob.Moveobj!=null)
step(src.mob.Moveobj,West)
return
..()
mob/verb
Telekavorka(obj/O in view())
usr.Moveobj= O
O.Move()
mob/var/obj/Moveobj
any1 have ideas?
ID:167971
Jan 2 2006, 9:21 am
|
|
In response to Killer22
|
|
could u give me more detail on mousedrag?
|
In response to Hobowantdollar
|
|
In response to Detnom
|
|
n e other ideas than mousedrag?
|
In response to Hobowantdollar
|
|
What about clicking on the object to set it as the target, then click the new location to place it there?
Seems like you wouldn't even need or want verbs. tsfreaks |
In response to Tsfreaks
|
|
how would i do this like?
obj/Click() |
In response to Hobowantdollar
|
|
Try this:
mob/var/obj/moveobj This is untested, so... whatever. Double click what you want to move, then click where you want to move it to. |
In response to HM Geek
|
|
nope it doesnt work
|
In response to Hobowantdollar
|
|
I put together a quick demo. I'm a novice coder so I'm sure it's not perfect but it does work. You will have to draw your own images and map. Perhaps it could be submitted as a demo. I'd like to get feedback from more experienced DM'ers before submitting though. It would need to be commented for sure.
Images required in the test.dmi. Each must be named 1. water (turf) 2. grass (turf) 3. player (mob) 4. bucket_empty (obj) 5. bucket_filled (obj) 6. target (obj) The target is the image that highlights the target you have selected. It can be anything you want. Example: [ ]. DM Create one dm file Copy and paste the following code into it. Build it. Map Create a standard map at 10x10x1 Fill it with grass Add some water (at least 1 turfs worth) Place a bucket ot two on it. Run it 1. Click a bucket to select it. Then click on the grass to move it. 2. Click on the water to select it. Then click the bucket to fill it. 3. With the bucket filled, select it. Then click the grass to move the filled bucket. Hope this helps more than hurts. :) [EDIT: Fixed some indentation problems after copy and paste to forum.] tsfreaks var |
In response to Hobowantdollar
|
|
Hobowantdollar wrote:
nope it doesnt work What was wrong with it? Just out of curiosity... |
and for telekinesis, try using MouseDrag, you can make it move with your mouse! it would be something like this
obj
MouseDrag(src_location)
src.loc=src_location