I tried
...proc/do_thing
var = <object path>
...proc/do_another
var.loc = locate(usr)
But it's like: "Cannot modify /obj/item/booster/exp_boost_bottle.loc"
What should i do, except quitting dm, pals?
ID:2080015
![]() May 5 2016, 2:35 pm
|
|
How can i implement a reward-chest using .loc?
I tried ...proc/do_thing But it's like: "Cannot modify /obj/item/booster/exp_boost_bottle.loc" What should i do, except quitting dm, pals? |
![]() May 5 2016, 2:39 pm
|
|
Sounds like you're trying to modify a type's loc. Create the object, then set it's location.
|
Like
var/chest/booster/item = new/obj/item/booster/exp_boost_bottle ? |
item.loc = locate(usr) The above amounts to:
item.loc = locate(usr.type) in world
I don't recommend this. At the least, you could set loc directly to the container (mob or whoever). However, if you wanted to use locate(), a proper way would be using a tag to locate said container. |