I have various "units" that the player can control...I am storing them in the following code;
mob
Unit // Units players can control
MenSoliders
icon = 'mensoldier.dmi'
name = "Men Soldiers"
var
attack = 4
arch = 0
def = 4
moral = 23
move = 4
Wargs
icon = 'warg.dmi'
name="Wargs"
var
attack = 4
arch = 0
def = 2
moral = 26
move = 4
Thanks to some help from JackGuy among others, I am using the following line to call the variables;
for(var/mob/Unit/MenSoliders/MU in Select)
world << "
world << "
world << "
world << "
world << "
This works great! But how can I now call the Wargs for example. In other worlds, is there any way to make the MenSoldiers in the for line a variable that will look for the proper variable clicked.
Whole section of "call up code" follows;
Click(atom/movable/object,location,turf/A)
// if something is selected
if(Select.len)
// give it/them a destination
world << "Selecting [object] at [object.x],[object.y]"
for(var/mob/Unit/U in Select)
U.destination = object
for(var/mob/Unit/MenSoliders/MU in Select)
world << "
world << "
world << "
world << "
world << "
else
if(!isturf(A)) // click in statpanel; T is a string here
usr << "[object]"
return ..()
Thanks again,
Mark
DM is so easy, I am trying to make some things harder than they are :)
Mark