ID:163953
 
How do i start an objects proc in a verb.

Ex:
obj
level1
icon = null
name=""
New()
spawn(rand(100,150)) Enemies()
..()
proc
Enemies()
for(var/mob/M)
switch(rand(1,1))
if(1)
new/mob/monsters/P/slimer(src.loc)
sleep(200)
Enemies()



How do i execute that by a verb?

-Genjura
There may be an easier way that this, just messed around until I didn't have any compiler errors.

obj
level1
icon = null
name=""
New()
spawn(rand(100,150)) Enemies()
..()
proc
Enemies()
for(var/mob/M)
switch(rand(1,1))
if(1)
new/mob/monsters/P/slimer(src.loc)
sleep(200)
Enemies()
mob
verb
doEnemies()
var/obj/level1/O
O.Enemies()



*edit*

Noticing that the Enemies proc has something spawn on the object's location, it would need to be...

for(var/obj/level1/O in world)
O.Enemies()
In response to Rifthaven
Thx but i got it.