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

#1
Beginners' Technical Questions / Death scenes
Sun 04/03/2012 18:47:57
Hello AGS worshippers!
I would like to know if there is a logic way of how to make the player restart at a certain point in the room once a death-scene occurred. I am thinking about something like Kings Quest 7. There a new room was created which basically showed “you just died”, an portrait of Rosella/Valanice and then an OK Button. Which is basically no problem. But how do I say AGS where the player starts out after pressing the “Ok” button?
And do i have to create a new "your dead confirmation-room" for each death scene i have?

Thank you very much and may god bless you upon response! ;-P
Fuchs
#2
To put it all in a nutshell, here the proper walk function:
For the Room #1, the Room your chara just entered:
Function room_afterFadeIn()
{
If (cMünchenspastSammyPreviousRoom == 2 ) {
cMünchenspast.Walk(160,160,eBlock,eWalkableAreas);
}
}
Don’t forget to adjust the starting points in the previous room #2

function_leaveRoomBottom()
{
cMünchenspast.ChangeRoom(1, x,y,);
}
#3
I managed a fairly similar problem this way:
I added several regions to the room, and then i used the sidefunction of retions "when walking onto region" then i typed into the script:


function region1_WalksOnto() //automatically created by AGS when you press on the "walk onto region"
{
cMausie.ChangeRoom(2, 1481, 536);
}


This way your character changes to room Nr. 2, and faces the x1481,y536 position. If you want him/her to walk to a certain point you could try the
cMausie.Walk(x,y) command, although i bed if you typed in the walk command the character faces automatically a certain direction, the direction he walked to.
Thats at least the way i would solve it.
#4
I was just thinking, what if i just go in the room and press the button and say "oDoorvisible = false"? Because theoretically, if i create an Object, each object should have only one unique name. So AGS should actually not care for which room the object is in, right?! Maybe if i place the function in the global script?
???
#5
Oh thank you so much! Now it finally works!!!

Does anybody else here know this feeling when something in AGS works just the way you want it to, and then you feel like "jes i am one step further towards my own game!!!"? Its such a wonderful feeling, and for me, as a rook in Scripting its like falling in love for the first time!  :D
#6
I only have one more question concerning the Game.DoOnlyOnce command:
How and where exactly do I put it into the script? Can you give me an example please?! No matter what I do, AGS says that I rather forgot a ( or a ) or that there are not enough parameters in the function (?). So obviously I am doing something wrong! And how do I use modules? ;_;
#7
Thank you very much! I will try this right away!
#8

Hey guys, its me!
This time I have 3 very important questions.
1. First of all:
How can I use multiple items on an inventory item?
I would like to trigger different events for each item I use on another item in the inventory. But once I use the “use active inventory” in the Item-sidebar function I can only add one.
for example:
function iDorn_UseInv()
{
if (cOli.ActiveInventory == iZahnseide){
   cOli.LoseInventory(iDorn);
  cOli.LoseInventory(iZahnseide);
  cOli.AddInventory(iDornmitSchnur);
}
}
But if I try to add another one AGS says “the function UseInv. Is already defined for this item”. So what do I do?
2.
Then I have a hotspot, and at the first time the player examines it he gets an item. How do I turn that function off, after it occurred once?!
3.
The last question would be:
How do I trigger events in rooms the player is not inside at the moments in which they occur. I want the player to push a button in one room, but in another room the door opens.

Thank you very much in advance you guys! I have been trying and working a lot with AGS lately and these are the questions I gathered within a longer period of work. I am sure after I got these things covered I will be quiet for a while! ;-P
Fuchs
#9
Quote from: Mouth for war on Thu 16/02/2012 20:57:33
cEgo.LoseInventory(iKey); (Or whatever your scriptname for your player is) That's the easiest thing to look up in the manual you know

Thank you very much for your fast reply!
#10
Hello guys.
I know this is a weird beginners question but no matter how hard I look for the answer I just wont find it myself.

How do I make inventory Items disappear once I used them in the game???
When my character uses an item I want him to loose it, in the most cases. But what do I do? A simple IKey.Visible = false just won´t work!
I am biting my butt, since I just can´t find an answer for such a simple question!
Thank you in advance guys!
???
#11
Quote from: Ali on Wed 15/02/2012 23:22:25
You can customise how many slots appear in a row and what size you want them by setting these values:
InvWindow.ItemWidth
InvWindow.ItemHeight
InvWindow.ItemsPerRow

The 'Mouse YPos' visibility setting might have the effect you want, of switching the GUI on when the mouse is at the top of the screen. Alternately, you can switch the inventory on and off using this command:

InvWindow.Visible


Hy Ali! Thanks for your reply! :-)
Where can i find the "ItemsPerRow" function? Its not like under the "Item Size" function and i cant see it anywhere else in the optionwindow for Inventory windows.
And the YPos visibly setting is kind of ...not working. I can click on visibly: when cursori is on top of screen, that has the effect i am looking for. But the "when cursor is on top of screen" is a set option, and its the oly one in the property window, i cant change it to "when cursor is on bottom of screen" for example.
#12
Hello everyone!
I started to work on my game and i am doing pretty fine so far!
But now I run into some minor problems concerning custom GUIS (the Manual is not detailed enough and every other tutorial just gives broken links so I need to ask now).

First of all I would like to have an inventory in which I don’t have one big “Inventory Window” which keeps every found object. I would rather like an Inventor in which every single object got a separate slot, much like in this game here:
http://www.arcor.de/iimages/30/art_440x330_V1qFZq+vZILAqlaDimGq8meCkdOK.jpg
If I simply create several “Inventory Windows” in the GUI function then each windows holds the item I picked up. Say I made 6 slots, then I see the object 6 times (once in every window) But I want the object to be only in the first inventory window. Is there maybe a simple function I haven’t seen so far? (my AGS Version is really new)

Further than that I would like to have an Inventory that the player can open by scrolling with the cursor over a certain spot on the screen. Then I want the Inventory to scroll up. This way the Player would not have to go through the Status bar each time he/she wants to peak onto the found treasures. It would be great if someone could help me with that!
So thank you guys in advance! I hope I to find help soon, since I am so keen on going on. Creating a game in AGS is so much fun! (even though I am just a beginner jet)

Fuchs
#13
Quote from: Atelier on Tue 14/02/2012 16:41:34
Hi Fuchs, you must be using the newest version of AGS, and watching outdated tutorials. The command PlayMusic is now obsolete, it got replaced with aMusic.Play, where aMusic is the name of the track you want. Press F1 while in the editor and you'll get a list of commands.
Thank you very much for your quick reply. But there is still a problem: due to the changes of this command, i dont quite know how to set the sound-source.
Lets say i have a machine humming or whatever emmitting from a certain point in the room, how can i tell AGS where this is? (in the old Play.AmbientSound i had the optional x,y coordinates in the () ,where are they now???)
#14
Quote from: Ryan Timothy on Tue 14/02/2012 16:43:46
Because PlayMusic is now obsolete. Look in the manual for Play.

You add the music file into the audio branch of the project tree. Then simply call it by name like so:

aExplosion.Play();

Ah i see, now the Errormessage is no longer occuring. Thank you very much Ryan and Atelier!
Only i cant hear the sound somehow. (usually the sounds i import are really loud and i have to turn them down in volume)
Is the AmbienteSound having the same command? And can i still define its source through the x and y coordinates like it was possible in the old versions?
#15
Hello everyone!
I am rather new to AGS but I went through all of the existing Tutorials on Youtube and also I red the whole AGS-Tutorial/ book. So I feel kind of familiar with the overall idea.
But one thing is really striking my mood down right at the beginning of my project.
When I want to play a sound, any sound, (especially music) AGS just wont let me do this. It appears that in the Script Editor, I am not given the "PlayMusic" or "PlaySound" Command option.
Every time I type it in the error "room1.asc(5): Error (line 5): Undefined token 'PlayMusic'" occurs.
This is strange because I proceed exactly as in the tutorials. My AGS just acts as if there was no such command.
Further than that there is no problem with the files or sound adjustments. As I added the walkingsound in the character View, everything was just fine and the game would play the sound. But I need background music and other sounds and somehow it wont work.
So I hope that some of you might have an idea?! It would be really nice. I am kind of thrown back now that one of the most easiest and important functions seem not to work on my game.:-(
Thank you guys in advance!
#16
Modules, Plugins & Tools / broken link
Wed 08/02/2012 09:40:49
Quote from: Dorcan on Tue 13/01/2004 09:02:45
Timosity's explanations are good, but in this case the "use" button is for selecting the object, so if someday you'll need the "interact button" in your inventory, you can find my tutorial here

http://www.digitalmindstudio.ch/script.php?id=4&langue=en

Hey Dorcan ,the link to your page seems to be not working. Is there a way for me to still see the turorial?!
I am really keen on finding out how to creat a custom inventory, thats one of the most important things for me right now!
Thank you in advance!
SMF spam blocked by CleanTalk