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

#6261
Argh!
Been since yesterday trying to get this to work, but to no avail! :(

I'm trying to get some NPCs to go from one point to another, then to yet another point and then move room. And this will be true for 7 or 9 characters.
This will be running on the background, so the player can go on doing whatever he/she likes.

So I go this code in room1, which works just fine, except that it's calling the character by name and not variable (using Move because I have yet to create more than one sprite for the NPCs).

Code: ags

function repeatedly_execute_always()

  {
    if  (cJake.x>446)
      {
      oBubble.StopAnimating();
      background_animation=false;
      object[1].Visible=false;
      }
    else if (background_animation==false)
      {
      object[1].Visible=true;
      oBubble.SetView (28,  0,  1);
      oBubble.Animate(0,  10, eRepeat, eNoBlock);
      background_animation=true;
      SetTimer(1, 200);
        }
   else if (IsTimerExpired(1)==1)
    {
    cMRandy.SayBackground("... Mick ...");
    cMick.Move(516,  274, eNoBlock, eAnywhere);
    SetTimer(2, 200);
    cMick.SayBackground("1");
    }
    else if (IsTimerExpired(2)==1)
      {
        checked_in=true;
        cMick.SayBackground("2");
        cMick.Move(200,  240, eNoBlock, eWalkableAreas);
        SetTimer(1, 400);
      }
     else if ((cMick.Moving==0) & (checked_in==true))
      {
       cMRandy.SayBackground("3");
       cMick.ChangeRoom(3);
       checked_in=false;
       }    
   }


As I said, this works just fine. However, I really don't want to have to write the same for 7 or more characters and just change the names. Ideally my character name needs to be a variable, that I can either read from a txt file or from a set of strings.

so I've been trying to use extender functions, but seems like every time I put an IF in the function, it stops from reading the remaining lines. :(

Here's the code:

Code: ags

// main global script file

bool checked_in=false;

function RollCall (Character*chartobecalled)
  {
   cMRandy.SayBackground("... Mick ...");
   chartobecalled.Move(516,  274, eNoBlock, eAnywhere);
   SetTimer(2, 200);
   chartobecalled.SayBackground("1");
     
     if (IsTimerExpired(2)==1)
       {
         checked_in=true;
         chartobecalled.SayBackground("2");
         chartobecalled.Move(200,  240, eNoBlock, eWalkableAreas);
         SetTimer(1, 400);
       }
      else if ((cMick.Moving==0) & (checked_in==true))
       {
        cMRandy.SayBackground("3");
        chartobecalled.ChangeRoom(3);
        checked_in=false;
        }
  }




Code: ags

// room script file

bool background_animation = false;
bool checked_in = false;
import function RollCall (Character*chartobecalled);

function repeatedly_execute_always()

  {
    if  (cJake.x>446)
      {
      oBubble.StopAnimating();
      background_animation=false;
      object[1].Visible=false;
      }
    else if (background_animation==false)
      {
      object[1].Visible=true;
      oBubble.SetView (28,  0,  1);
      oBubble.Animate(0,  10, eRepeat, eNoBlock);
      background_animation=true;
      SetTimer(1, 200);
        }
    else if (IsTimerExpired(1)==1)
    {
      RollCall(cMick);
    }


I've been  following this thread to try and figure it out: http://www.adventuregamestudio.co.uk/forums/index.php?topic=39894.msg525594#msg525594

(And no, I have yet to try coding the name variable, but if I can't get the code to work when it's "simple", then there's no point in continuing, right?)

#6262
Guess it was a good thing I did not used my Wildcard on Brasil game, like I had thought to... :D
#6263
If it helps for debuging, I~m playing without sounds (disabled via winsetup).
#6264
Hey askalarium.

Playing your game and so far so good... :)
I did found however a little bug.

Spoiler

In his flat, when we awakens for a long night out with the guys, the landlord comes to the door demanding rent by tomorrow! All fine there, only problem is, I went and looked inside the freezer and then returned to the room, the landlord scene repeated. :/ Seems like you forgot to do a "run once" or set a bool check on the scene...
[close]

EDIT:

And now I found a serious bug! :(

Spoiler

I clicked to interact with what appeared to be a save game point thingy, by the convenience store.
It opened what looks like the Save Game GUI window, and now I can't get out of it! Mouse Clicks do nothing, and ESC key doesn't close the GUI either! :( How do I get out of this window so I can continue playing? Or do I need to restart the game!? :(
[close]
#6265
This is hard!!! You all made such good entries... I feel like everyone should get a vote. :p

But anyway...

1-AprilSkies
2-Tabata
3-Intense Degree (don't know how you spotted Tintin in that shape, but was great you did! :) )
#6266
Yes, good idea, but needs a little "tweak"... the descriptions for the entries look very messed up... (if you don't know what I'm talking about, try resizing the width of your browser window to about half your screen ;) )
I would suggests either a fixed sized table, or a line per entry with description on the side... :)
#6267
Brazil 2 vs 1 Chile
Colombia 2 vs 2 Uruguay
Netherlands 2 vs 1 Mexico
Costa Rica 1 vs 1 Greece
France 1 vs 0 Nigeria
Germany 3 vs 0 Algeria
Argentina 2 vs 1 Switzerland
Belgium 2 vs 1 USA
#6268
Arj0n, you got me a bit confused for a few seconds... had to read it 3 times before it "clicked"...  (laugh)
#6269
Wow! How did that happen that I'm in 2nd-3rd place?
I thought all my "predictions" where way off (those that I actually thought would be correct, anyway...)
#6270
Quote from: Arj0n on Wed 25/06/2014 13:05:57
I used to watch tintin back in my childhood years.
Remember the tintin animation movie named 'shark lake' (or something like that)?

I have that one as a comic album. :)
#6271
Is it just me that keep seeing the results only up to June 16th? (same problem with the League table sheet)
Why don't they update?
(using Firefox)
#6272
The Rumpus Room / Re: Ponch is in trouble now
Tue 24/06/2014 16:20:22
Sounds to me that Adeel enjoys traveling... ;)
#6273
My guess would be the GC... sound to me that maybe it overheat and gone bad (when was the last time you cleaned the inside dust of your computer and fans?).
Best way to figure it out is to open it (if it's out of the warranty), and replace components one at a time. Helps of course, if you have extra stuff home that you can replace with (if your MB has a built in GC, then you can just disconnect yours and run with the one from the MB, that would be a nice and fast way to check if it's the GC).
I would start with the GC, RAM may be easier to test, assuming that there's more than on block, you can just remove one, and try, then change... (but I don't think it's the RAM, since computers normally refuse to boot if RAM is bad).

PS. Found this site about via Google: Diagnose video card problems by comparing with example corrupted screens
#6274
The Rumpus Room / Re: Ponch is in trouble now
Mon 23/06/2014 16:57:06
I like the 3rd one best. :)
#6275
unfortunately, I can't see anything in that shape... :(
However, it does seem to be consensus that the "perfect" guy in on the left of the picture and the "green blob" guy is on the right...
#6276
The Rumpus Room / Re: Name the Game
Sat 21/06/2014 18:28:27
So did I...
#6277
Sounds interesting! And Welcome Seventeen Uncles. :)
#6278
I've also been thinking about something like this, and I also did not know about @OverHotspot@.
They way I was going to try and do it was using GetatScreen (mouse.x, mouse.y) == (x, y) and then either do a display or create a new character, call it "cCursor" and get it to be at mouse.x & mouse.y, then just use CCursor.Say...

Would it work? Would it be more complicated than creating a GUI? (I have yet to test it, just thought of this 2 days ago, and I hadn't yet time to test it).
#6279
The Rumpus Room / Re: Name the Game
Sat 21/06/2014 14:57:39
I think CaptainD should take a turn, he did found the game with only one clue... ;)
#6280
The Rumpus Room / Re: Name the Game
Fri 20/06/2014 19:37:11
That screen provided enough clues for me to find it, but I would never guess it, since I hadn't even heard of it before. :/

SMF spam blocked by CleanTalk