I followed every direction but 1, 2, 3, and 4.
Just to be clear, everything works fine, except the glitch is there.
I've changed stuff since the demo, but it still does it in the newer version I'm working on. Here's the spawn code from the demo.
Code:
action spawn_zombie(){
my.invisible = on;
my.passable = on;
while(1){
if (player == null){
wait(1);
}
else{
if(zombie_numb < maxzombies && esc_menu_up == false){
ifndef disable_enemy;
ent_create(zombie_mdl, my.x, zombie_act);
endif;
zombie_numb += 1;
sleep(zombie_spawn_delay_esy);
}
}
wait(1);
}
}
And here's the zombie code, with the arm's and head's code as well.
Code:
action zombie_left{
my.enable_entity = on;
my.push = 2;
my.what_i_am = profzombie;
my.health = max_health;
while(my.health > 75){
wait(1);
}
my.health = 0;
my.animation = 0;
my.passable = on;
while(my.animation < 100){
if(esc_menu_up == false){
ent_animate(me, "dieA", my.animation,null);
my.animation += 1;
}
wait(1);
}
my.transparent = on;
my.alpha = 100;
while(my.alpha > 0){
my.alpha -= 1;
wait(1);
}
ent_remove(me);
}
action zombie_right{
my.enable_entity = on;
my.push = 2;
my.what_i_am = profzombie;
my.health = max_health;
while(my.health > 75){
wait(1);
}
my.health = 0;
my.animation = 0;
my.passable = on;
while(my.animation < 100){
if(esc_menu_up == false){
ent_animate(me, "dieA", my.animation,null);
my.animation += 1;
}
wait(1);
}
my.transparent = on;
my.alpha = 100;
while(my.alpha > 0){
my.alpha -= 1;
wait(1);
}
ent_remove(me);
}
action zombie_head{
my.enable_entity = on;
my.push = 2;
my.what_i_am = profzombie;
my.health = max_health;
//my.pan += 180;
while(my.health > 75){
wait(1);
}
my.health = 20;
my.animation = 0;
my.passable = on;
while(my.animation < 100){
if(esc_menu_up == false){
ent_animate(me, "dieA", my.animation, null);
my.animation += 1;
}
wait(1);
}
my.transparent = on;
my.alpha = 100;
while(my.alpha > 0){
my.alpha -= 1;
wait(1);
}
ent_remove(me);
}
function random_ehh();
action zombie_act
{
var oldvec[3];
var foundpath = 0;
var animationpercent;
my.push = 3;
my.health = max_health;
my.what_i_am = profzombie;
my.enable_impact = on;
my.enable_entity = on;
ptrtempent = ent_create(zombieleft, my.x, zombie_left);
my.partlarm = handle(ptrtempent);
ptrtempent = ent_create(zombieright, my.x, zombie_right);
my.partrarm = handle(ptrtempent);
ptrtempent = ent_create(zombiehead, my.x, zombie_head);
my.parthead = handle(ptrtempent);
random_ehh();
while(my.health > 0){
ptrtempent = ptr_for_handle(my.parthead);
if(ptrtempent != null){
if(ptrtempent.health > 75){
ptrtempent.pan = my.pan;
ptrtempent.tilt = my.tilt;
vec_for_vertex(ptrtempent.x, me, 40);
}
}
ptrtempent = ptr_for_handle(my.partlarm);
if(ptrtempent != null){
if(ptrtempent.health > 75){
ptrtempent.pan = my.pan;
ptrtempent.tilt = my.tilt;
vec_for_vertex(ptrtempent.x, me, 69);
}
}
ptrtempent = ptr_for_handle(my.partrarm);
if(ptrtempent != null){
if(ptrtempent.health > 75){
ptrtempent.pan = my.pan;
ptrtempent.tilt = my.tilt;
vec_for_vertex(ptrtempent.x, me, 35);
}
}
if(esc_menu_up == false){
oldvec.x = my.x;
vec_set(temp,player.x);
vec_sub(temp,my.x);
vec_to_angle(my.pan,temp);
c_move(me, vector(2,0,0), vector(0,0,-1), glide | IGNORE_PUSH | IGNORE_ME);
if(oldvec.x != my.x){
ent_animate(me, "walkA", animationpercent, anm_cycle);
animationpercent += 2;
}
else{
ent_animate(me, "standB", animationpercent, anm_cycle);
animationpercent += 1;
}
}
wait(1);
}
ptrtempent = ptr_for_handle(my.parthead);
if(ptrtempent != null){
ptrtempent.health = 50;
}
ptrtempent = ptr_for_handle(my.partlarm);
if(ptrtempent != null){
ptrtempent.health = 50;
}
ptrtempent = ptr_for_handle(my.partrarm);
if(ptrtempent != null){
ptrtempent.health = 50;
}
zombie_numb -= 1;
my.passable = on;
my.event = null;
animationpercent = 0;
kills += 1;
while(animationpercent < 100){
if(esc_menu_up == false){
ent_animate(me, "dieA", animationpercent, null);
animationpercent += 1;
}
wait(1);
}
my.transparent = on;
my.alpha = 100;
while(my.alpha > 0){
my.alpha -= 1;
wait(1);
}
ent_remove(me);
}
I've commented out the events for the zombies, but my.what_i_am is simply a variable. skill 33 i believe.
I also have these templates with the code,
include <is_IPathfinding.wdl>;
include <gid01.wdl>;
include <startup01.wdl>;
include <fxGore01.wdl>;
but the code is not using any of them directly. If i take out intense pathfinding(Is_IPathfinding), for some reason every bitmap becomes bigger, and the player sinks...