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

#321
Ok, so in this case I dont need to check if its visible before hiding it? I was writing this all along:

if (gMyGui.visible) gMyGui.Visible = false...as in, if its already hidden, then dont try to hiding it, just leave it as it is... I thought I would be saving a "process" this way (?)

Is it a waste of time for this "check"?

(kinda like doing "if this exists, delete it, if not, do nothing"...)
#322
Hi Sephiroth,

This will work nicely, actually!  ;D

Overloading functions...ok, now atleast I know what it's called. I'll look it up to fully understand.

Too bad AGS doesn't support it though.

**EDIT:
Ok, I found this in the manual:
http://americangirlscouts.org/agswiki/Extender_Methods_mean_Polymorphism!#Overloading

#323
Is it possible to merge GUIControls + Gui's for an extender "this" inside a function parameter? I guess I could have 2 functions (GUIControls + GUI's), it beats having to do one for each control (label, textbox, button, etc)...although it would be great to call "gMyGui.Chk_Hide" or "btnMyButton.Chk_Hide" inside the same module and both work.

Ok, the manual is my friend, must have missed the info on that part. I'll go check it out again! In the meantime though if anyone knows if the above is possible, any help is appreciated :)

thnx dkh
#324
I was wondering if it is possible to "merge" these 2 funtions into one so that the same function can treat gui's, buttons, labels, lists, textboxes, etc...something like:

pseudo code:
Quotevoid Chk_Hide(this GUI* || this Button* || this Label*, etc...)

Quote
//instead of using a separate function for each type (button, gui, etc), it would be cool that a list of possible types can be treated with 1 function.
void ChkGui_Hide(this GUI*)
{
 if (this.Visible) this.Visible = false;
}

void ChkBtn_Hide(this Button*)
{
 if (this.Visible) this.Visible = false;
}

*ps: The inside of the brackets above after the function name are called parameters, right? What's an extender again? :P
#325
QuotePersonally, I'd like to go in and make all the limits dynamic just to end the limit issue once and for all.

...keeping my fingers crossed!!
#326
I asked pretty much the same question a good while ago when I was just starting out: http://www.adventuregamestudio.co.uk/yabb/index.php?topic=41336.0

As you gain experience, you'll be able to start making your own custom functions that greatly reduce redundant code + number of lines. I think there's a thread somewhere on "scripting tricks" that helped me out a lot in the beginning (like pressing shift-tab brings selected lines back, etc...)

Id be willing to share a few practical funtions with you if you wish!
#327
Hey Monkey,

I've run into a little problem with testing today:
1) There are 4 guides (a,b,c,d).
2) The present Z order is like this (from farthest to closest to screen): d,c,b,a

When I click on c or d, alternating the clicks, after a few clicks, the zOrder of guide "a" will pop-up above guide "b" without clicking on it.

Is it something with the logic or perhaps somehow I need to test out if my clicks are going through some guides?

**Short vid on youtube: http://www.youtube.com/watch?v=YUYn4rtxBHI**
#328
wow that's awesome Ryan...I agree aswell, I think its important little things like that. It shows if you give attention to small stuff like that, imagine what it will be for the bigger things! That's a good idea, perhaps I'll go the "windows" route aswell. :)

As for the custom dialog, abstauber's is pretty awesome...just need to tweek a few things (for homogeneity), but not there yet :P

#329
I would say I choose to render in 3d for the same reasons...however, Im also crazy enough to draw over the 3d renders frame by frame to make it look more painted...

In my opinion though, I dont think every frame needs to be rendered at 29 or 30fps, I got good results at around 15 or less, depenfding on the anim.

As for the perspective changes, that is something I also thought of doing, but my main character has so many animations/different clothes/ages that it would be way too many sprites for 1 character...so for now I chose 1 perspective for the whole game.
#330
Well its to make the whole UI homogenous...I dont know why a player would hold down the mouse button on a gui button...I guess I just wanted to make sure that if they did, it cant be held down for longer than 20 loops...i guess it doesnt matter, I just wanted that in there for personal preference, heh.

Ok, well if I have to do it the manual way, I think I might just forget it!
#331
If I click on a menu button, the button's sprite changes to the "pressed" sprite, like normal. However, I wrote a script that wont let the user hold down a button forever; after 20 game loops, Id like to "release" the button press, even if the mouse button is physically still held down by the player.

At the end of the while loop (when 20 loops are up), how can I manually release the mouse button (even if the player's finger is still holding down on it)...Im trying to force "mouse.IsButtonDown(eMouseLeft)"  to false myself, but I'm guessing its read-only?

If not, I guess at the end of the loop I could manually change the pressed button's graphic back to the normal graphic, but Id rather avoid that if possible...
#332
QuoteAt that point you might as well go ahead and make the whole thing dynamically assigned, which I think is CJ's long-term plan for all the built-in limits

Way beyond my abilities doing something like that! Hopefully this could be done one day; dynamically assigned, that is!
#333
I would also be interested in increasing the limit of sprites...but also increasing the limits of inventory items too!

(Whitout hijacking) is it possible to make the limits user-defined? As in, just type the limit number you want in the editor or something? (of course limiting super-silly amounts, like 1 gazillion).
#335
Say if I wanted to add a 4th booklet (or even 5th), is this how I would process  the zorders? What is the "formula" you used exactly? I cant figure it out (you're smart).

Code: ags

  GUI *otherGUIs[3];
  if (theGui != gQuickGuideVC) otherGUIs[0] = gQuickGuideVC;
  else otherGUIs[0] = gQuickGuidePC;
  
  if (theGui != gQuickGuideSS) otherGUIs[1] = gQuickGuideSS;
  else otherGUIs[1] = gQuickGuidePC;
  
  if (theGui != gQuickGuideFM) otherGUIs[2] = gQuickGuideFM;
  else otherGUIs[2] = gQuickGuidePC;
  
  theGui.ZOrder = 10; // this GUI's z-order is always set to 10

  if (otherGUIs[0].ZOrder != 7) otherGUIs[0].ZOrder--; // these GUIs' z-orders may have been 7,8, 9, or 10..
  if (otherGUIs[1].ZOrder != 7) otherGUIs[1].ZOrder--; //...as long as they weren't already 7 then they need to be bumped down one
  if (otherGUIs[2].ZOrder != 7) otherGUIs[2].ZOrder--;
#337
Good news is that when I go into "magnify" mode...everything will be "frozen", as in the booklets can no longer be flipped. Nothing is dynamic at all.

Here is a screenshot to give an idea:



#338
@hedgefield

Very good idea...I would also love to have a smoother shake screen + randomness.
#339
Suppose I just wanted to use it on gui's only (no redraw for backgrounds, characters, or objects)...would it be doable?

Ive got some gui's set up as booklets, and Id use the magnifier only on the gui area, to see small print, etc...it would never be used on the background room, characters or whatever...plus the game is paused so i was thinking is there a way to capture the whole screen, set it on the background, and then Id just hide all the open gui's...when the magnifier is closed, everything is restored to how it was.

I dont know, does that sound crazy? If so, crap! Got to rethink how Im gonna do this :P
#340
Hey Monkey,

1st, great module...Ive got it to work on my background no probs...super nice!

I was wondering, is there away to make this also work for magnifying gui's? Right now Im trying to magnify a gui, and the effect "cuts" through the gui and shows the background room instead.
SMF spam blocked by CleanTalk