It most probably is better. This may be the case where I may just have to do that.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuEnemyScript.asc(8): Error (line 8): CharStates is not an array
function repeatedly_execute()
{
//CHOST CHASE PLAYER
if (player.x - cGhost.x < 30 && player.y - cGhost.y < 30)
{
EnemyChase = true;//Set state
cGhost.SetWalkSpeed(-1, -1);
cGhost.FollowCharacter(player, 0, 0);
}
else //GHOST RANDOM MOVEMENT
{
EnemyChase = false;//Set state
cGhost.SetWalkSpeed(-3, -3);
int walkx = Random(System.ViewportWidth + cGhost.x);
int walky = Random(System.ViewportHeight + cGhost.y);
if (GetWalkableAreaAt (walkx, walky) == 1)
{
cGhost.Walk(walkx + 73, walky - 73, eNoBlock, eWalkableAreas);
}
}
cSomeguy.Walk(160, 100);
cSomeguy.AddWaypoint(50, 150);
cSomeguy.AddWaypoint(50, 50);
player.WalkPath(eBlock, eWalkableAreas, point x, point y, point x, point y, point x, point y);
//The player would walk to each point in a sequence until there are no more coordinates
//or even
player.WalkPath(eBlock, eWalkableAreas, pos1, pos2, pos3, pos4, pos5);
function repeatedly_execute()
{
cEnemy.FollowCharacter(player, 1, 100);
if (cEnemy.IsCollidingWithChar(player))
{
//Enemy Attacks!
player.Tint(100, 0, 0, 100, 90);
PlayerHealth -= 3; //Player takes damage
cEnemy.Animate(0, 9, eOnce, eBlock, eForwards);
cEnemy.UnlockView(eKeepMoving);
player.RemoveTint();
tickspassed = 0;
}
}
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.208 seconds with 14 queries.