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

#161
Costume inventory items
I'm mightily embarrassed- it all boiled down to enabling "handle inventory clicks in script". Once I did that I just needed to add a section in on_mouse_click that handles the inventory clicks
Code: ags
	else if (button == eMouseLeftInv) { // left click within inventory gui over an item
		// player.Say("Now we're over an inventory item.");
		target_inventoryitem.RunInteraction(3); // simulate a click on the target item with the "talk to" verb		
	}

Everything is working as desired now. For future reference, the script in the previous post works with the exception of player.Say call Ashen pointed out, which now looks like
Code: ags
		player.Say("I'm reading a click on the %s.", target_inventoryitem.Name);


Resetting the Cursor
I've experimented with calling reset_left_click from within object/hotspot/character interactions in the past. It works, but as you said it's not a very good solution. So I tried your timer suggestion. The timer is set within the on_mouse_click section every time the player clicks in use inventory mode.
Code: ags
			if (player.ActiveInventory != null) {
				ProcessClick(mouse.x, mouse.y, 4);
				SetTimer(1, 10); // Here's where the reset timer is set
			}
That seems to be enough time for the ProcessClick call to resolve. Then in the repeatedly_execute section the timer is checked and the cursor resets after a brief pause.
Code: ags
	// begin reset timer script
	if (IsTimerExpired(1)) {
	  reset_left_click();
	}
Both of my problems are now solved! Thank you for your patience with my underdeveloped scripting skills. I'll repay the debt by working hard to make a good game and answering questions in the Beginners' Technical Forum!
#162
Critics' Lounge / Re: Sci-fi background
Tue 13/03/2007 06:32:40
Quote from: Stupot on Mon 12/03/2007 22:29:05
Quote from: Sparky on Sat 10/03/2007 05:01:42
maybe [his] crotch should be nudged down a tad? I can't quite put my finger on it.

Haha, you rude person.
Heh, I could stand to have phrased that more neutrally.

I like the new robot. I can't wait to see what sort of surface he gets. Maybe a brushed metal finish would look nice, with banded highlights?
#163
The eyes are much improved! The shaping is a lot better. I like how you shaded the whites slightly.

You might want to make the lower eyelash a little smaller than the upper. It might also look a little more natural if you added a strip of pink inside her lower eyelash. This isn't the best edit, but hopefully it illustrates what I'm saying.


Ildu- what a useful detailed post about hair! There's a lot to learn from in there.
#164
General Discussion / Re: Release Something!
Mon 12/03/2007 05:14:47
I should add that if Kinoko is around and would like to host, I'd be happy to step aside. I have no intention of activity hijacking!
#165
Costume inventory items
OK, here's what I've got so far.
Here's the relevant part of the on_mouse_click section:
Code: ags
		InventoryItem *target_inventoryitem = InventoryItem.GetAtScreenXY(mouse.x, mouse.y);
		// various checks for other types of interactions- hotspots, objects, etc.
		else if (target_inventoryitem != null) { // if we're over an inventory item
			// currently doesn't seem to work
			player.Say("Now we're over an inventory item.");
			target_inventoryitem.RunInteraction(3); // simulate a click on the target item with the "talk to" verb
		}

And here's the unhandled_event section.
Code: ags
function unhandled_event(int what, int type) {
	if (what == 5 && type == 2) { // talk to inventory
		player.Say("I'm reading a click on the inventory in speak mode.");
		InventoryItem *target_inventoryitem = InventoryItem.GetAtScreenXY(mouse.x,  mouse.y); // use it as the cursor
		player.Say("I'm reading a click on %s.", target_inventoryitem);
		player.ActiveInventory = target_inventoryitem;
	}
}

I'm pretty sure I must not have checked "Handle inventory clicks in script" because this doesn't seem to be working at all. None of the player.Say calls go through. Is it too late to change "Handle inventory clicks in script"? I see it in the manual under "setting up the game", but I don't see a way to change it post-creation.

Resetting the cursor
OK, here's the script that's called when the player uses an inventory item on an object:
Code: ags
		target_type = GetLocationType(mouse.x, mouse.y);
		// if we're over an object
		if (target_type == eLocationObject) {
			player.SayBackground("I see an object.");
			// use inventory
			if (player.ActiveInventory != null) {
				ProcessClick(mouse.x, mouse.y, 4);
				reset_left_click();
			}
		}
	
ProcessClick alone works. It uses the current inventory item on the target object. Also reset_left_click on its own works.

This is where it gets slightly confusing- I've placed a couple of player.Say calls to better understand what's going on. When I call the two functions in series (as above), reset_left_click resolves first. Then, after player.activeInventory has been set to "null", the ProcessClick call goes through. It has no effect because the inventory item has been discarded. It looks like this problem has boiled down to getting these functions to resolve in the desired order.

I don't know much about threads, but I think the solution to the problem might have something to do with what thread is running which function. Am I on the right track here?

Thanks for putting up with my floundering about. I'm hardly adept when it comes to scripting, and it's been very helpful.
#166
Question 1
I'll try using "talk to" instead of "interact with" and reply once I've got new results.
Question 2
To clarify, the inventory isn't a popup. It's always visible (as in Monkey Island 2 or Day of the Tentacle). Your second suggestion is spot on. I'll try substituting InventoryItem.RunInteraction and see where we stand.

Thank you once again for your help, this project would be nowhere without the patience of people on this board.
#167
Thanks for the leads, here's a progress update:
Question 1
I've set up repeatedly_execute to do the costume change, which will work for the time being. Is there a more elegant solution? This is graphically glitchy (The item appears as the cursor for a moment before repeatedly_execute catches it). I have a hunch it could be done once per click rather than in repeatedly_execute.
Code: ags
	// within repeatedly_execute
	if ((player.ActiveInventory == iDivinghelmet) || (player.ActiveInventory == iLantern)) {
	  player.SayBackground("The costume switch will happen at this point.");
	  //costume switch code will go here
	  reset_left_click();
	}


Question 2
Here's the function that resets the cursor:
Code: ags
function reset_left_click () {
	player.ActiveInventory = null;
	Mouse.Mode = eModeInteract;	
}

And here's the portion of the on_mouse_click script that calls it:
Code: ags
//script for other verbs goes here
else if (player.ActiveInventory != null) { // if we're in "use inventory item" mode
	// currently doesn't seem to work
	player.Say("Now we're over an inventory item.");
	ProcessClick(mouse.x, mouse.y, 2);
	reset_left_click();
}
The reset function seems to reset the cursor correctly, but it's impossible to use in inventory item on anything.
#168
Hello everyone,
I've got a couple of inventory related questions. For reference this project uses no verb buttons- left click is multifunction and right click is look.

Question 1
Currently a left click on an inventory item sets the cursor mode to 4 (use inventory) and sets ActiveInventory to that item. That's fine and dandy most of the time.

For certain items I'd like to alter the default behavior. I'd like a single click on a costume item to automatically change the player's outfit. So if the player were to left click on "sombrero," the character would put on a sombrero instead of changing the active inventory item to "sombrero". How might one go about this?

Question 2
When the player uses an inventory item on a target, I'd like the cursor to return to the normal mode. I've got a function written that changes the cursor mode and resets all the necessart variables. I've been trying to call this using the on_mouse_click script, but I seem to be going about this wrong. Currently if the player uses an inventory item on a target the cursor resets before the interaction with the target object/hotspot/player happens. So by the time the target receives the click we aren't in "use inventory" mode anymore. The cursor resets, but all "use inventory item on" actions are impossible. How can I get around this?
#169

Baby mothra tries not to step on cars on the way to her birthday BBQ, which is to be hosted by her good friend Mr. Johnson of 232 Maple St.
#170
Critics' Lounge / Re: Sci-fi background
Sat 10/03/2007 05:01:42
Quote from: Snarky on Sat 10/03/2007 04:10:59
I already did. It was called "Beneath a Steel Sky"  ;D
Except this has better sprites!
I love the sprites. They have heaps of character. The colors are vibrant but not too oversaturated. The female character has a nice dynamic, asymmetrical pose. It seems to me there might be something slightly odd about the male character's legs; maybe his knees and crotch should be nudged down a tad? I can't quite put my finger on it. He looks great though, I hope my sprites come out that good.

As for the background, I like the overall style. The arrangement of furniture feels pretty natural too. I have a perspective question- is the couch part way down the right side of the room? Because it feels like it is, but I'm thrown off by the way the armrest is perfectly in line with the line between the back wall and the floor.

Quote from: Postmodern_Boy on Sat 10/03/2007 03:50:09
Looks good!  ;D  The only thing that I think looks a little strange is the sofa in the second picture.  It is elevated off the ground and the light source seems to be above it, but it casts no shadow at all.  Looks great though, I would definatly play a game that looks like this.
Maybe I'm wrong, but I think I'm seeing a faint shadow beneath the couch. I also think I see one coming toward us from the table/console/machine in the center, and another being cast by the planter on the wall. If you're choosing to keep your shadows faint I can totally respect it. If, on the other hand, you'd like to have them be a strongish element I'd recomment darkening them a little, maybe only the deeper parts of them.

Here I again worry that my comment is not in keeping with the style you've established, but I wonder if some larger scale lighting might be fun. There are lots of great small scale lighting effects, like the highlights on the tiles and the couch, or the lighting along the grooves in the walls. But if you were to zoom out to, say, 1/8 scale the lighting would be relatively uniform. What do you think about strengthening some of the bigger elements (exaggerating the shadow in the rear right corner, brightening the lit part of the right wall more, varying the lighting across the sections of the left wall, etc.)?

Great work.
#171
Ali, thank you immensely for making such a charming, stylish game. The art was extremely consistent. The dialog was entertaining and obviously received a lot of love. Many lines were truly top knotch.

Since you asked, I'll offer some tiny nitpicks. But don't get me wrong, I loved this game and will be first in line if ever you should decide to release another. OK, on to the

List of hopefully constructive hypercritical feedback
One tiny technical complaint is that some of the characters were antialiased into the background, but others (including those that walk) weren't.
Most puzzles had ample dialog and object descriptions surrounding them, and the solutions were very intuitive, however
Spoiler
I felt that the 'circumnavigate the world' puzzle could have been improved by some more dialog that reinforced the idea that the DLA members were nearly blind.
[close]
There were also a couple of moments when the game accidentally revealed future puzzle solutions:
Spoiler
In the first visit to Saul mine, Nelly's nonstandard response to "use heavy rock with pipe" tells the player the pipe will need to be smashed in the future even though there's no puzzle around it yet, in Bjorn and Olaffsen's, the iHook dialog implies that Nelly will need to obtain it even before the Hook-a-Duck stall opens, and on the tower rooftop it's possible for the player to smash the pipe open before deciding how it will be helpful, which tells the player that there will be a future use for the pipe.
[close]
Regarding the way the map was implemented: I liked being able to jump instantly between rooms, but I thought it was interesting that you didn't also provide walkable exits that lead to the map screen (as in the Monkey Island games).

QuoteI haven't heard the word 'derivative' used once. Shame on you!
I felt like the whole game was such a conscious homage that I wasn't overly bothered. It brought its own charmingly zany slant to the subject matter, and it had a well developed visual style. I'll be honest and say there were a few occasions when I felt ideas had been lifted a little too unaltered from other games:
Spoiler
The bar with different pirate themed mixed drinks, the "prove you are a pirate" puzzle, the pirate knick-knack shop complete with a pet bird, etc.
[close]
You treated the pirate theme excellently. I'd love to see a game by you in an all-new setting of your own design!


But enough hemming and hawing. I sound like a grumpy old man, but this game makes me feel like an excited five year old. Great work, way to follow through! Congratulations on a job well done!
#172
Thanks Ali and mOds! Hip hip hooray! I'll post my gushing praise comments after I've given it a whirl.
#173
ABOUT RELEASE SOMETHING:
This isn't a competition as such, just a big free-for-all where we can all showcase our talents. Basically, a date is set for "Release Something!" Day and on that day, people are invited to post to this thread anything they like, really. For example, some sprites,  screenshots of your game, music, sound effects, backgrounds, rooms, a plugin, a storyboard, a demo, or if you can manage it, a full game. Heck, even if it's 95% done or 1% done, if you wanna release it, you go for it!

This round will begin March 26, and end on April 5. Hopefully that will be long enough, but feel free to ask for an extension if you really need one. Anyone working on a project is encouraged to post. Best wishes to all!

Edited:Date changed.

#174
I've had problems with that too. Somehow AGS has decided that your background color (which sounds like it was transparent in the original picture) should be displayed as opaque. When you imported your sprite, what option did you select in the "Transparent color" pull-down?
#175
That worked perfectly. Many thanks, Gilbot!
#176
I found an old thread that covers this:
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=20109.0
It seems it was written for the old LoseInventory function, and I'm unsure of how to rewrite it for Character.LoseInventory. I first tried the following loop:
   int i = 0;
   while (i < Game.InventoryItemCount) {
      player.LoseInventory(i); // error here
      i++;
   }
When I tried to compile AGS said "Type missmatch: cannot convert 'int' to 'InventoryItem*'. The error was in the line with the Character.LoseInventory call. So I tried this:
   InventoryItem *i = 0; // error here
   while (i < Game.InventoryItemCount) {
      player.LoseInventory(i);
      i++;
   }
Now when I compile I get the same error message, but it points to the variable declaration. As in the past I apologize for my scripting inneptitude.
#177
It sounds like Hotel Dusk is pretty well appreciated around here. A local friend of mine just got it, and he seems pleased so far. I think I'll give it a try. I'm also looking forward to the new Phoenix Wright.

Scotch: regarding Touch Detective's appeal, I can understand how the art style could be hard to stomach. It's unrepentantly cutesy and weird. I used to hate art like that. If you're OK with the art direction, I feel there's a lot to appreciate. The art is really quite well done and meets its own goals well. I wish the same could be said for the puzzle implementation...
#178
I think pretty visually, so for my current project I started with a crude map of the different areas, and charted the key puzzles and plot points. Then with no code and no final assets, I pretended I was playing the game. As I went I took notes on what needed doing and what assets needed to be created.

As work has progressed the biggest difficulties have come up around wanting to replan sections of the game. I'd recommend coming up with a detailed outline you're really happy with before doing any final assets.
#179
I borrowed the first (US released) Phoenix Wright a while ago, and just found a used copy of Touch Detective yesterday. Both are enjoyable if not outstanding titles.

I found Phoenix Wright to be a little inelegant, mostly linear with slightly awkward puzzles. There were many times I knew what the solution to a puzzle was, but found myself going in circles figuring out which dialog choices to pick in order to arrive there. The dialog was a little ham-handed too. The backgrounds were good if uninspired, the character art was stylish but I felt not as well executed as it could have been. Overall I enjoyed the storytelling. The plot is goofy and cliched, but it's presented well enough that I got caught up in the moment  to moment drama of it. There were quite a few satisfying eureka moments. I enjoyed the music as well, it was silly and energetic and fit nicely. Overall it was an enjoyable game with slightly less than optimal execution.

Touch Detective is a very different animal. I've not yet finished playing through, but so far I'm loving it. The stylishness of the presentation deserves mention first. The backgrounds are cartoony with thick outlines and watercolor-style shading. There are huge amounts of tiny details, and the rendering is immaculate. The characters, though prerendered from 3d models, suit the backgrounds fairly well. Their heavy outlines help them blend in, and the character design is in keeping with the background style. I generally prefer hand-drawn characters, but I wasn't at all disappointed. As for gameplay, the game succeeds in entertaining but has shortcomings. There are very few custom responses to clicking on objects, and almost none for using one object on another. On the bright side, the characters are engaging and consistently funny. Almost everyone is quirky in one way or another, and the dialog frequently plays one character against another in fun ways. The humor is mostly lighthearted situational comedy, but there's occasional slapstick and some humor around the world itself, which is downright bizarre (immortal butlers, dream cakes and talking sharks). In all I'm finding it a lovable specimen of the genre. If the dialog were slightly wittier and there was more custom dialog for random actions (use brick on Penelope, etc.) it would be pretty near flawless.

Niche DS titles such as these are getting a decent amout of mass market attention lately. What are your thoughts about the market or platform's effect on the adventure genre? What are your impressions of these or other DS adventure games? Do you have any recommendations?
#180
I've been through depression myself, and I know a number of people who have dealt with it or are dealing with it.

I second what LimpingFish says about Xanax- I know someone who's had trouble with its addictive side.

Regarding losing one's personality due to medication- wow, people here have some extreme stories. But as Yutzster says, there are a lot of different medications ranging from harmless to incapacitating. Judging by her first post it sounds like she knows what she's talking about. Things like Citalopram or LimpingFish's Seroxat (SSRI's) are generally pretty benign.

I hope this isn't an issue for your friend, but I thought I'd ask. Is it possible he's using alcohol or another drug as an escape? I have a friend with linked addiction problems and depression, it's a big mess sometimes.

I personally would stay in touch. But I would be clear about boundaries, and make sure I wasn't encouraging my friend to be unhealthily dependent. He's lucky to have friends like you and your boyfriend, I'm sure some part of him is thankful even if he's not vocal about it and is outwardly jealous of your boyfriend.

When I was depressed in the past, I often wouldn't go out with friends, and I would respond to affection much the way your friend does. I would act in ways that kept me unhappy. Being passive and hopeless felt familiar and safe. I sat in my dark room listening to NIN with the shutters closed, staring at the computer and dwelling on how terrible everything was. I hung on to the bad things that had happened because I was afraid to move on and create a new life for myself.

If he's too hard to be around it might be necessary to spend less time with him or simply tell him you can't be friends with him this depressed. It would be a shame to lose a friend that way, but you have to draw the line somewhere. I hope it's a temporary depression, it sounds like he was a really wonderful person to be around until recently. Best wishes!
SMF spam blocked by CleanTalk