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 - Lt. Smash

#61
Hmm, let's try something:

> Try code 639355 to open Newell's door.

That's just the telephone-numeric equivalent for NEWELL.
Otherwise I'm "idea-less"  :-\
#62
I totally understand... if you don't know any Spanish it's really hard to make any sense out of these lines. I had the advantage of having learned Spanish for about 5 years, so it was a little bit easier for me to do this ;)

No problem, I like to help on such a great game :)
#63
Quote from: Darth Mandarb on Mon 03/10/2011 20:50:59
- the phrase "let's leave it" feels wrong to me... I'm guessing it should be translated to "Let's go"
That's my fault. It was no easy process doing the translation of the translation. I don't know who did the first translation (spanish -> english) but it mostly seemed to be done via google-translator (sorry, I don't want to offend somebody, it just looked like that). So to understand the logic behind these sentences, I had to play the game in Spanish and retranslate most of the English lines. So it could be possible that there are one or two lines, which I forgot and don't seem right/appropriate. ;)


All in all, it was really nice to be able to help creating such a wonderful game and bring in some new ideas that, apparently, got realised :)  And, if you want, I would continue my work as translator and "idea-creator" (;D) on the full game.
#64
I think it's time to find out where that banging noise is coming from.

Sooo, let's

> Go back and examine room after room to find out where that noise comes from but slowly and careful (as we don't know which hidden dangerous things are waiting on use  :-\)
#65
Yep, pcj is right. You've passed the room's filename as argument for ChangeRoom instead of the right room number.

Possibly crmMenu was originally defined as a variable with the proper room number. Smth like int crmMenu = 2;

Btw welcome aboard on the AGS forums ;)
#66
It often says line -10, if you have forgotten a closing bracket } somewhere in the script (often the last function)...
#67
Ahaaaaaa... Thanks for the quick answer :)

I'll go and try your plugin...
#68
Hey guys!
I've a very noobish question. I have this
Code: ags

spriteBlackLayer = DynamicSprite.Create(320, 200, true);
spriteLightLayer = DynamicSprite.Create(320, 200, true);
	
surfaceBlackLayer = spriteBlackLayer.GetDrawingSurface();
surfaceLightLayer = spriteLightLayer.GetDrawingSurface();
	
surfaceBlackLayer.Clear(0);
surfaceLightLayer.DrawSurface(surfaceBlackLayer, 50);  // 50% transparency

object[1].Graphic = spriteLightLayer.Graphic;


But why the hell does DrawSurface doesn't work with any other transparency than 0? When I pass 0, object[1] becomes pitch black as it should; passing anything above (e.g. 1, 20, 60) results in a 100% transparent object[1].

Some info: Game is 32bit,  Object[1] has no image as default (image = 0).

I hope someone can help me here...
#69
Hey folks. If anyone of you really needs to search the forums, why not use the omnipresent and omnipotent Google?!  ;D

Just write: "site:http://www.adventuregamestudio.co.uk/yabb [SEARCH TERMS]" into the Google search field... It's so easy... ;)
#70
You're welcome! ;)

@Mouth for war:  Hehehe ;D
#71
I would suggest you to create a list, a so-called "one-dimensional array", with all the different fortunes:

Code: ags

String _fortune[20];
_fortune[0] = "Tonight you will find new love";
_fortune[1] = "Stay with your wife"; 
...


And then in the hotspots on_click you can randomly choose one string:
Code: ags

int ran = Random(19);
Display(_fortune[ran]);
#72
Ever tried "cCharacter.Solid = false;"?   ;)

PS: Not sure if AGS 2.72 had this function. Before there was SetCharacterProperty(...).
#73
In function on_mouse_click there should be a ProcessClick(...); by default. This function triggers the current selected mouse cursor event, like "Walk to", "Look At" and so on.

When the character doesn't move, you may have forgotten to create a walkable area in your character's starting room ;)
#74
Here's a little demo to see the thing in action:

http://www.file-upload.net/download-3700459/WarFog.zip.html

I've implemented a very quick'n'dirty hack to hide objects in the fog... Taking some more time, you could make that look somewhat nicer ;)
#75
Hmm, here's an idea how you could do that:

First you create an image at room size being 50% black (and 50% transparent)
Then you assign this image to an object (let's call it layer) that fully hides the room and a fully black image to another object.

In repeatedly_execute_always you create two dynamicsprites, one from layer1's sprite and one from the original sprite.
You loop through the characters that reveal the fog of war.
Then take the x and y coords of each character and use them to draw a filled circle on both of the layers using COLOR_TRANSPARENT.

Something like this: (only for one character)
Code: ags

spriteLayer1 = DynamicSprite.CreateFromExistingSprite(object[0].Graphic, true);
spriteLayer2 = DynamicSprite.CreateFromExistingSprite(ORIGINAL_SPRITE, true);

surfaceLayer1 = spriteLayer1.GetDrawingSurface();
surfaceLayer2 = spriteLayer2.GetDrawingSurface();

surfaceLayer1.DrawingColor = COLOR_TRANSPARENT;
surfaceLayer2.DrawingColor = COLOR_TRANSPARENT;

surfaceLayer1.DrawCircle(cCharacter.x - X_OFFSET, cCharacter.y - Y_OFFSET, CIRCLE_SIZE);
surfaceLayer2.DrawCircle(cCharacter.x - X_OFFSET, cCharacter.y - Y_OFFSET, CIRCLE_SIZE);

surfaceLayer1.Release();
surfaceLayer2.Release();

object[0].Graphic = spriteLayer1.Graphic;
object[1].Graphic = spriteLayer2.Graphic;


If you want to completely hide certain characters (units) inside the already revealed areas of the room (like in strategy games), you'll have to loop through all those "non-fog-revealers" and check if their x,y coords are within the radius of the "fog-revealers". If true, set Visible; if not, set Invisible ;)

Very quick solution but I hope this helps...

EDIT: One object should be pitch black because I forgot that two 50% transparent objects merge to a 75% black (or 25% transparent) image.
#76
Say, do you use the old "Deluxe Paint"  to make these wonderful backgrounds?  :=
#77
Thanks for the clarification, monkey. It's good to know these things ;)
#78
Sorry but your if-statement doesn't make any sense.

You call function CH with startingChapter  ONLY when startingChapter is 0. So it will never call any different chapter. ;)

change this to:
Code: ags

if (startingChapter != 0) CH(startingChapter);
else {
...
}
[/s]
Sorry, just saw that you changed this only for testing reasons   ::)

Btw you can even more simplify your file writing:
Code: ags

File *k = File.Open("NewGame.dat",eFileWrite);
if (btn > 0)   // I'm not quite sure if this if-else-statement is needed because I don't know what ReadInt returns if there is no Int to read...
  k.WriteInt(btn);
else
  k.WriteInt(0);
k.Close();
RestartGame();


[EDIT:] Possibly you have some code that prevents RestartGame() from working correctly. Try to put SetRestartPoint(); somewhere in game_start...
#79
Normally you shouldn't have to convert an int to a bool, because internally 'false' is always equivalent to '0' and 'true' to '1'. Except you want numbers greater than 1 to also be an equivalent of 'true' ;)

Now to your problem. You don't need 5 different bools, it's enough to use one bool and one integer in your situation.
You use an int to store the chapter (1, 2 or 3) and a bool which saves if you were inMenu or not (inGame).

So you could simplify your code like:
Code: ags

// This happens when a chapter is selected to be loaded
int startingChapter = 1; // Change this number to the number of the chapter you want to start with
bool inMenu = false; // This is set to true when the game is manually exited

File *k = File.Open("NewGame.dat",eFileWrite);
k.WriteInt(startingChapter);
k.WriteInt(inMenu);
k.Close();
RestartGame();


Code: ags

File *l = File.Open("NewGame.dat",eFileRead);
int startingChapter = l.ReadInt();
int inMenu = l.ReadInt();
l.Close();

if (inMenu) {
  CH(startingChapter);
}
else{
        // Go To menu screen (Room9) when game is first started.
  cEgo.ChangeRoom(9);
  cEgo.Transparency = 100;
  Menu_ClickingState = true;
}


And then you have to merge your chapter functions (CH1,2,3) into one:
Code: ags

function CH (int chapter){
  if (chapter == 1) {
    Display("Working");
    mainstory = 5;
    cEgo.ChangeRoom(1, 650, 405);
    cEgo.Transparency = 0;
  }
  else if (chapter == 2) {
    // Things that happen when chapter 2 is loaded...
  }
  else if (chapter == 3) {
    // Things that happen when chapter 3 is loaded... 
  }
  ...
}

Untested but should work :)
#80
Wouldn't it be possible to write that config file in-game using AGS file functions?
You could make a GUI in German that sets all of these options and write it to the file; you would just need to add a notice that the changes will be made the next time you start the game ;)
SMF spam blocked by CleanTalk