no probs
yeah c_scan will return the closest object to the player as the 'you' pointer
from the manual
c_scan (VECTOR* pos, ANGLE* ang, VECTOR* sector, var mode);
pos scan origin.
ang scan direction Euler angle.
sector.x horizontal scan sector, or scan cone width in degrees (360 for a full sphere)
sector.y vertical scan sector in degrees, or 0 for a circular scan cone.
sector.z scan range in quants.
using defines will tidy up your code and make it a lot more understandable to yourself and the reader
e.g.
if(your.skill31 > 0){
if(your.skill32 > 30){
if(your.skill33 == 0){
reload();
}else{
shoot();
}
}
}
could be written as
#define health skill31
#define energy skill32
#define bullets skill33
if(your.health > 0){
if(your.energy > 30){
if(your.bullets == 0){
reload();
}else{
shoot();
}
}
}
now makes much more sense
giving everything in the level a class will let the player know instantly what he's found, though you could use things like
EVENT_SCANhope this helps a bit more
experiment, create, play, what's the worst that could happen
