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

#641
The Rumpus Room / Re: Name the Game
Sun 01/02/2015 04:58:40
Policenaut?
#642
As that particular line is spoken in the 'else' part of the 'if (player.ActiveInventory == inventory[15])' clause, that part will be executed whenever the item used is not #15, as in the case when the item used is #16. I don't know why it's not spoken(as you mentioned) when the item used is #14 though.

This happens for item #16 specifically because the 'player.ChangeRoom()' function will not be executed immediately at where it's called, as stated in the manual:
QuoteIMPORTANT: This command does not change the room immediately; instead, it will perform the actual room change once your script function has finished (This is to avoid problems with unloading the script while it is still running). This means that you should not use any other commands which rely on the new room (object positionings, and so on) after this command within the same function.

If that else part is to be executed only when the item used is not either #14, 15 or 16, you should do a proper chain of if-else if's:
Code: ags

  if (player.ActiveInventory == inventory[16]) {
    //Blah!
  } else if (player.ActiveInventory == inventory[14]) {
    //Blah Blah!!
  } else if (player.ActiveInventory == inventory[15]) {
    //Blah Blah Blah!!!
  } else {
    //Blah Blah Blah Blah!!!!
  }
}

#643
Just a random idea. Check whether there are delays set for the walking frames and whether these values match up in both loops, and also whether anti-glide mode is on. As when anti-glide mode is on, the character will only move when the animation frame changes, so if one of the loops has more delays than the other the character will walk slower in that direction.
This is what I can think of at the moment.
#644
You need to elaborate on how it "doesn't work", otherwise we cannot help much by blind guessing.

One common problem people having is you cannot just type the codes in the script to make them automagically work. You need to link the functions to certain events. In this case, the On_Activate event of the Textbox, as illustrated by the following figure.
[imgzoom]http://i488.photobucket.com/albums/rr249/gilbot/tb_events_zps3d9c2234.png[/imgzoom]
First, click the Event icon (the lightning icon) of the Textbox's Property window. Then, click the '...' icon of the On_Activate event and a new function will be created in the script. You may then copy or type the codes of this function's body.
#645
Nice!

Could be a good idea if you submit your findings here.
#646
Two things to check:
1. This may not matter that much in this case, as your player character may always be cEgo anyway, but for consistency it is advised that the cEgo in line 5 be changed to player, like line 3. This could prevent problems that if you say, decide to have the player able to control another character later.
2. As Monkey mentioned, you need to provide complete codes, at least state where the ActiveInventory of the player is changed, otherwise we cannot help you. For line 5 and line 6 to "not work" it is possible that the player's ActiveInventory is never iKey for some reason.
#648
Congratulations to Baron for becoming the GRAND SLAM WINNER of the Short Story Competitions not for once, twice, but... THRICE! :cheesy:
#649
The Rumpus Room / Re: Name the Game
Thu 18/12/2014 14:43:26
Metal Gear Zelda :=
#650
You meant this?

A number of people (including and, especially, me) were against this idea so it never took off.

Trophies just aren't mandatory, so the hosts of activities can do whatever they like to.
#651
Great thing someone finally decides to bring this up again.

Quote from: beeblebrox on Wed 17/12/2014 01:40:41
(if that is still allowed?)
What? Trophies are pretty welcomed here!
#652
The Rumpus Room / Re: *Guess the Movie Title*
Thu 11/12/2014 02:05:08
I thought that was Leisure Suit Larry!!!

:= <-- Not this Larry, no.
#653
A lot of real advantages. Palette effects are the most obvious examples.

I haven't read all of this thread yet, but I vote for converting the graphics by the engine other than by the editor, as colour depth conversion is basically a one-way operation (e.g. when converting an 8-bit image to 16- or 32- bit you lose all palette information, and any decrease in colour depth is a lossy operation). To have the editor do this for you (unless you explicitly tell it to do so) means you are ruining the original assets.
#654
The Rumpus Room / Re: Name the Game
Tue 18/11/2014 18:30:54
Oh sorry, I was in a rush and misread it as a game called Captain Mostly. :tongue:
(Afterall there was a fan game called Captain Muchly Drinks Bleach.)

Anyway it's Babar's turn.

Edited: Fixed name of said fan game and linked to the the AGS db entry.
#655
Can you post the part initialising those variables?
#656
The Rumpus Room / Re: Name the Game
Mon 17/11/2014 10:42:18
All right. I might post more hint when I'm at home. I am currently freezing in the office...

Edit: Okay. Here it is:
[imgzoom]http://i488.photobucket.com/albums/rr249/gilbot/create_zps2aafd689.png[/imgzoom]
#657
General Discussion / Re: Ahem
Mon 17/11/2014 08:39:40
Seems that the mouse control isn't scaled to the window's area when it's run windowed, making it very hard to move, and like when you want to trigger a switch you need to click, but oftentimes the mouse cursor is outside the window's area, making the click register on whatever window is there and make the game lost focus.

Also, it's too dark under this crappy monitor here. I couldn't see a thing 90% of the time.
#658
Quote from: KodiakBehr on Mon 17/11/2014 04:27:28
It was a text file I converted to a .dat.
By 'converted' did you mean really converting to other format, or just renaming the file?
If it's the latter then the .dat file is still a text file then the aforementioned function should work, but if it's the former then the resultant file is probably not a text file anymore, which as specified clearly in the manual, not handled by the function:
QuoteNOTE: this command can only read back plain text lines from text files. If you attempt to use it with binary files or files written with commands like WriteString, WriteInt, etc then the results are unpredictable.

For custom files you need to write your own file handling functions using File.ReadRawInt(), etc., unless someone already wrote a module or a plug-in to read that specific format.

If the file was already a text file before converting to .dat, why did you convert it? Just try to use the original text file instead.
#659
What's the format of .dat files? Is it a well-known interchange format used by many software packages, or is it a file created by AGS?

From the manual entry of File.ReadStringBack():
QuoteYou should only use this with files which you previously wrote out with File.WriteString. Do NOT use this function with any other files, even text files.

So, if the .dat file was not written with File.WriteString() in AGS you should not use this function. Try using File.ReadRawLineBack() instead if the file assumes a plain text format.
#660
Completed Game Announcements / Re: Owl Hunt
Thu 13/11/2014 13:56:48
Nah. This is not gameplay.




This is art.
SMF spam blocked by CleanTalk