Hello everybody,
since I might be able to get hold of an A6 commercial edition soon to replace my very old A4 I downloaded the A6 Trial version to do some tests. At the moment I'm trying to convert a project to A6 code. Well, replacing the old with the new syntax does not seem to be enough. Although it was enough to get the game running I'm encountering numerous errors. I'll just list some errors (some including code) and hope someone can make sense of it.
1) Error in the beginning: "Can't find file <[]>", where the [] is an actual "character missing" square. Could not yet figure out which file is meant.
2) Since I replaced
trace with
c_trace the feet of player and enemy models are stuck in the ground (no impact on movement though). Worked fine with the original trace, even in A6.
3) I created a crosshair effect, rather a laser pointer, meaning a red dot which appears on every surface the player is aiming at. I first let the player model create an entity:
ent_create(particle_map, gun_muzzle, crosshair); The entity is then driven by the following function:
Code:
function crosshair {
MY.OVERLAY = ON;
MY.PASSABLE = ON;
MY.FACING = ON;
MY.TRANSPARENT = ON;
my.scale_x = 2;
my.scale_y = 2;
my.scale_z = 2;
while (player.skill20 > 0) {
if (shooting_pose == 0)
{MY.INVISIBLE = OFF;}
else
{MY.INVISIBLE = ON; }
vec_set(gun_target, gun_muzzle);
gun_target.x += 10000; // the weapon has a firing range of up to 10,000 quants
vec_rotate(gun_target, pistol.pan);
vec_add(gun_target, pistol.x);
c_trace(gun_muzzle,gun_target,ignore_passable|ignore_me);
my.x = target.x;
my.y = target.y;
my.z = target.z;
wait(1);
}
}
Unfortunately, no matter what I tried to change, the crosshair does not show up. Nowhere. I used similar code for bullet holes and blood splats and they too, do not show up.
4) Some sounds don't play or don't stop when they should, etc. (even though I do believe I set the right snd_stop) and there was an error in the action for the gun. When I removed the shooting sound it worked again. Very weird indeed.
Well that should be it for now. I hope someone has some ideas. It's not even so much about A4/A6 compatibility, since I just do not understand why some of the code does not work. It should work the same under A6.
Thanks in advance!