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

#21
Hi and welcome!  I'm pretty new here too, they're reasonably nice folk ;)

Here is what I would start out with, (like I said I'm new... so someone may come along and tell us this is not a good approach).

You can change the cursor for each mode to the same graphic, see ChangeCursorGraphic in the manual.  Then, let's assume that you've got a gui named MYGUI, and use a button in there which is the current mode icon.

Then:
The right-click mode cycling is done in on_mouse_click (see Script->Edit Global Script).
In there, you'll see (assuming you've got the default function), that if it's the LEFT
button, it processes the click, otherwise, it does SetNextCursorMode().

After the SetNextCursorMode() call, you can put something like:
Code: ags

int mode = GetCursorMode();
if (mode == MODE_WALK) 
   SetButtonPic(MYGUI, MODEBUTTON, 1, WALKSPRITE);
if (mode == MODE_LOOK) 
   SetButtonPic(MYGUI, MODEBUTTON, 1, LOOKSPRITE);
etc....

MODEBUTTON and WALKSPRITE etc are the corresponding integers you set up.

I hope that made sense.

I think the above will do, but like I said, it's just a starting point.  You should check out the manual about SetButtonPic to make sure the button behaves like you want (ie, not like a button).  I don't know how to do it other than a button though.
#22
I'm pretty sure the looping you propose is possible.  Something like this code in the room repeatedly execute
Code: ags

if (GetMIDIPosition() == LAST_BEAT_OF_SECTION) {
     SeekMIDIPosition(FIRST_BEAT_OF_SECTION);
}


Or similiarly Get/SeekMP3PosMillis
#23
It took me a while to find that too, the reference doesn't actually say where it is that I saw.
On the Room Settings screen (where you import the room background), right next to the import background button is a button labelled i where you can add Run Script hooks to those events.
And right next to that is a button labelled {} where you can add room scope variables and also edit the functions.
#24
Oh.  I feel silly.  I was under the impression that dumped dialog texts, not the script. I'll try that out when I go home (I don't have Windows at work).

EDIT: that's perfect, I should have thought to try it  :P
#25
General Discussion / Re:Avatar madness!
Wed 14/04/2004 23:36:49
   
And of course the most important bit:
Code: ags
#!/usr/pkg/bin/perl 

$/ = undef;
print "Content-type: image/gif\n\n";

opendir DIR, 'avatars' || die "can't opendir: $!";
my @gifs = grep { /\.gif$/ && -f "$_" } readdir(DIR);
closedir DIR;

open AVATAR, $gifs[int( rand(@gifs-1)+.5 )];
print <AVATAR>;

;)
#26
I've read the manual and I expect the answer is "no", but just in case:

Is it possible to export all of the script from a game into a set of files, edit them externally, and then slurp them back into AGS?

I know I can use an external editor, but that's doesn't accomplish what I'd like.

Actually, if I could just somehow tell AGS to open all existing script files in one instance of my external editor, that would do the trick.  Currently, it's not possible to open more than one script at a time period because AGS blocks waiting for me to close the file (with an external editor anyway).

#27
Awesome game!

Did you know that you can end it prematurely though?

Spoiler

If you pixel hunt you can climb down the ladder without unlocking the hatch!
Then if you go talk to the engineer, he says something about the wrong key... even though he hadn't given me any key at all.... and then the game ends.  I hadn't even found the lego block yet.
[close]
#28
Neat.  A little tedious though :)

I was expecting there to be some sort of puzzle for the poor packet to solve involving trying to get up and down the TCP/IP stack given only the OSI reference model.  "Oh my!  Where'd half the layers go?!"
#29
EDIT: oops, I guess quoting [ hide ] is a bad idea....

Hmm... I think I made a order of operations slip such that you might not always see an important hint.

Spoiler
I think the hint you missed only happens if you try to leave before you've twisted the dead bolt.
[close]

And it makes no sense if you don't read that... so, I learned a lesson about assuming what order people might try things in.   If you'd already seen that... sorry, I didn't claim it was a logical puzzle...
Spoiler
You know why EGO doesn't want to go outside... the rug contains a hint that will solve his anxieties.
[close]

And as for that other inventory item:
Spoiler
it's useless.
[close]

#30
General Discussion / Re:how old are YOU?
Sun 11/04/2004 21:45:35
Yeah, when I was 16 I would have thought it ludicrous that someone couldn't remember their own age.

Wait a decade.  You'll see.
#31
General Discussion / Re:how old are YOU?
Sun 11/04/2004 21:38:28
Quote from: Andail on Sun 11/04/2004 19:15:58
I actually forgot my age for a few seconds.

That seems to happen...

I can't remember how old I am, and I can't be bothered to do the math.   If I wanted to know, I could always look at my profile.
#32
I had a lot of trouble with the baseline for those drawers.  It took me a while to get them to display properly.  It kept happening that one of the lower drawers would be drawn on top one of the upper drawers.  The manual really only described baselines in terms of the EGO (unless I missed something).  

Anyway, the baselines I ended up with made it display correctly (since you can open/close each of the three drawers independantly and they all overlap)....

I didn't even think about the EGO walking through that space with the drawers open though, and I see the problem you mention.  I'll play with it some.  Thanks for the tip.
#33
What's the dead line?

I had an idea for "Papa Smurf" -> "Pop a Smurf"... but it turned out too gruesome... I'm working on something else.
#34
stanger, I'd just like to encourage you not to be afraid of scripting.  Once you get the basics you'll probably find that "Run Script" is the only useful option on the interaction drop-down.

Anyway, with Scorpiorus's example you've got the NPC walking back and forth, and you can use a variable in the room script for when you are talking to it.  Just set the variable when the dialog starts, and zero it when the conversation ends, and add that condition to the if()  in the repeatedly execute method.


#35
I hesitate to call this a "game", it's actually just one and a half rooms with a seriously lame puzzle.  It is just my first attempt at noodling with AGS.  I hope to do something more serious soon.

my first "game"

Thanks for reading this, and if you actually bothered to download that thing and play it, I apologize in advance.

-Bryan
#36
Quote from: Farlander on Thu 08/04/2004 12:12:59
Maybe I am wrong, but I thinki that just the tff (And PS and PSP files, of course) keeps the layers when saving ... Anyone can enlight me?

GIF saves layers too.

So far I've just drawn at the final size / resolution (zoomed way in of course).  For tiny objects that I had trouble drawing for a 320x240 game I did try drawing at a higher resolution and scaling it down, but I didn't like the results.  YMMV

I find layers essential, so I only actually export bmp (or pcx) to a temp file for slurping into AGS.

PS I've only actually drawn about half a dozen sprites and 2 backgrounds so far... so what do I know :)
#37
If I remember correctly, you haven't added a Run Dialog interaction at this point in the tutorial, but you've learned the skill of adding interactions in general.
"Game - Run Dialog" is just another option on that list.

#38
Quote from: SteveMcCrea on Sun 04/04/2004 10:46:40
B) I'd also like to be able to export areas.
Quote from: Pumaman on Sun 04/04/2004 18:43:26
B) I can't see any reason why not, I'll add it to my list if people would find this useful.

This would be incredibly useful as I keep "masters" of rooms as layered images but often make little tweaks in the AGS editor.  That goes for everything (areas, regions, hotspots...)
#39
I'm new here, so by way of introductions: Hi.

Ok.  So this robot didn't turn out quite as I'd envisioned, but since I put the time into drawing it I'm posting it anyway.

               

Nothing to write home about, but I'm new at this.

Edit: do I get extra credit for only using 8 colors?
SMF spam blocked by CleanTalk