ID:2298157
 
(See the best response by Ter13.)
Code:
mob/var/mob/cell/observedcell

mob/cell
var/list/genome=list()

obj/particles
Gene
icon='img/mobs.dmi'
icon_state="dna"
var/sequence

verb/AnalyzeWindow()
set name="Analyze gene"
set src in world.contents
usr << src.sequence


Problem description:

A little background: As a biochemistry student, I thought it would be cool to make a somewhat more realistic, though minimalized evolution simulator, limited at the unicellular stage (because games like Spore don't cut it for me).

So, I have this mob that is a cell, which contains a number of obj (genes) that are listed in mob/cell/genome. The player himself is mob/observer and can go from cell to cell (which stores the cell in the observedcell var for easy access) checking the genes that are in the genes are sent to a grid in the interface. This of course is only to get a quick sight of what genes are in the cell. Here comes the bit that I have a problem with:

I am trying to access a verb from the genes, obj/particles/Gene/verb/AnalyzeWindow() by rightclicking on it in the grid, but it doesn't work. I thought since world.contents should hold everything, it might aswell hold the genes no matter in what cell they are, but I guess I'm mistaken and the src in settings are limited to usr and usr.contents if I understood correctly.


Besides, anyone else having problem with the search feature on the forums giving Gateway Time-outs?
Best response
Make sure "send right-clicks to mouse procs" is not checked in the grid element on your interface.
It works, thanks mate. Sorry for the somewhat newbie question.
Sorry for the somewhat newbie question.

It's never a problem.