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

#1
Hi,

I wasn't able to find anything on this, but I may simply be searching the wrong terms.  Feel free to answer with just a link to another thread.  :)

I have a function in GlobalScript which calls several lines from another package (SCUMM_VERBCOIN_GUI).  This works fine, and that function is called SetVerbCoin.

I also have a package called General, and although it would probably work to just remove this package completely and put everything in GlobalScript, I'd rather not do this.  A function in General needs to call SetVerbCoin.  I can't seem to say anything like "GlobalScript.SetVerbCoin".  Nor can I move this function to General, because although GlobalScript can call functions from General, General does not seem to be able to call functions from SCUMM_VERBCOIN_GUI.


I'm a pretty visual person, so I thought this diagram might help to see what I mean:

http://agile-games.net/misc/images/functions.png
#2
OK, I wouldn't be surprised if the answer exists elsewhere on this forum, but I couldn't find it, so what's the harm in adding one more thread that people might find depending what they try searching by?  (Also, it seems to me that this better belongs in the modules/plugins forum, but I can't seem to post there, so mods, feel free to move it without comment if you agree).


First, split up your Verbcoin images so that the background of gVerbcoin is the base only (ie, no hand, eye, etc).  HOWEVER, even if this base image will never change, you must still have multiple sprites for it, and set them in GlobalScript.asc, because the Verbcoin code uses the sprite number to identify which option the player has selected.  Now, edit interact_button/look_button/etc to have Image, MouseOverImage, and PushedImage set to your icons.

Now, In order to make these icons visible (and therefore selectable) only when they need to be, (ie when you've attached a function that does something when they choose it), you'll need to find the following in SCUMM Verbcoin GUI.asc:

Code: ags

          // ok, now activate the gui
          gui[verbc_id].SetPosition(guix, guiy);	// put the verbcompass on the right spot
          gui[verbc_id].BackgroundGraphic = verbgraphic_button0;  
          gui[verbc_id].Visible = true;						// activate


And add some lines immediately afterward, as necessary for your application (mine uses the custom interaction for a PickUp action, yours may not):

Code: ags

	interact_button.Visible = IsInteractionAvailable(mouse.x, mouse.y, eModeInteract);
	look_button.Visible = IsInteractionAvailable(mouse.x, mouse.y, eModeLookat);
	custom_button1.Visible = IsInteractionAvailable(mouse.x, mouse.y, eModeUsermode1);
	talk_button.Visible = IsInteractionAvailable(mouse.x, mouse.y, eModeTalkto);


That's it!  Enjoy.
#3
Hi,

I am trying to modify the verbcoin template for my game such that it only shows the verbs that are available (ie, have functions attached) for any given object.

I have the code that can grab the object into either a hotspot, object, or character variable.  (Let's assume hotspot for now; it's simpler).  I have some code which parses the executable for all the functions that exist (mostly).  However I have just now realized that htspt.Name does not use the script name, but the hotspot's description, which means I can only use this if I always give script names that are guessable from the description, but I'd like to not have to do that.  (Especially since I was planning on sharing this code).

I know this question was asked here, but it wasn't answered - the asker was given a different solution for his/her particular issue.

So: Can I get a hotspot's script name from the script?



If it helps to understand my question, here is the code I am currently using:

Code: ags

		String obj = "NONE";
		Hotspot*htspt=Hotspot.GetAtScreenXY(mx, my);
		Character*chr=Character.GetAtScreenXY(mx, my);
		Object*invobj=Object.GetAtScreenXY(mx, my);
		if (htspt != null) obj = htspt.Name;
		if (chr != null) obj = chr.Name;
		if (invobj != null) obj = invobj.Name;
		//Display(obj);
		if (obj == "NONE")
		{
			interact_button.Visible = false;
			look_button.Visible = false;
			custom_button1.Visible = false;
			talk_button.Visible = false;
		}
		else
		{
			interact_button.Visible = General.FunctionExists(obj, "Interact");
			look_button.Visible = General.FunctionExists(obj, "Look");
			custom_button1.Visible = General.FunctionExists(obj, "PickUp");
			talk_button.Visible = General.FunctionExists(obj, "Talk");
		}
#4
Synopsis: Three friends go hiking in the woods, only to mistakenly enter the land of the fae, a shadowy reflection of our own world.  Before they can return, they must discover something new about themselves, find out what happened to a missing faerie, discover the truth of the past, and make a difficult choice.

  • Puzzle adventure game.
  • Short-to-medium in length. (It's my first AGS game, so I'm minimizing the number of screens (5-10) and animated characters (3ish) but I'm not sure how much exactly that will translate to shorter play-time).
  • Verb coin interface  (Thanks to Electroshokker!)
  • Two endings
  • 1024x768 with a relatively unique style (I don't know yet whether that first part is good or bad).





-------------------------------------------

As of February 4th:

Puzzle design62%(I may make the game longer.)
Sketching50%
Character Art36%
Scene Art24%
Menu Art69%Fonts, and possibly save menu?
Fiddling/Learning15%
Dialog0%
Entrances/Hotspots0%
Puzzle Coding0%

Totals: Spent 32 hours so far, best guess 87 hours remaining; 27% complete

Hoping to be done by February or March 2012, but I tend to be rather optimistic.

-------------------------------------------

And some bonus, in-progress images:

Discovering that the best way to make it look 3D is with folding.My first attempts at making Lindsay's sweater - and a sketch of her in the background.
Setting up to create the forest background.  I wasn't making 20 different trees!I'm probably going to update this later, but my first attempt at a tree with a mirror.

EDIT: Changing the name to match the screenshots.  May change again at some point...
SMF spam blocked by CleanTalk