The missing semicolon was (I'm 99.99% sure) a matter only of my opening post. But I'll try it again all the same. Ultimately my final error messages were complaining that no such property existed, and I had to wonder if it was because I was accessing the property on the same Actor that had defined it. I might post the original code here...
EDIT: Okay, interesting... VM is crying out: "Self pointer used in ambiguous context"
Code: Select all
class SensoryMonster : Actor
{
double sight_max_dist, sight_light_mult, sight_mult, hear_max_dist,
hear_mult, sight_fov;
double aware;
property Awareness : aware;
property Vision : sight_mult, sight_light_mult, sight_max_dist;
property Hearing : hear_mult, hear_max_dist;
property FoV : sight_fov;
default
{
SensoryMonster.Awareness 0.0;
SensoryMonster.Vision 1.0, 1.0, 8192.0;
SensoryMonster.Hearing 1.0, 8192.0;
SensoryMonster.FoV 150.0;
}
action state A_Sense(StateLabel detected)
{
LookExParams see_params;
see_params.FoV = sight_fov; //Problem starts here apparently
see_params.minDist = 0;
see_params.maxDist = sight_max_dist;
see_params.maxHeardist = hear_max_dist;
see_params.flags = LOF_NOSOUNDCHECK|LOF_NOSEESOUND|LOF_NOJUMP;
see_params.seestate = null;
LookExParams hear_params;
hear_params.Fov = sight_fov;
hear_params.minDist = 0;
hear_params.maxDist = sight_max_dist;
hear_params.maxHeardist = hear_max_dist;
hear_params.flags = LOF_NOSIGHTCHECK|LOF_NOSEESOUND|LOF_NOJUMP;
hear_params.seestate = null;
let see_check = LookForEnemies(false, see_params);
let hear_check = LookForEnemies(false, hear_params);
if (see_check)
{
aware += sight_mult;
return ResolveState(detected);
}
if (hear_check)
{
aware += hear_mult;
return ResolveState(detected);
}
return ResolveState(null);
}
}
That error spews out 10 times starting with the commented line above and continuing for every reference to a local variable declared in the SensoryMonster class. I think I've done something maybe unrelated to properties after all; sorry about that. Still confused and in need of an explanation though. Can I not define an action within a class so that it has access to its local variables?
EDIT 2: A quick search has informed me that I need to be using "
invoker.localvar" to access these. I'll pop back in if somehow that doesn't fix it, but I bet that'll do it.
EDIT 3: Yeah, that fixed it. I mean, I completely broke the ZombieMan now, but that's my business. At least I may continue coding. Thanks.