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

#521
Quote from: wonkyth on Sun 20/04/2008 22:36:11
Yeah, I thought of that, but I can't remember how to bring up the place where you do that.
1. Open up your room and at the top where it says "Show this room's:" choose objects from the drop down list. Your key should appear in the room along with any other objects you have in that room.
2. Either click the key or choose the key object from the drop down list between the project tree and properties box on the right to select it.
3. In the properties box, under design, find the "Name" property. Set this to "oKey" (no speech marks).

Generally its useful to stick to a naming system when you make new things in your game, so for example sticking a small "o" in front of the names of all the objects, "h" for hotspots, "i" for inventory items, "c" for characters, "g" for GUIs etc etc. You don't have to do this (instead of the above steps you could just change all references in your script to "key") but its a good habit to get into and the manual follows this pattern.
#522
That's really interesting, thanks! Especially the notes on design and the comments of the people involved.
#523
Thought I'd chime in here and just say that while the demo was a little buggy and there were a few things that I would have done differently (which is purely down to my interpretation and style and saying nothing bad about your game), there was a lot I did like and I'm now very much looking forward to it. Keep up the good work ;D
#524
Nice, didn't know about that function.

Just thought I'd add that instead of doing
Quote from: TwinMoon on Fri 11/04/2008 15:56:26
What I usually do is declare a variable at the top of the globalscript, in your case something like:
Code: ags
bool EnvelopeOpened;


in game_start you put:
Code: ags
EnvelopeOpened = false;


You can just do
Code: ags

//top of global script (or room script if you don't need to know if the envelope has been opened in any other rooms)
bool EnvelopeOpened = false;

which declares the variable and initially sets it to false.
#525
You're using AGS 3.0 yes?

To add a cursor you right click the mouse cursors tree and choose New Cursor. To remove a cursor permanently (careful, if you've referenced it anywhere in your script you'll probably break your game :)) you right click the cursor and choose Delete This Cursor. To remove a cursor from, say the default right-click cursor cycling thing (the mouse.SelectNextMode(); function) you do mouse.DisableMode(eModeWhatever); and likewise you can re-enable it with mouse.EnableMode(eModeSomething);. You'd probably want to do that kind of setup in the game_start function in the global script, which is called before your first room is loaded.

Now, writing code for when the user clicks on an object with the new mode... your new cursor mode doesn't appear in the list of events (something to be requested perhaps?) so you have to use the 'Any click on object' event and write something like.

Code: ags

function oThing_AnyClick()
{
  if (mouse.Mode == eModeNewCursor){
    //do something
  }
}


Basically when the user clicks (with any cursor) on the object the game checks to see if the mouse's current mode is the New Cursor mode, then runs the stuff inside the if function if it is.
#526
General Discussion / Re: Sound library?
Sun 13/04/2008 00:56:50
Last time I wanted sound effects I went to some website, frowned over the licences, listened to most of the things that looked like they could fit then pulled out my microphone and made noises into it and dragged it along my desk for a bit. Sounded way better than anything the site had.

Seriously, download Audacity, get a microphone and experiment with the sort of sounds you can make with household objects and changing the speed and pitch.
#527
General Discussion / Re: Grand Theft Auto IV
Sun 13/04/2008 00:49:52
Quote from: Mr. Psychopath on Sun 13/04/2008 00:47:18
I have yet to play ANY of the GTA games. Might as well just start with the first one, I guess.
I believe 1 and 2 are free from Rockstar, or at least they were. Didn't take to them much though. I've yet to play one of the 3D ones, but I'm liking what I've heard of IV so far.
#528
Anyone else come across this?

http://www.telltalegames.com/company/pressreleases/id-65

It seems Telltale Games (of the new Sam and Max series fame) have teamed up with internet flash animation giants www.homestarrunner.com and Videlectrix (the guys who've made a load of the homestar runner games, including a couple of text adventure games) to make an episodic series of point-n-click adventures starring Strong Bad. Available for the Wii and PC.

I'm excited ;D

Edit: Homestar runner version of events: http://www.homestarrunner.com/sbcg4ap.html
#529
There's not inherent difference, they're just two different cursor modes with two different names. It just depends on what code you add to them. In this case you'd add code for the interact mode as a 'use' (the player might say "I can't use it" for instance) and code to the pickup mode as a 'get' (the player might take the object). Nothing's set in stone though, if you wanted to you could add the pickup code to the look cursor, and the player would take the object when the user looked at it.

There are a couple of cursor modes that are a bit different (like walkto, pointer, wait) but generally speaking the modes are down to how you interpret them.

Oh, and you can disable the modes you don't want to have in your game, and make new modes if you want some extra ones.
#530
But then you can't tell if they pressed the shift key to get a capital or not?
#531
General Discussion / Re: Bye-bye Intarweb :(
Fri 04/04/2008 08:59:10
Sorry to hear about that, I hope everything works out alright for you.
#532
Hey, long time no see MT. Since my last post I've done another project, messed up a couple of exams and decided that bar code is two words. Revision for the next lot of exams - 5 of them - is in full swing and its depressing, and also very hard.

On the plus side we've started a 'Programming Skills' module which is by far the most fun thing on my course at the moment. Its still not proper Physics with Computing though, because every physicist does it. Its learning C, and thanks to good old AGS and its sort-of-C++ language I've already got a head start on the syntax. At the moment though I'm having issues with the most simple things, because the stuff we are being taught is very narrow. Example: I want to write a list of integers to a file then read them back in again, but I can't figure it out because all we've been taught to do is write one variable to a file, or a string to a file.

Otherwise life's pretty uncertain. I'm supposed to be taking a year out in industry next year, but I've only got one interview left. If I don't get that, or if I fail a bunch of exams this semester, I'm not sure what I'm going to do. No doubt it will all work out.

Right, I've taken up enough of your time MT.

Thanks
OneDollar
#533
8-bit is still there, AFAIK there were one or two bugs that were discovered late (and may or may not still be in the 3.0 release) because very few people were testing 256 colour games in it, but reguardless they should be gone by 3.01.

I'm using 3.0 because I love the new editor, layout and primarily the removal of the interaction editor which I found annoying. Then again I don't know anything about making my games compatible with Linux/Macs etc.
#534
I guess its up to me to lower the tone with everybody's favourite adventure game solution!

x1     x2

Because all locked doors always have the key left in them and turned to the correct angle for pushing out with your screwdriver, and all doors have a gap big enough to pull a key under on a newspaper. All doors.
#535
Your second SetTimer(1, 800); is outside the if (IsTimerExpired(1)){ loop, so on every game cycle the timer is reset to 800, and so never expires.
#536
Most of my physics lecturers seem pretty excited about CERN and the LHC, and none of them have suggested to us that the world might end because of it. Still, 'physics destroys the earth' is probably not a good line to get more admission fees.

Quote from: Mods on Thu 03/04/2008 02:13:28
What this suggests, if they are able to re-create the big bang, which could produce a black-hole, would mean opening a completely unseeable dimension up onto our planet, even if for a brief second.
Who wants to be Gordon Freeman?
#537
Ah brilliant. No doubt I'll be back on here when I get stuck with the next thing, but thanks for the help SSH
#538
Okay, so if I declare
DynamicSprite *sprite = DynamicSprite.CreateFromExistingSprite(2, true);
at the top of my global script, stick
export sprite;
at the bottom, how do I import it into my room file?
import sprite;
wants a variable type.
#539
Thanks, that makes sense. Am I right in guessing that you have to do all drawing functions either in the global script or in a room script then, with no way to export dynamic sprites?
#540
I've started trying to learn the drawing commands in AGS and I'm getting a bit stuck. What I'm trying to do at the moment is permanently change an object/button/GUI/whatever's sprite. What I have so far is...

Code: ags

// room script file

function room_AfterFadeIn()
{
    DynamicSprite *sprite = DynamicSprite.CreateFromExistingSprite(2, true);
    DrawingSurface *surface = sprite.GetDrawingSurface();  
    surface.DrawingColor = 14;
    surface.DrawPixel(1, 1);
    surface.Release();
    oObject1.Graphic = sprite.Graphic;
    Display("Click to continue");
}


Which is more or less copied out of the manual. This works fine up to the Display part, then the object's sprite is deleted. Presumably this is because the sprite pointer is unloaded and so the sprite is lost, so I'd need to make the pointer global. Question 1: how do I import the sprite and surface pointers into a local script (i.e. what varaible types should I use?)

Also, I don't really know what I'm doing with the drawing functions, so is this the right way to go about it?

And yeah, I know I should call sprite.Delete() when I've finished with it.
SMF spam blocked by CleanTalk