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

Topics - Alen101

#1
Is there a not compicated way to make my cursor change for a second and then to comeback to my original cursor image?
my mouse is an aim and i am shooting,
I have an aim draw on the cursor and i want to add a spark when i shoot (when i press the mouse button)
ive been looking at the posts, but it gets far too complicated to the point i am now at scripting.

Any help wold be great!
Thanks!!!
#2
I have a character, with an animated view on him.
Any ideas of why i can see the animation in the selected character settings runinng fine,
but when i go to the game, the animation dont run?
The character have a waving cape y want the cape to be continuously waveing.

#3
Hi, im having a problem with my game maybe someone knows what to do in this case:

I have 3 characters, Player can change between characters anytime he wants.
So this is the problem:


MAP: side view:
roomA    roomB
(____2_)(_1____)
*() <-this are doors. doors are all closed.
*number 1 and 2 are characters

then:
*1 is in room B
*1 opens the door in order to go to room A
*player change character to character 2
*from room A the door linking the two rooms remains closed :(

since those are separated rooms i dont know what to do.
Is there a simple way to link doors in some way?
thats my problem, any help with this would be great!
thanks


The method i use to have doors opened or closed is :

when the door opens i put an object with the image of a opened door, and allow the character to change to room A

#4
Beginners' Technical Questions / bool flag
Wed 06/01/2016 06:05:31
Character Bern :grin: makes a little talk if you go to his room.
I have a phone in other room. So if the player :-D want to talk to the phone, he can.
Every time player :-D get the phone, phonecall 1 dialog plays.
But the player  :-D can only see phonecall 2 dialog, if he go to Bern's room, and listen to a character Berns talk. :grin: (The talk activates when the player enters the room)


Im trying to do that,

So to solve the problem i have tryed this:

I put this in global script:
Code: ags
bool planb = false;


When Bern :grin: do certain talk it activates a flag. So, i ve putted this code at the end of the talk:
Code: ags
bool planb = true;


Then, later in the game, when player :-D talks to the phone,
if that boolean is set to false(:grin: Bern's first talk was not seen by the player)   
if that boolean was set to true(:grin: Bern's first talk was seen by the player)   
and it activtes the phonecall 2 dialog.
This is what i want to do because i want to make sure that phonecall 2 dialog only activates if the player have seen the Bern's talk

So then ive tried this in the room containing the phone scripting:
Code: ags

if (phoneflag01 == 1 && planb = true )
        {
      player.Say("phonecall 2 dialogs");
      
        }

But it gives me this error:

Code: ags
room7.asc(184): Error (line 184): undefined symbol 'planb'




Almost the full length scripting:
Code: ags

// room script file
int phoneflag01 = 0;




This goes inside a function called on NumberClick
{

else if (telephoneNumber == ERIC_NUMBER) 
 {
 player.Say("Hello eric.");
 cEric.Say("I dont have time bye.");
 }
    
   
    else if (telephoneNumber == DELIVERY_NUMBER)
{
    if (phoneflag01 < 2) 
    {
    phoneflag01 += 1;
    }
  
         if (phoneflag01 == 0) 
         {
         player.Say(" phonecall 1 dialog, version 01.");
         }
  
  
            if (phoneflag01 == 1) 
            {
            player.Say(" phonecall 1 dialog, version 02.");
            }
 
 
               if (phoneflag01 == 2) 
               {
               player.Say(" phonecall 1 dialog, version 03.");
               }

          
      
                    if (phoneflag01 == 1 && planb = true )
                    {
                    player.Say(" phonecall 2 dialog");
                    }

                           else  
                           {
                           player.Say("tone");
                           }

}



Any help would be great!

#5
Beginners' Technical Questions / Blinking view
Sun 03/01/2016 01:15:44
Im trying to make my characters blink, and blinking view seems the best way to do it.
But i dont understand it very well.

I want my characters to blink during the entire game so i suppose i put this stuff on global script,
but it gives me an error.

In the room it does not give me any error, but it dont work.


Code: ags

cAlex.BlinkView = 23;
cAlex.BlinkInterval = 160;


Also i have 3 views to change right?
the front one and the two sides.
Do I have to do something with the loops?
Any ideas?
#6
Hi, im trying to make the camera move lefting the character behind to allow the player to see a landscape and then back to the character.
Rigth now i have this and it run ok on the first part, but when the camera goes back it goes back without scrolling. It jumps to the player position.
How can i make a smooth scroll back like the scrolling on the first part?

Code: ags
SetViewport(0, 134);
while (x<200) 
{
  SetViewport(x,0);
  Wait(1);
   x++; 
}
#7
https://www.youtube.com/watch?v=jdOTF_ErXG0&index=27&list=PLymKb1rMLG2ksaBcEdHeyPCntjapFjONxhttps://www.youtube.com/watch?v=jdOTF_ErXG0&index=27&list=PLymKb1rMLG2ksaBcEdHeyPCntjapFjONx

So i got a guy talking continously like in the tutorial from above.
He says 3 diferent lines randomly.
Thats pretty cool, but i need him to shut after the player gives him an item.

So i thougth i could resolve it, but i could not.
Because in the example it wont go to global script,
but in my case as its a character it takes me to global script.
Then i dont know where to put the int, and i cant manage to move on.
Any help would be great!



#8
Beginners' Technical Questions / object loop
Mon 21/12/2015 00:37:08
I have a map of a city and it would be great to put some cars and some clouds in it.
For that i have to make an object to move in a loop for the case of the clouds, and in the case of the cars make them to go from one point of the screen to ohter, then disappear and finally apear again in the first spot.
I cant manage to do it. :(
Any help would be great!!
#9
Is there a way to animate tint?
I have a character in front of a big tv so it would be cool to have this character with a tint rotation on it.

I have found this, preety cool but it wont work with tint.
Transparency = Random(50);
#10
?????????

Is there an easy way for a player to give an item to another player.
What i need to do is:
Select an item from the inventory of player one,
Then use it on player two,
then, player one loses that item and player two earns it.
#11
                                :confused:???
is there some easy way to make a player give an item to another player?
my game is maniac mansion style, im trying to make the same, as the characters in that game can pass items from one to another.
#12
im mixing two objects with this code:

Code: ags

function iPilas_UseInv()
{
 if (player.ActiveInventory == iPilas)
  {
  player.Say("Doesnt make sense to use this item on itself.");
  }
  
  if (player.ActiveInventory == iCtrlnopilas)
  {

   player.LoseInventory(iCtrlnopilas);
    player.LoseInventory(iPilas);
    player.AddInventory(iCtrluni); 
      player.Say("Ok the control should be functional now.");
      
          if(mouse.Mode != eModeWalkto) //this attempt doesnt work
          {
          mouse.Mode = eModeLookat; 
          }
  }


The problem is when i mixed them, after the player make that action, the two objects leave and the new one appears, but:
1:After that the mouse cursor change to Walkto, no matter what, even if i was on look at mode before


Could i disable the walk to while the player is on the menu?
#13
Im using UNHANDLED EVENT,

Code: ags
 if ((what==2) && (type==3)) //Use inventory on object
  {
  player.Say("Dont work.");
  }



the problem is that it works ok but not on an object with this code on it:
Code: ags
function hElectdoor_UseInv()
{
if (player.ActiveInventory == iCtrluni)
 {
 player.Walk(130, 125, eBlock, eWalkableAreas);
player.FaceObject(oPorton, eBlock);
aClick.Play();
Wait(5);
aDoorclose.Play();
 hElectdoor.Enabled = false;
 oPorton.Visible = true;
 player.Say("Listo, la puerta esta abierta.");
}
}

If the function "function hElectdoor_UseInv()" is running it doesnt work :(   //i think it doesnt matter the code, just that the useinv function is on.


Example: I got a garage door that opens only with an inventory item (remote control). I got a (bottle) as another inventory item.
If i use the (bottle) on the door it would be great that the "Dont work" message would be displayed, but because the function hElectdoor_UseInv() have code on it for the
remote control to open the door, if i use the bottle on the door the message wont display so the unhandled event dont work.

So is there any option for this to happen in the rigth way?:confused:???
I need it in the simple way possible because im not a programer.
#14
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);
   }
}}
    
    
    
#15
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.
#16
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!
#17
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?
#18
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