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

#21
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)?
#22
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  
#23
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
#24
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
#25
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.
#26
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
#27
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
#28
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
#29
Yes Hello out there! I have a problem what is an RAR file? And what is it its's association with AGS? The problem I am having is it is taking other game files on my machine and associating them with RAR files and making them unusable. It's like AGS is taking over my machine or something. I can manually change what the file opens up with but I don't know what I should change it to? Or better how do I fix it? Does anyone out there know what I am talking about or has anyone else had this problem before if so please let me know
Thanks
Daniel
Winebarger

#30
Hello! Does anyone out there know or have a program out there that lets you view all the views and backgrounds from lucasarts games.  I know about SCI and AGI for sierra games  I have tons of lucasarts adventure games and I would like to use some the games backgrounds/and  animation view/art as a reference for doing my own stuff. If anyone knows where I can get a program that lets you do this or knows a way to rip a Lucasarts game apart please let me know thanks!
Daniel
Winebarger
#31
I want to creat a custom quitgame screen so when the player clicks on quit game a dialog box will pop up saying random things each time with a different graphic being displayed. Like "Are you sure you want to quit", or "OH is your mommy calling you" etc.  I know how to create a custom GUI but how do I acess the default one in AGS.  I can't find where it is located.  I can change the global message in the global messages to what ever I like but I cant seem to find where the quitgame gui is located.  If I could just find that out I could probably just make my own GUI for it, have some sets of pics, set up a random event to do the rest. Please let me know thanks!

Daniel
Winebarger
#32
Hello everybody! Just wondering if anyone out here can help me out with this line of code I am having trouble with.  Basically what I want it to do is have a AreCharactersColliding command set so when my NPC crashes into my player character he will say something random each time
here is what I have got
function room_b() {
 // script for room: Player enters screen (after fadein)
SetGlobalInt(6,0);
RemoveWalkableArea(3);
DisableHotspot(17);
DisableHotspot(16);
ccCreateCommand(1, "WAIT:50;VIEW:69;MOVE:190,194;VIEW:67;WAIT:80;VIEW:69;MOVE:121,181;
VIEW:67;WAIT:80;VIEW:69;MOVE:447,181;VIEW:67;WAIT:80;VIEW:69;MOVE:190,194;VIEW:67;GOTO:1;");
ccExecuteCommand(HOME, 1);
if (AreCharactersColliding(EGO,HOME)==1){
random = Random(5);
if (random==0) DisplaySpeech(HOME, "ARRRRRRRRRRR! Youd best be getting out of way! You little scrub!");
else if (random==1) DisplaySpeech (HOME, "Why I outta mop the floor with ya!");
else if (random==2) DisplaySpeech (HOME, "Move out of the way lad!");
else if (random==3) DisplaySpeech (HOME, "You'd best consider moving boy! Otherwise me and you are going to have trouble");
else if (random==4) DisplaySpeech (HOME, "MOVE! lad!");
else if (random==5) DisplaySpeech (HOME, "I am warning you! GET OUT OF MY WAY!");
}
}
Please let me know if anyone can let me know what I am forgetting to do because for some reason it runs but nothing happens when the characters collide! Thanks

Daniel
Winebarger


[edit: fix line wrap]
#33
AGS Games in Production / Razors in the Night!
Wed 05/11/2003 06:36:40
Hey Everybody! I am just posting some screenshots of my very first AGS game that I have been working on for the past months.  It's called Razors in the Night, it's going to be in 320 x 240 screen resolution, and the demo should be released sometime I am hoping around early december.  The story takes place in a run- down ghetto city called Brookside County.  In Brookside county there is a lot of crime (drugs, gangs, homicides, prostitution etc.) but one of the city's police departments biggest problems is controling a local teenage group of punkrockers.  The game takes place on a Saturday night where this time the punks may have gone a little too far this time!  You control the main character of Knox in his desperate attempt to clear his and his friends name of all criminal activity before it's too late!
Thats the main idea of the story.  Expect this game to be pretty big in size because I am making just a demo and I have a lot of rooms, art, and characters so far.  Below are some screens for everyone to check out.   Please let me know what you think!  I would love to hear some feedback, thanks!

Daniel
Winebarger







#34
Hello again! I am having some serious trouble with scripting a player character to do what I want it to do.  Does anyone know the best way using AGS to run and change views and animations really fast.  The problem I am having is my character is doing things completely out of sequence.  For instance my character is sitting in a trashcan right now.  His view is changed while on a walkable area to simulate him swimming through it.  I have made an animation for him to climb out the problem is when I try to do everything I want it to do it does things completely out of order and even skips some commands.  I was reading about character variables but don't understand  the correct way to plug them into my game or if I even need to use them in a situation like this.  If anyone has any ideas please let me know thanks.

Daniel
Winebarger
#35
Hello out there!  I was just wondering if anyone knew how you exactly upload photos so everyone in the forum can check them out!  I read about how people were using someone's server for holding them on the web so you can link them to the forum.  The problem I am having is how do I upload them? I went to the site and can't find where you upload them? If anyone knows the exact way to do this please let me know step by step.  I just want to know what I will have to do in order to actually place them in the forum so people can see screenshots from my game I have been working on day and night! Thanks

Daniel
Winebarger
#36
Hi my name is Dan I pretty new to AGS.  I am in the process of creating a pretty original adventure game and I have decided to go ahead and use the CCcontrol plugin.  I have it working and It works great but I have a little problem.  I want my NPC's to animate their Idle views nonstop in everyroom but when you talk to them I want them to stop and display there talking views.  Then when theye are done talking return back to there idle views. Maybe also have like a wait command of 20 frames or something in between them to make it seem more realistic.  If anyone out there knows how to set this up I would really appreciate it.   Also is there even a way to change the wait time on the default Idle  in AGS? And also one more question does anyone know how to switch talking views so the character can look back and forth while he or she is talking?  If anyone knows please let me know thanks!

Daniel Winebarger
#37
Hey everyone! I am new totally new to AGS and was wondering if anyone out there help me out I am having a problem with trying to have a a NPC run an animation loop behind a walkbehindable area in a room. The mask is draw out but when I animate a character view it overides it. Is there a certain command for running this  I just can't figure it out.  Also does anyone know how to make an idle animation work between an animation a game display message, and another game display message.  I am basically trying to animate a guy behind a desk talking on a phone.  I want him to stop talking and pause a little bit and then start talking again.  If anyoneout there knows I really would appreciate it thanks alot
danny
SMF spam blocked by CleanTalk