Hi guys i know ags is not the most suitable program to make a shooter,
But the thing is i am making an adventure game in where the player can access to a computer game, thats when the shooter enters the scene
so far i got this but i got lots of troubles and it doesnt seems to work.
So if someone can give me any help that would be great.
What i want to do is :
Just one character (zombie) walking towards the screen
you have to stop him from getting to the base of the screen //
(i used when the player reaches certain area y=123 for example the char steals you a life and teleport to the top of the screen as another zombie)
But this is not working also.
You got 3 bullets and if you hit the target like 10 times it will change the view to a dead one and disapear, and gives you some points.
maybe if you kill this char 3 times the game ends.
heres my code so far: (sadly this is not working. It works if i use it out of the repexec. but i need the repexec to hear the sound of the gun for example, so i dont know what to do
)
Code: ags
But the thing is i am making an adventure game in where the player can access to a computer game, thats when the shooter enters the scene
so far i got this but i got lots of troubles and it doesnt seems to work.
So if someone can give me any help that would be great.
What i want to do is :
Just one character (zombie) walking towards the screen
you have to stop him from getting to the base of the screen //
(i used when the player reaches certain area y=123 for example the char steals you a life and teleport to the top of the screen as another zombie)
But this is not working also.
You got 3 bullets and if you hit the target like 10 times it will change the view to a dead one and disapear, and gives you some points.
maybe if you kill this char 3 times the game ends.
heres my code so far: (sadly this is not working. It works if i use it out of the repexec. but i need the repexec to hear the sound of the gun for example, so i dont know what to do

int myCounter2 = 0;
function room_RepExec()
{
{if (myCounter2 < 4)
{
myCounter2 += 1;
}
if (myCounter2 == 0)
{
}
//////////////////////////////////////////////////////////////////
if (myCounter2 == 1 && (mouse.IsButtonDown(eMouseLeft) && (Character.GetAtScreenXY(mouse.x, mouse.y) == cZombie)))
{
aUzi.Play(eAudioPriorityVeryHigh, eOnce);
gBullet.Visible = false; //gBullet is a gui with the form of a bullet, to know haw many bullets you have until you have to reload
cZombie.Tint(100, 0, 0, 100, 90);
Wait(15);
cZombie.RemoveTint();
}
else
{
aUzi.Play(eAudioPriorityVeryHigh, eOnce);
gBullet2.Visible = false;
player.Say("Miss!.");
}
//////////////////////////////////////////////////////////////////
if (myCounter2 == 2)
{
aUzi.Play(eAudioPriorityVeryHigh, eOnce);
gBullet.Visible = false;
cZombie.Tint(100, 0, 0, 100, 90);
Wait(15);
cZombie.RemoveTint();
}
else
{
aUzi.Play(eAudioPriorityVeryHigh, eOnce);
gBullet2.Visible = false;
player.Say("Im aiming like a blind person!.");
}
//////////////////////////////////////////////////////////////////
if (myCounter2 == 3)
{
aUzi.Play(eAudioPriorityVeryHigh, eOnce);
gBullet.Visible = false;
cZombie.Tint(100, 0, 0, 100, 90);
Wait(15);
cZombie.RemoveTint();
}
else
{
aUzi.Play(eAudioPriorityVeryHigh, eOnce);
gBullet2.Visible = false;
player.Say("damn another miss!!.");
}
/////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
if (myCounter2 == 4)
{
player.Say("Reload reload!!!.");
myCounter2 = 0;
gBullet.Visible = true;
aReload.PlayQueued(eAudioPriorityHigh, eOnce);
Wait(40);
gBullet2.Visible = true;
aReload.PlayQueued(eAudioPriorityHigh, eOnce);
Wait(40);
gBullet3.Visible = true;
aReload.PlayQueued(eAudioPriorityHigh, eOnce);
Wait(40);
}
}}