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

#221
I understand how the inventory buttons work, except that I can't see how ints 'button' and 'interface' are set.Ã,  I'm not sure why two buttons should be added though- what would they do?Ã,  The default inventory hasn't got two extra buttons as far as I know.Ã,  I put the above two lines of script into game_start and the game will run, but no difference.Ã,  I don't understand what causes the problem.
In case it helps, I had deleted the two scroll buttons, however they are the last two objects in the inventory GUI and I've 'commented' out that part of the script anyway.Ã,  I'm pretty sure that wouldn't make a difference as the script is only run when the buttons are pressed.  The inventory only holds three items (the player can never end up with more than three items anyway).  Each item image is 64x64 as well.
Looking back at another GUI I made I noticed that the same problem was there, and that one had plenty of room, only the graphics were modified I think.  Is there an important thing that is missing between a custom inventory and a default inventory (some sort of clickable area)?
#222
I've tried using the script, yes.  I've tried modifying it a bit too, but the underlying problem is that I don't understand where the two GUI buttons come in, which makes the script more or less useless.
#223
If you are really going to move away from the adventure-style games then I'd suggest using either a different program or learn a programming languge (or use one if you already know one).  I don't think AGS provides much for anything other than adventure games, and so the game will be quite limited.  Learning a language will make your game much more flexible, and provide you with a base to make lots of other games in any genre.  If you're not up for learning a language then you could try using Game Maker (http://www.gamemaker.nl) which allows for any genre of game, however I don't think it's as intricate as AGS and I've seen so many more n00bish games from GM than AGS.  I'm not trying to put you off AGS, you might make a game that covers new ground for the community, however there are also alternatives.
#224
If I remember correctly it's just 256 colours, same size as your normal rooms.  Walk-behinds can be done, yes.  Try using black for transparency and say, blue for the mask part.  You could probably use any two colours.  Make sure you save it as a supported format, I'd recommend .png files (and for everything else too) as they're small and efficient, and can be optimised.
#225
esg - you could try making an object with the image as the text pasted onto it.  Image should probably be full screen size, but as it's only about 4 colours it won't be too big.  Say the text was object 0, you could make it turn on object 0 when necessary, and the finish the script there.  In the interactions for object 0 you could make 'Any click on object' remove it and then either run a new script or cycle to another object with more text on.
Alternatively you could use WaitMouseKey, and set the timer to a period long enough for anybody to read the text.
It's a bit inefficient, but it should work.  You should probably try a different way if you have lots of text though.
#226
I don't like to drag the topic up again, but at the same time I don't want to create a new one.  My initial problem still stands, however I'm not sure how Radiant's suggestion works.  And suggestions or help would be appreciated.
#227
I've never used sounds before, so I can't be of great help, but are you using the same sort of scripting for the other sounds (as opposed to making it play the sound with the drag-and-drop interface).  I had a problem with my MIDI in that it played but was sort of corrupted by another program I used and made it un-loopable.  Try copying ony of your other sounds and renaming to SOUND50.WAV.  You could also try adding this loop to your script in case moving to another room will cut the sound short:

while(IsSoundPlaying(50) == 1) {
Wait(1);
}

That will pause the game until the sound is finished.
#228
I assume you mean game.top_inv_item?
I'm confused though.  I couldn't find += and -= in the Operators section.  Do you mean >= and <=?  Anyway, I'd be grateful if you could explain what the script does a bit, and also I can't see where I'm supposed to integrate the objects, or what the objects could do.  Thanks for the help so far though, I do appreciate it.
#229
Competitions & Activities / Re: August MAGS
Fri 13/08/2004 10:39:25
I get the same problem.

One other thing though- can entrants vote for their own games?  It might be a bit unfair if someone votes for their own entry while another votes for somebody's else's because they weren't sure if it was cheating.
#230
I've modified the template inventory and in the script changed the inventory type to custom.  All works well except for a small problem - the bottom half of inventory objects aren't selected when clicked.   I don't have any buttons or anything blocking the way, the listbox is on it's own, and far from the bottom of the window.  If I change back to the default inventory gui in the script then it works fine.  I haven't added any extra scripting for my custom inventory though - just moved some things about, deleted some objects and changed the appearance.  Am I missing something from the default inventory scripting that would make the objects fully clickable?  I'm not too bothered about getting the selector to work.  I took a look at http://www.adventuregamestudio.co.uk/yabb/index.php?topic=14752.0 and tried it out, but I couldn't seem to work it and it's probably a bit too complex for me right now.  All suggestions welcome.
-Sim
#231
I'd suggest that if you're new to AGS you should go to the Palettes tab and change the game to High-Colour.  I've never used 256-colour, mainly due to the limitations of it.  I'd assume that makes the program reject anything other than 256-colour images, thus causing your problem.  Import a background that is the same size as your game resolution for now (i.e. 640x480 if you chose that as the resolution).  If you are using MSPaint this will be shown in the Image > Attributes menu.  I get the problem about the background size being too big all of the time, and it causes me no problems.
#232
A few suggestions.  Some are pretty obvious but maybe it's one of them:

-Try clicking around your hotspot.  The active point on the item cursor may be in some illogical place like the handle of the key instead of the end.
-Make sure that the Value in the condition is set to the correct inventory number.  Remember that the first inventory item is #1, not #0.
-Make sure that child action is absolutely correct.  It is possible that it may be working but the action just isn't working how it should.
-Make sure you are editing the correct hotspot number
-Make sure that nothing is disabling the hotspot (don't worry about that if this is the only thing going on in the room)
-Make sure that you haven't changed room in the editor without saving.  Check again to make sure that the interaction is still there.
#233
Nothing worked for me, I tried all sorts of combinations and the ones you suggested.  Then I tried another piece of music and it looped fine  :-\
The piece I was going to use wouldn't even open in Evolution Audio Lite (the music program I originally created in).  I found out that that was because another program I used to change the tempo afterwards made it completely unreadable.  Luckily I had some backups with an old copy of the tune though.
So I've found out what's wrong.  And remember - don't use MIDIStudio unless you're prepared to have a corrupt MIDI.
Thanks though Radiant :)
#234
Beginners' Technical Questions / Looping music
Sun 08/08/2004 21:02:31
I have a MIDI file that I want to loop in my game, however it won't loop.  I've tried using  SetMusicRepeat(1); in various places - the game_start function in the global script, on entry of the menu 'room', the first time the first playable room is loaded.  The MIDI I want to loop begins in the first playable room, but I've tried setting that as an adjacent room.  I did once get it to repeat in the adjacent room, however after some more experimenting I tried to recreate this and couldn't get it working again.
I've noticed that some script functions seem to take 'time' or something.  In another circumstance I found that SetWalkableArea wouldn't toggle a walkable area when it was in the same script as the action, or even in the same conditional block.
I've also tried making a repeating if loop in the repeatedly_execute function.  I'm not sure if that should work, but it didn't, and it might've crashed the game, I can't remember.
When I put the SetMusicRepeat(1) in the game_start function it makes that game crash after a few seconds of wandering, and also putting PlayMusic in a room script.  By 'crashing' I mean that the game closes and a pop-up box says that the game didn't shut down properly.  I've tested several times and each time it crashes.  Maybe it's coincidence, but I don't understand why it does that.
I noticed that in the help manual that the value of 1 on SetMusicRepeat is also default, however even without this line in the script there is still no repitition.
Thanks,
-Sim
#235
Thanks, that seems to work alright.
I wanted to lifts because I thought that otherwise there would be a quick jitter as the lift moved to the right position, or wouldn't that be seen?
Thanks again for the detailed answer :)
#236
I have in my game a lift mechanism which spans three rooms (actually the third, top room isn't finished).Ã,  The lift travels through a middle room, which is just a blank room.Ã,  I can make the lift part work and the player move with it, but I'm having trouble setting a lift direction in the middle room.
I've decided that when the lift is activated from the bottom, it sets a variable lift_entry to 0, meaning that it came from the bottom.Ã,  If it is activated at the top it'll be lift_entry = 1.Ã,  The middle screen will have two lift objects, one at the top and one at the bottom.Ã,  When the player enters the middle screen, a script will run.Ã,  If lift_entry = 0, it'll delete the top lift object and set the bottom one and the player moving upwards.Ã,  If lift_entry = 1 it's just the opposite.
A recent topic in the forum covered SetGlobalInt and GetGlobalInt which I weren't aware of.Ã,  I've put these into my script but I don't understand exactly how these global integers work.Ã,  Here's what I have so far:

Bottom screen - Player walks off top screen edge
(Go to middle room)
Run script:

SetGlobalInt(10,0)


Middle screen - Player enters screen (after fadein):
Run script:

GetGlobalInt(10);
if (GlobalInt(10) == 0) {
DisplaySpeech(DARREN,"J");
}
else {
DisplaySpeech(DARREN,"K");
}


I've just made the character say 'J' or 'K' for now.Ã,  'J' for bottom and 'K' for top.
The GlobalInt bit inside the 'if' part is made up, and it won't compile in the script.Ã,  What should I put in there, because this integer doesn't have a name (it's just global integer 10).Ã,  Do I have to assign a name or something?

Thanks in advance.
#237
Competitions & Activities / Re: July MAGS
Mon 26/07/2004 18:43:44
Agh!Ã,  I clicked the cat burglar link on Klaus' post to try and download it and then realised that it's the voting page!
I couldn't seem to download the cat burglar game either.Ã,  I have played the other games though but I can't vote anymoreÃ,  :( sorry
#238
Sorry to seem rude by dragging this topic up again, but I was afraid that it would disappear down the list without being answered.  Thanks again though for the replies.
#239
I had this problem too.  When you import your image AGS wants to make a colour transparent.  You'll find it in the import options.  By default it makes every colour the same as the top left corner pixel colour a bright purple, which will actually be transparent in game, not purple/pink.
If you actually want the background to be the colour it is then open up your image, change the top left pixel to some colour that isn't used, and then import it again.  If you're really bothered about the top left pixel being transparent then set the GUI background colour to match it.
#240
Hooray, no crashes anymore!
But I've got more problems still.  Maybe I'm not looking hard enough for the answer.  Anyway, here are my questions:

1) The LucasArts hotspot labels (at start of previous post)

2) While the inventory window is on, the hotspots still show up beneath it.  The only useful thing I can find in the help file is DisableHotspot, but it seems very inefficient and would probably slow the game down to disable every hotspot in the game and re-enable them after each time the inventory window is toggled.

Thanks for the replies.  Sorry for all of the newbie questions!
SMF spam blocked by CleanTalk