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

#1341
Quote from: bicilotti on Tue 15/02/2011 10:12:03
feel free to abuse the wiki
Now I catch where all these spambots come from!
#1342
Just use a text overlay and modify its .X property continuously to have it move across the screen. This is what I did in my (yet to release) game.
#1343
In fact, both Tabata's and Khris's images won't show for me :P. They just read:

Pic-Upload.de
-----------------
Site don't allowed
#1344
Put the DoOnceOnly() check after checking for the two keys, like in my example.

This is because the "DoOnce" condition is set to have been accomplished the first time it is encountered in the script. In your version, if the player does not have both items and walks onto the region, the "found ruler" condition will be set to have been accomplished and then since the player does not have both items the remaining codes will not be run. Even after the player gets both items and walks onto the region again in a later time this part will never be checked, as the "found ruler" condition is already considered done.

* Calin ninjaed me, but I won't recommend checking all the conditions in a single if-clause, since it would be easier to read and debug (at least to general users) when using two separate if clauses (and more importantly this can be confusing as I remember that this evaluation of expressions behaviour was implemented quite recently; everything in the expression was evaluated (or something like that) in some older versions of AGS).

Edit: Okay. I've checked and it's added in V2.71:
Quote- Implemented lazy evaluation for && and || operators.

Though this is sorta safe to do this now but still I'll recommend breaking them up for better clarity.
#1345
Just use Game.DoOnceOnly() which literally does what it says

So,
Code: ags

function region2_WalksOnto() {
     if (player.HasInventory(ikey1) && player.HasInventory(ikey2))   {
       if (Game.DoOnceOnly("have both keys already")) {
         cSlocombe.FaceLocation(188, 270);
         cFrankj.FaceCharacter(cSlocombe);
         cSlocombe.Say( "Hey uncle. I've found 2 Key pieces!!");
         cFrankj.Say("That's absolutely splendid my dear boy!");
         cSlocombe.Say("And I've fixed the water");
         cFrankj.Say("You're a marvel Morgan");
         cSlocombe.Say("Oh, and the electrics are working now");
         cFrankj.Say("Jolly good");
         cFrankj.Say("Let me know when you have found more Key pieces. I'm really tired today!");
         cFrankj.Say("I'm going back to bed");
         cSlocombe.Say("Ok uncle");
         cFrankj.Walk(532, 140, eBlock);
         cFrankj.Transparency=100;
         cSlocombe.Say("Well, guess I should look around in the house some more");
  
         //region[2].Enabled = false; //comment this out if you don't want to disable it.
         region[3].Enabled = true;
        }
     } 
}
#1346
Don't double post in a short time. You can just edit the last post for it. Also, when you manage to fix a problem, it would be a good idea to write how you fix your problems. This would be helpful to other people in case they encounter similar problems. I suppose it's the missing close ) in the 'object[1].SetPosition(cCharacter.x + 35, cCharacter.y + 58;' line, right?

Just a helpful hint, you can use the 'match-brace' feature of the script editor (press Ctrl-B when the cursor is next to an open/close bracket) to help you fix these kinds of problems.
#1347
Use 'if (blah >= 101)' or 'if (blah > 100)', not 'if (blah => 101)'.
#1348
Just use the player.ChangeRoom() function to enter other rooms.
#1349
Quote from: Dualnames on Thu 10/02/2011 05:00:51
Scorpiorus made an FPS module. I just modularized(?) it.
If that's already a module in the first place, do you need to re-modularise it? :=
#1350
Unfortunately that game is quite old and it was made with a very old version of AGS, so it may not be possible to trace what problem it is.

However, try running the game in legacy XP/9X/whatever mode (I think Win7 could do this) and see if it works.
#1351
As far as I know the Debug() FPS feature is good for nothing because you need to enable debug mode to use it, which is a big NO for game releases and also it will only shows the information on screen so you cannot address the value via scripting.

Scorpiorus had written a software FPS detecting function and that may be of use to you. (Though personally I'll rather want the engine to have an internal function for it.)
#1352
Doesn't a higher resolution make the same p3n1s smaller?

+1 for low resolution.
* Iceboty V7000a runs!
#1353
General Discussion / Re: Icey day!
Wed 09/02/2011 08:27:09
Well, it depends, as it will work in my case since I have already mentioned I'll let this nick stay for a while and so it's just perfect to address me by the honourable name of Iceboty from now on!
#1354




Well, jokes aside, I expect no one will get it anyway, but this is a reference to something that actually happened here some years ago.
#1355
Hmmm. Why don't you put the "Helmet.y=..." line at the end like in the original codes? By putting it at the beginning will use the scaling of the last game loop (which may give some small "jumps" to the position of the helmet), since player.Scaling isn't updated yet (you update it a few lines below).
#1356
The problem is that when the scale changes the y-offset of the helmet from the character's feet needs to be scaled also.

Try something like (not tested and I'm not sure if it's the right formula):
Code: ags

Helmet.y = player.y-(player.Scaling*60)/100;


However, the simplest way is to draw the helmet sprites the same size as the character's sprites (just leave blank area below the "floating" helmet so that it will be aligned with the character sprites), and then you don't need to worry about the offsets. Just use "Helmet.y = player.y;" instead.
#1357
General Discussion / Re: Icey day!
Tue 08/02/2011 07:18:45
Given my reluctance in changing my nick frequently, I think I won't change my nick back tomorrow. This nick will just stay for quite some time I suppose. :=
#1358
To elaborate, you need to check player.ID (I think it actually works just with the character pointers, not necessarily the IDs) for the current player like ddq has mentioned. DON'T use SetAsPlayer() in the if...else conditions, as this function literally SET (not CHECK, got it?) the current player character.

The reason you got this problem is that, in the first if clause 'if (Dave.SetAsPlayer(blah)){blah bla}' the engine has set the player character to Dave already. You just need to check it like:
Code: ags

if (player==Dave){
  blah bla
} else if (player==chris){
  blah bla bla
} else ... etc.

#1359
General Discussion / Re: Icey day!
Tue 08/02/2011 03:39:59
Heh what?
#1360
Heh, me too.

It's nothing shocking though, as you get IE immediately the moment you get a computer.
SMF spam blocked by CleanTalk