How do i make a var equal a certain mob. Like i want the var test to equal /mob/orange but:
test = /mob/orange
doesnt work...Please help! Thanks in advance!
-Crio
ID:175953
![]() Feb 24 2003, 1:21 pm
|
|
is thats what its supposed to be it doesnt work... i get the error:
main.dm:12:error:= :expected a constant expression Im trying to make it so the game flicks an icon on the orange all the coding: mob var test = locate(/mob/orange) verb Orange() flick("orange_eat",test) |
Your problem is that something set at runtime (mob/var/X = whatever) must be constant. Which means no variables, no procs. What you want is something more along the lines of:
mob However, that will select the first orange in the world.contents list. If you want every mob/orange to flick, then use this: mob |
It does work, if you want test to equal a type path. If you want it to equal a mob, then you have to pick which mob you want it to be. Use locate() or for(), or something along those lines.
Lummox JR