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

#881
I got a 403 error downloading the game. :sad:
#882
This may also help you, and it is the first sticky topic of this forum.
#883
The reason is that the parameters for a function are passed by reference.
For example, when this is called:
Code: AGS

adjustskillforexp(STRENGTH, expSTR, 2); //so STRENGTH is attempted raised whenever two exp. points in that 

The VALUE of the variable STRENGTH is passed to the function, but not the variable itself. So, the function just modifies a 'copy' of that variable it and will NOT affect the original variable. One way of solving this is to return the value back, like this:
Code: AGS


//skill with a certain spell, skills go from 0 to 100.
int spellBAKECAKE;
export spellBAKECAKE;

int expBAKECAKE; //experience with the same spell
export expBAKECAKE;


//here we insert the characteristics of the spell BAKECAKE into a function and add toughness for how much exp it takes to attempt to raise the stat:

function adjustskillforexp(int Characteristic, int expCharacteristic, int toughness)
{
while (expCharacteristic >= toughness)  //the higher the toughness, the more exp needed to do that random check and see if skill is raised.
  {
  expCharacteristic -= toughness; //when doing the random check, the exp is lost, regardless of the result
  if (Random(100) > Characteristic)
    {
    Characteristic += 1;  //in this case, skill raised
    }
  }
  return Characteristic; //return the modified value
}

function adjustallskillsforexp()
{
STRENGTH=adjustskillforexp(STRENGTH, expSTR, 2); //so STRENGTH is attempted raised whenever two exp. points in that skill are gained.
ALERTNESS=adjustskillforexp(ALERTNESS, expALE, 2);

spellBAKECAKE=adjustskillforexp(spellBAKECAKE, expBAKECAKE, 1); //and our spell BAKECAKE is attempted raised whenever one exp point in that skill is gained.
}



#884
Change Audiochannel to AudioChannel .
#885
The Rumpus Room / Re: Name the Game
Thu 02/05/2013 16:28:08
221 Baker Street?
#886
Yeah, since it's been a while after the last round, any person who wants to be responsible and has the rule set thought out already may attempt to start a new round.

You are also free to start a new thread in this section to discuss about rules, dates, etc. before making the real thing.
#887
To be honest, I am Chinese and I speak Chinese too, but I don't recognise a single word here.
#888
Quote from: Snarky on Thu 25/04/2013 13:08:42
Yeah, but there used to be an annoying scaling bug in the AGS Direct3D renderer...

Also, as far as I remember the D3D9 renderer doesn't support 8-bit modes (or is it changed now?), which I work 100% with, so unfortunately it's something I cannot use.
#889
Site & Forum Reports / Re: Bug reports
Wed 24/04/2013 03:14:25
Yay! it's fixed now! \o/
#891
Site & Forum Reports / Re: Bug reports
Tue 23/04/2013 10:53:14
I don't know whether it's just me, but it seems that in individual forum member's summary page, sometimes the Date Registered, Local Time and Last Active information are displayed, sometimes not.

For example, they're displayed in this account (clicked this just because it's the first entry in the member list), but they're not displayed in mine.

Tested with Opera and Chrome.

It seems that if a member has set his/her location on the map the formatting is messed up. Instead of displaying these info below the member's basic profile data they're stuffed to the right of them. Like in the following screen capture, there are some "black dots" on the right hand side, which when I managed to highlight them, copy and then paste them elsewhere I can see the intended info.
[imgzoom]http://i488.photobucket.com/albums/rr249/gilbot/profile_bug_zpse1c9897e.png[/imgzoom]
Edited: Odd. It seems that now it only affects my own account (maybe it's because a member will see more info. exposed when viewing his/her own account, such as the email), I thought I saw it affect other members' page a while back.
#892
I haven't really read all the codes but I have doubt about this line, and I think it's probably not what you want to do:
Code: AGS

  if(!scrollDelay>0){


The "!scrollDelay>0" condition will be something like this:
1) if scrollDelay is non-zero (be it negative or positive), then !scrollDelay becomes 0, and this the condition will be false.
2) if scrollDelay is 0, then !scrollDelay becomes 1, and the condition is true.

So, this is equivalent to the condition "scrollDelay==0" or just "!scrollDelay".

I'm not quite sure what you are after, but do you want to check whether the variable is negative?
In that case, just use the condition "scrollDelay<0".
#894
The Rumpus Room / Re: *Guess the Movie Title*
Fri 19/04/2013 06:07:00
With all these lightings it can't be mistaken...

BATMAN
#896
Even for animated sprites they can go wrong. For example, KQ7 looked horrible and the claymation sprites in later SCI games weren't as good as AGI or earlier SCI games either (ok... claymation may fall in the category of photographed sprites).

Anyway, this is great.
#897
I don't know what module it is, but for scrollable rooms you cannot just substitute player.x with mouse.x, as the mouse cursor uses screen coordinates, whereas characters and objects use room coordinates.

So, change player.x to 'mouse.x + GetViewportX()' and player.y to 'mouse.y + GetViewportY()' instead and see whether it makes any difference.
#898
The Rumpus Room / Re: *Guess the Movie Title*
Thu 04/04/2013 11:11:59
Batman: Villain Carnival
#899
Quote from: selmiak on Sun 31/03/2013 14:28:56
numberofsavedchildren / maxnumberofchildren * 100
Actually if you just want to do it with integer maths, the correct way is:
(numberofsavedchildren * 100) / maxnumberofchildren

As as long as numberofsavedchildren < maxnumberofchildren, numberofsavedchildren / maxnumberofchildren yields zero.
(I think by default the operator precedence is left-to-right now, but for safety I'll just add the parentheses to ensure the multiplication comes first.)
#900
OK done.  :smiley:
SMF spam blocked by CleanTalk