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 - piraatlife4me

#141
Hey scorpius! Its Dan here. Yeah the room scrolls but
It still dosent work when I get to a certain point on the screen the game pauses and my pc  just starts going very very slowly scrolling to with the room to the very top of the screen. My game is in 320 by 240 resolution.  The rooms actual size is 320 by 500, it's a long scrolling up type room. I need the screen to shift all the way to the top with the pc all the way at the bottom of the viewport when the pc gets to certain part of the screen otherwise the room scrolls with the pc and a big chunk of the rooms background is never seen.I also need to scroll back when he gets to the top of a certain point.
here are my values so for the top part

int viewport_width=320;    //view port max width
int top_edge = 130;   //when reached by player viewport starts to scroll
int walk_up = 150; //how far the player has to go up when he appears on the next screen
int scroll_speed = 4;//viewport set scrolling speed
function mod(int a, int b) { return a - (b*(a/b)); }

Any ideas?
Thanks again

Daniel
Winebrager
#142
Hey Scorpius! thanks alot again! for the help I really appreciate it.  One problem though I put all this code in the right places and everything is great the problem is it automatically pauses the game and moves my player character all the way to the top of the screen.  Are you sure this last bunch of code is supposed to be put in a repeatedley execute function? Or is there something I am leaving out?  Anyways really appreciate the help again.

Daniel
Winebarger
#143
Hey AGS forum! I gotta question I have a vertical scrolling room and I need the viewport to be set all the way to the top of the screen when the player walks up it, right now the screen automatically follows the player when he walks.  What can I use to have the view port scroll all the way to top when the player is close to the top of the screen(instead of partially scolling)Any ideas?

Daniel
Winebarger
#144
Hey thanks alot after!  I tried it and it totally fixed my problem so thanks.  One other question though is the object number the same as the button number on each individual gui?  Like how do you define the button number is it labaled by the object number or is it different?If I knew that I could fix my save restore problem
thanks again

Daniel
Winebarger
#145
Sorry about that!  Its serious but not that serious!  

Daniel winebarger
#146
Advanced Technical Forum / I need some help!
Fri 12/12/2003 06:05:08
Hey AGS land! I am in need of some help with my code for my main icon bar.  I had before created my own custom quit screen It worked fine everything was going swell untill I tried to add a custom save and restore screen to it.  Now the interfaces all will pop up on the screen but the buttons dont work for some apparent reason.  Oh yeah and the save and load screens pop up but they don't really work either. I have mad sure to enable the left click mode to (Run Script) in the AGS GUI interface I think some of my brackets are put in the wrong places.  Can anyone proof read this and tell me if it looks funky.  Or if anyone has any suggestions please feel free to let me know ok.   Here is my code

function interface_click(int interface, int button) {
 if (interface == ICONBAR) {
   if (button == 4) {  // show inventory
     show_inventory_window();
   }
   else if (button == 4) {   // use selected inventory
     if (character[ GetPlayerCharacter() ].activeinv >= 0)
       SetCursorMode(4);
   }
   else if (button == 5) {     // save game
  GUIOn(7);
  }
  else if (button == 6) {  // load game
  GUIOn(8);
  }
  else if(button == 7) { //
    GUIOn(3);
     int quit_message = Random(6);
     if(quit_message==0) {
     SetLabelText(3, 1, "Oh I'm sorry! A Little Too Much?");
     SetButtonPic(3, 2, 1, 386);
     }
     else if (quit_message==1) {
     SetLabelText(3, 1, "Once a Poser! Always a Poser!");
     SetButtonPic(3, 2, 1, 386);
     }
      else if (quit_message==2) {
     SetLabelText(3, 1, "Signing up are we?");
     SetButtonPic(3, 2, 1, 389);
     }
     else if (quit_message==3) {
     SetLabelText(3, 1, "Crashed Out!");
     SetButtonPic(3, 2, 1, 390);
     }
     else if (quit_message==4) {
     SetLabelText(3, 1, "Going to Work?");
     SetButtonPic(3, 2, 1, 388);
     }
     else if (quit_message==5) {
     SetLabelText(3, 1, "Bitchin out?");
     SetButtonPic(3, 2, 1, 387);
     }
     else if (quit_message==5) {
     SetLabelText(3, 1, "Looking for a way out?");
     SetButtonPic(3, 2, 1, 391);
     }
   }
if (interface == QUITGAME) {
  if (button == 3) {  
      GUIOff(3);
   }
   if (button == 0) {
      QuitGame(0);    
 }
}
if (interface==SAVEGAME) {
SetMouseCursor(8);  
if (button==3) {
index=ListBoxGetNumItems(7,5);   // Count saved games
if (index<9) {
GetTextBoxText(7,2,text);       // Get the typed text
InterfaceOff(7);                // Close interface
SaveGameSlot(index+1,text); }  // Save game (text as description)
else {                          // if saved games are 20
index=ListBoxGetSelected(7,5);    // Get the selected save game
GetTextBoxText(7,2,text);         // Get the typed text
InterfaceOff(7);                 // Close the interface
SaveGameSlot(savegameindex
[index],text); }           // Overwrite the selected game
}
if (button==4) InterfaceOff(7);
}
}
if (interface == INVENTORY) {       // They clicked a button on the Inventory GUI  
   if (button == 1) {           // They pressed SELECT, so switch to the Get cursor
     SetCursorMode (MODE_USE);       // But, override the appearance to look like the arrow
     SetMouseCursor (6);
   }
   else if (button == 2) {
     // They pressed LOOK, so switch to that mode
     SetActiveInventory(-1);
     SetCursorMode(MODE_LOOK);  
   }
   else if (button == 3) {
     // They pressed the OK button, close the GUI
     GUIOff (INVENTORY);
     SetDefaultCursor();
   }
   else if ((button == 4) && (game.top_inv_item < game.num_inv_items - game.num_inv_displayed)) {
     // scroll down
     game.top_inv_item = game.top_inv_item + game.items_per_line;
   }
   else if ((button == 5) && (game.top_inv_item > 0)){
     // scroll up
     game.top_inv_item = game.top_inv_item - game.items_per_line;
 }
}
}
Like I said a bracket or two must be out of place but I need some help locating it
thanks

Daniel
Winebarger

P.S I am having trouble with my custom save and restore screen? They look good and all but they don't save and they don't cancel out.  I need help with that as well (just thought I would add this on)?
#147
Hey Gilbot Thanks alot! I have been pulling out my hair all day trying to solve this stupid little problem
thanks!

Daniel
Winebarger
#148
Hey eveyone I just have a quick question that I need help with.  The problem I have is in a room of mine I have an NPC that runs an extremely long animation the first time the player enters the screen.  The problem is the sprites for this animation and view are stretched over the entire screen, and my walking view and normal view sprites are not strectched over the entire screen.  The problem is the second time the player enters the screen I want the NPC to be at specific postition with a different view set before the fade in.  Is there anyway to move the character before the fade in so the player dosent have to wait for the NPC after the fade in?

Daniel
Winebarger  
#149
Hey its Dan here! Hey guys I am in need of a serious favor.  I have this pretty long and complicated animation setup and I need help getting it work right.  What I have is a scrolling room the scene is a valet parking attendent with an animation of a car pulling up to the curb the man getting out walking to the booth paying the attendent and walking off the left side of the screen.  So I have my attendent in a booth in the room, I imported all of my sprites as the entire screen so they would all align properly and just erased parts on the sprites where they would need to be behind(taking the walkbehinds into my own hands you could say)  I thought I had this all worked out but the problem is these two objects I have in my scene.  One is a clipboard that is on the desk of the booth, another is the guard rail to the parking lot (which is object animated during the character animation)  My main problem is during this ridiculously long animation I had spent a whole day creating is conflicting with the rooms object baselines at different times of the animation.  It's kinda hard to explain so I will describe more in detail the first animation is the guy pulling up and him getting out of his car and walking over to the booth window(all in one loop)Next I have the attendent  wait for a bit, then I animate the object(the one in the way) so the guard rail goes up, I have the attendent walk to the car get in drive, park,get out, and walk back to the booth all in another loop.  During this loop I need the baseline of the rail object manually set to different points in the room when different frames are being displayed since the sprites are displayed over everything else.  I know this really confusing  I just really some need help.  If anyone knows a way to manually set a baseline during an animation or while it is running is basically what I need to know.
Also after I can get the kinks out of this one I need all of this to be animated in the background somehow because the clipboard on the counter of the booth I want to be a hotspot  available for taking when the attendent is away from the booth!
So if anyone has any ideas or solutions to any of these things please let me know ok
Or if it dosent make any sense ask and I will explain it again
thanks again
Daniel
Winebarger
#150
Does anyone know if there is a way in Ags to have the room scroll like the background in the game paperboy? Or have a good idea on how to simulate it? Also is there a way to to diagonally set baselines in a room, because I have this fence in my game and it is really hard to get walkbehinds to look right on it?  If anyone knows how to do these things that would be super.  Please let me know
thanks

Daniel
Winebarger
#151
Thanks man!  Totally weird it was exactly what I wanted to know

Thanks

Daniel
Winebarger
#152
Hey TK, thanks alot for the help but I got one other quick question can your characters use their talking views with DisplaySpeechBackground? Or does that only just display speech?

Thanks
Daniel
Winebarger
#153
Hey whats up people! Hey I just have two quick questions Can you scale a character manually in the script? Say like you have a character walk to a different room and for some reason their scalled down size on that area dosen't look right on the set size of the walkable area but your player character looks fine. Is there a way in the script place a command to only scale down the NPC so he will have is own scalled down size(when needed)and the player character will keep the same size?  Also I know there is a CharacterIgnorewalkbehinds command and this is great but what if your character only needs to ignore one walkbehind in a room and not all of them.  The reason I am asking this is because I have a room in my game where a NPC is playing an arcade machine.  He is inbetween to walkbehinds in the room I need him to be behind the first on but ignore the second one and be in front of it.  The problem I am having is if I just got rid of the second walkbehind when my player character walks behind the machine and the NPC he will be in front of it(not good).  This may sound a little confusing If anyone dosen't understand what I am asking I will explain it again.  So if anyone knows a command for any of these porblems I am having, or another solution to my problems pretty pretty please(with sugar on top) help me out.
Thanks.
#154
Hey Everyone! I just have a real quick basic question that I need help with solving.  Say you have some NPC's in a room and you want things to happen in the background every (some number) of loops along with there idle animations how do you script this with out it pausing the game?.  I know how to set up my idle animations but when I try to have repeating events on top of that It will run them but it pauses the game and the player has to wait untill they are done everytime, and I just want them to happen in the background.  For example I have a fortune teller inside a machine.  She has a idle animation that she executes every 200 loops with that I want her to say like "Insert Coin I will tell you everything" or something like that every 185 loops with out pausing the game at all.  What command and where do I put code to do this?  If anyone knows how to do this I would really appreciate it
thanks
P.S. I was reading the variables section of the ags help contents and was wondering is there any more AGS variables available for use that are not displayed there?I'm  just curious?

Daniel
Winebarger
#155
Hey I have been stumped and need some help?  My game has a room in it with arcade machines and interactions with the game machines.  I want the player to have money and a special GUI to appear only when the money inventory item is changed as the pointer cursor or when the player looks at the inventory item in the inventory panel.  I created the GUI and it is GUI#4.  I already have three labels on it one that just says money, another that is has a $, and the third is a label reading 0.00 this where I want the actual amount of money the player has to go.  How do I set this up so there is a starting amount of money but when a player plays a game it will subtract from the total amd display it in the GUI.  Also I want the GUI to disappear whe the player chooses a different item or a different command all together.  So the GUI is only displayed when the player interacts with the money icon only.  And I also want it to work in everyroom as well in case I want to use money again in a different situation.  Another question I had is does anyone know if there is a way to run non ags game inside a ags game? Say the player interacts with a game machine and I wanted frogger or dig dug to run iside my game Is this possible?  I know you can play an AGS game inside a AGS game but I wasn't sure if you could play non-AGS games as well?  Well if anyone out there in AGS land knows a solution to this problem please let me know!
thanks again!
Daniel
Winebarger
#156
I am really, really, really diggin on the look and atmosphere of your game. It has a very original unique design to it.  It has the whole Artsy black and white magazine cutt-out 1977 Crass style seditionary look with a creepy modern edge to it Its very nice.  Lets just say I definitely would pay money for it if I saw it on display in a retail store.  Can't wait to see more

Daniel
Winebarger
#157
Hey Guess what! I used a SetCharacterVIewEx and aligned it left and my animation now runs perfectly the way I want it to.  Thanks again for the help guys!
Daniel
Winebarger
#158
I'm sorry would you mind explaining it to me again I am a little unclear of what you mean? Are you basically saying that I would have to grab the entire canvas when I upload the sprites into the sprite manager in order to keep it still.  The reason I need this is because the character is animating all over the screen and when it moves it throws it all off too far to the left. I'm sorry I still don't understand from the example you gave me?
Daniel
Winebarger
#159
Hello again! I am having a problem AHHHHHHHHHHH!
I have alondg animation setup in  my game where the player character dumpster dives into a garbage bin.  I have a movecharacterblocking command moving him to where he climbs up onto a box and then dives into the the dumpster.Everything works great the problem I am having is the animation is not lined up with the normal view sprite that I had before (and this is a big animation taking up a large portion of the screen)so at run time the sprites origin point is the bottom right instead of starting from the bottom left corner like I want so it will be lined up right.He is animating way to the left of the screen when we want it to start exactly where the EGO is standing from the bottom left corner.  My question is in AGS is there a special command or a way to tell it to animate from a certain position such as the bottom left corner of the ego's current position so the animation will run correctly? Or is there something I missed when I imported my graphics?If this is not clear I will explain again. But if anyone knows it would really help me out thanks!
Daniel
Winebarger
#160
Hey thanks! this program is awesome I am never going back to winzip ever again. I can now finally play my games that are in RAR format! Thanks for lookin out!
Daniel
Winebarger
SMF spam blocked by CleanTalk