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

#41
GAH!! I feel like I am sooo close..

I have my GUI set to pause the game when its visible. So in the script you gave me I have it so
Code: ags
  // inside on_mouse_click

  else if (button == eMouseLeftInv) {  // use inv item
    player.ActiveInventory = inventory[game.inv_activated];
    ProcessClick(click_x, click_y, eModeUseinv);
    gINT.Visible = false;
  }
  else if (button == eMouseRightInv) {  // look at item
    inventory[game.inv_activated].RunInteraction(eModeLookat);
    gINT.visible = false;
  }


but for some reason its causing the interface to stay there and not process the inventory item. I also tried disabling the pause when gui is visible option and put in pause commands. This causes me to have to click on inventory items a couple of times before they process though :/ Ill mess with it more after I get home from work.

Edit 4/16/2011: I have also discovered that when i click on an inventory item or anywhere on the inventory box it un-pauses the game. Doing some research, it appears that I may have to mess with the On_Event function. But I am not completely sure, so any help is more than welcome!

Edit of the edit 4/17/2011: I finally figured it out. I needed to put all the inventory scripting above
Code: ags
 if (IsGamePaused() == 1) { 
    // Game is paused, so do nothing (ie. don't allow mouse click) 


#42
Thanks Khris

QuoteThe code line you posted is, I'm sorry to say, horribly wrong
Yeah I realized about a half an hour later of
messing around with it that I had to of been wrong. Setting up equations and controlling some of AGS game functions are still pretty foreign to me so I appreciate your patience. Your code worked like a charm


Edit: Alright so now im having issues with the inventory side of my custom interface. Now I am not necessarily asking for a coded solution to this problem but rather what I should do mindset wise to figure out how to solve it. I know I need to somehow have it figure out what inventory item I am clicking on(and which mouse button) and if its viable, use the click_x, click_y cordinates with the inventory item.
#43
I apologize in advance since I have so many questions concerning this GUI interface.  But my new problem Is I have the gui appear at whatever hotspot I clicked. But obviously that isnt going to work because it will cause my GUI to go off screen some times.

Now My Interface is  80 by 38 so my GUI cant show up right if its <240x  nor  > 80x. As well as < 162y or > 38.  I am trying to make a function that will check these conditions and make the GUI Set itself up accordingly but the question is ..I guess how?

I am thinking its something among the lines of
Code: ags
 if(gINT.Visible == true && GUIControl.GetAtScreenXY(<x240, <y38)); 
  or somthing of the like.
#44
Alright i tried what you reccommended but its saying undefined token on click_x

Code: ags


//on on_mouse_click(MouseButton button) gINT= my custom interface

 if (IsGamePaused() == 1) {
    // Game is paused, so do nothing (ie. don't allow mouse click)
    int click_x, click_y;
    
    if (gINT.Visible && GUI.GetAtScreenXY(mouse.x, mouse.y) != gINT) gINT.Visible = false;
    UnPauseGame();

// on else if (button == eMouseRight || button == eMouseWheelSouth){
    if (GetLocationType(mouse.x, mouse.y) != eLocationNothing){ 
      click_x = mouse.x;
      click_y = mouse.y;
      gINT.Visible = true;
      gINT.SetPosition(mouse.x, mouse.y);
      Interpause(); //this is a custom function i made to pause the game if my interface GUI is on


should i put most of this code into a custom function to A: not have so much clutter and B:possibly fix my token problem?
#45
Alright guys I have a new question that semi relates to my last one. What i want to achieve in the end is basically a custom interface as seen in 6 days a sacrifice.

So with that said. I am not exactly sure how to program my custom made hand button to interact with any of the hotspots I have in my game. Which goes for the look interaction ect ect. I am thinking I have to use the run interaction command for said hotspot(s) (whichever one i clicked on to get my GUI visible). Any suggestions on how to go about this?
#46
I've been waiting for this. Congrats on finishing!
#47
Thanks you guys! I originally had something similar to ddq's code only I put it in the on click script on that specific GUI to no avail. But in this case I used ddq's code and it works like a charm, thanks again!
#48
Help! Im trying to get my custom interface I created to disappear if any mouse click is not on the GUI whenever it is visible. This seems like a really simple task but I cannot figure out how to word it on the script or where at. Any help is appreciated!
#49
I like this idea enough that I think ill attempt to enter a MAGS competition. I havent scripted in AGS in about a year or so. I hope  im not too rusty.




an image to solidify my promise  :=

#50
Completed Game Announcements / Re: I Forgot...
Fri 01/04/2011 21:07:56
Just downloaded, will be playing it when I get off work tonight
#51
Quote from: Mods on Mon 28/03/2011 10:41:48
Well, it won't NOT be welcome - so the more the merrier, get it up  :=

Consider it DONE!


Dead Silence soundtrack: http://www.mediafire.com/?6aok3a2dzfc2y25
#52
General Discussion / Re: based on a true story
Mon 28/03/2011 10:42:16
Quote from: abstauber on Mon 28/03/2011 10:03:39

Oh, just in case you still have too much creative energy around... pm me  8)

and get ahold of me as well :P
#53
I can probably gather all the music from my game and upload it somewhere if any one wants it.
#54
I have been wondering when a game like this was going to be made. NICE!!!!
#55
If Kelma happens to not show up, does someone else want to run the next show?
#56
Well the votes are in and overwhelmingly the winner is KELMA with her incubus story!

As for the trophy:





Yes, this may have been influenced by Calins story and mint cornettos
#57
Alright its time to vote for your favorite horror story.  GO GO GO! I will probly end the voting phase sometime around to 20th. Trophies will be made once my art slave does his bidding  :=
#58
I decided I am going to link to the story I wrote rather then post it on here since its about nine to ten pages long. If you do manage to brave and read it all, enjoy :D

http://diathags.blogspot.com/       WARNING!! DOES HAVE STRONG LANGUAGE


(alsoI'm assuming I cant be voted on since I won last time,I'm doing this for the fun of horror!)
#59
Awesome we are starting to get quite a few entries in! I may post a story a bit later for fun.
#60
First I would like to thank the people that voted for my transatlantic story!!!

After just recently watching the movie Phantasm, I decided to pick this months writing theme as HORROR!

There are no format restrictions of any kind.  Steven King, H.P Lovecraft and Edgar Allen Poe come to mind. A campy horror story wouldn’t be bad either!

Anyways let the competition begin and have fun!

SMF spam blocked by CleanTalk