Menu

Show posts

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 Menu

Messages - Alen101

#41
Beginners' Technical Questions / ags shooter
Sat 21/11/2015 00:38:04
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

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);
   }
}}
    
    
    
#42
im trying to use this code but it gives me an error at backgroundcopy,

http://www.adventuregamestudio.co.uk/forums/index.php?topic=37906.msg498145#msg498145
#43
So ive been reading a lot in the forums and in the help manual but since i am more artist than programer, i cant figure out the flash ligth module.

What im trying to do is:
Put on the middle of the mouse pointer a circle,so that when the player turn on an item (flashligth),  the circle appears acting like a mask allowing the player to see a room below the room. (I got this dark room and under it a room with the light on, the circle allows the player to see the ligth room underneath and acts like a flashlight ligth.

So i know this issue has been talked about but i cant manage to make things work, since i am pretty new at programing.
I get lost with the code so having any help would be great!
I manage to see a circle sprite by copying code from other posts and using the module, but is not what i need.
#44
Thank you guys!
I fixed the main problem thanks to all the advices.
Snarky was rigth, the problem was that the  cBern.SetAsPlayer(); change the room then all the other parts of the script wont run.
But all the advices help me so thank you all
#45
So ive tryed all you had told me but nothing seems to work, here is my last attempt:

Code: ags
function room_AfterFadeIn()
{

if (Game.DoOnceOnly("player.PreviousRoom == 10")) //when player enters room 11 from room 10 is the only way to see the cutscene.
{
StartCutscene(eSkipESCOnly);
cBern.SetAsPlayer(); //here ive tryed to change the player so the cutscene takes place in the room with bern, ive been playing with character alex untill this moment
//so the player change works but it doesnt
player.Say("Mmm im hungry.");// no one speech this line 
cAlex.SetAsPlayer(); // here ive tried to return to the character alex, the one i was playing first but it dont return 
//EndCutscene();
}

}
#46
No i linked it because i have read in the forums that if you just type the stuff yourself it doesnt work.

I still cant figure this out and nothing is working, it looks like is not calling the function as Khris sayed but everything seems ok.
#47
but then, wont it will repeat every time i enter that room?
#48
thanks but it doesnt work ;( heres my code:

function room_FirstLoad()
{
if ( player.y < 0 )
{
StartCutscene(eSkipESCOnly);
cBern.Say("blablabla.");
player.ChangeRoom(player.PreviousRoom, 603, 126);

So the player change the room but from then , nothing happens.
I get stucked in the second room watching the other character but wont go back to the first room neither the character talks there.
#49
Im trying to make a little cutscene when the player enter a room, but the cutscene ocurs in other room with other character.
example: guy1 enters room,
camera goes to other room and guy 2 talks for a little , then back to guy 1 who is the player.

The same as maniac mansion first cutscene, player enters house then dr fred apears in his lab and talks for a little then goes back to dave

Its too caotic and costy to make another room for each cutscene and
it give me error if i use this: cBern.SetAsPlayer(); to change the camera to the guy 2 place. It say that the player is not in the room, but of course this happens because obviously in my case second player must not be in the same room where guy1 is entering.
Hope i was clear enough.


What i am doing wrong?

2)i have 3 players too as in maniac, then how can i came back to the rigth player after the dr fred talk.
Beacause i cant say player.SetAsPlayer

thanks for any help!
#50
Beginners' Technical Questions / talk to stuff
Sat 10/10/2015 22:19:15
Can i make the player have always the same answer to stuff that i dont want the player to talk to?

heres an example:
talking to other character: player"Hey", other character "hello"
talking to a table: "i cant talk to that!" 
talking to a picture: "i cant talk to that!"
talking to a wall: "i cant talk to that!"

always saying "i cant talk to that!", to the stuff i will not allow the character to talk to?
like a recurrent speech in all the objects the player cannot talk to?
#51
thank you very much it worked!!
#52
Hello, im new here.
Im trying to make my first game and im no programer so excuse me for any mistake.
Im trying to make a maniac mansion 1 the same game mechanics.
I make the 3 players party, and now im trying to make they react with the objects and hotspots, its easy with one player but i cant achieve to make the 3 diferent characters say diferent things while looking at the same object.
thank you in advance for any help.


SMF spam blocked by CleanTalk