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

#561
Two people with their arms around one another looking at the moon. As in moon madness I guess.
#562
What I'd like to see would be a game graphically based (based, not exactly) on the look of the TV series, content of the book (several extra details that aren't mentioned in the radio series, though obviously much of the content is the same) and maybe the odd nod towards the text game (though most of the puzzles are too illogical and wouldn't work graphically). I'd completely ignore the movie, and if that's your primary source material I suggest you get reading the books. Then again, I haven't seen the movie so maybe I shouldn't put it down, but it is a version that Adams didn't oversee.
#563
Quote from: Twin Moon on Sat 23/02/2008 21:39:15
"Though humans are descended from ape-like creatures, they never invite their ancestors 'round for a cup of tea."
"Humans are not proud of their ancestors, and rarely invite them round to dinner"

Also, travelling through hyperspace:
Ford: "It's unpleasantly like being drunk"
Arthur: "What's so unpleasant about being drunk?"
Ford: "You ask a glass of water"
I can't believe it took me as long as it did to get that one...
#564
"You know," said Arthur, "it's at times like this, when I'm trapped in a Vogon airlock with a man from Betelgeuse, and about to die of asphyxiation in deep space that I really wish I'd listened to what my mother told me when I was young."
"Why, what did she tell you?"
"I don't know, I didn't listen."
#565
Good good, and I've got another function to play with now
#566
By making the walk function blocking, which means the program waits until the walk has finished before executing the rest of the commands (like the block disappearing). Just replace your walk line with cEric.Walk(217, 154, eBlock);

There are two optional parameters you can add to the walk command (as the script guide thing will tell you), the first using eBlock or eNoBlock to indicate if the command should be blocking, and the second using eAnywhere or eWalkableAreas to indicate whether the character should follow the walkable areas or not when walking.
#567
No, it doesn't work outside of the on_mouse_click and on_key_press functions in the global script. You could find the
Code: ags

function on_mouse_click(MouseButton button) {
  // called when a mouse button is clicked. button is either LEFT or RIGHT
  if (IsGamePaused() == 1) {
    // Game is paused, so do nothing (ie. don't allow mouse click)
  }
  else if (button == eMouseLeft) {
    ProcessClick(mouse.x, mouse.y, mouse.Mode );
  }
  //etc...

bit in the global script and replace the "ProcessClick(mouse.x, mouse.y, mouse.Mode);" under the "else if (button == eMouseLeft){" with something like
Code: ags

  else if (button == eMouseLeft) {
    if(mouse.Mode==eModeWalkto)&&(Game.GetLocationName(mouse.x, mouse.y)=="Door")){
      player.Walk(60, 60, eBlock, eWalkableAreas);  //walk to a location (blocking)
      player.FaceLocation(10, 10, eBlock);  //face a location
      player.Say("Here I go through the door");  //say something, (or replace with a Display function)
      //etc...
    }else{
      ProcessClick(mouse.x, mouse.y, mouse.Mode );
    }
  }
  //etc...

but then you're approaching the point at which its simpler to write your own walk-to code.
#568
Ah yeah, ClaimEvent would do it. Something like
Code: ags

if(mouse.IsButtonDown(eMouseLeft)&&(mouse.Mode==eModeWalkto)&&(Game.GetLocationName(mouse.x, mouse.y)==oDoor.Name)){
  player.Walk(60, 60, eBlock, eWalkableAreas);  //walk to a location (blocking)
  player.FaceLocation(10, 10, eBlock);  //face a location
  player.Say("Here I go through the door");  //say something, (or replace with a Display function)
  ClaimEvent();
}

?
#569
Glad to be of service. I've done a bit of testing and doing multiple commands is possible but a bit different. As matti says, you can just put your commands inside the if function, but it does get a bit more complicated than that.

If you want the player to walk to a position, then face another, then say something, you need to change the player.Walk to be blocking (to make them finish their walk before facing and talking), unfortunately you start to encounter strange behaviour when you use eBlock instead of eNoBlock - the player will walk to the location, face, speak then walk again to wherever your mouse is. To solve this you could try something like this...
Code: ags

//At the top of the room script
bool walking=false;
int playerloop;

//In the room's repeatedly execute event
if(walking==true){  //if we've just run the function below
  player.StopMoving();  //stop the player moving
  player.Loop=playerloop;  //and face the direction he was facing when the function finished
  walking=false;
}

if(mouse.IsButtonDown(eMouseLeft)&&(mouse.Mode==eModeWalkto)&&(Game.GetLocationName(mouse.x, mouse.y)==oDoor.Name)){
  player.Walk(60, 60, eBlock, eWalkableAreas);  //walk to a location (blocking)
  player.FaceLocation(10, 10, eBlock);  //face a location
  player.Say("Here I go through the door");  //say something, (or replace with a Display function)
  playerloop=player.Loop;  //store the direction the player is facing
  walking=true;  //tell the function above that the player has finished walking and it needs to stop them walking towards the mouse!
}

The one problem with this is that the player faces the location of your mouse for a split second, before facing back again. I'm not quite sure how to fix that one at the moment. If you don't need a blocking walk, don't use one and remove the if(walking==true) function and the playerloop=player.Loop and walking=true lines, and it should run without the facing issue.

Note that I've also changed the "Door" part of the if function to oDoor.Name (where oDoor is the door object). This means you can safely change the description of the door (e.g. to "open door" or "closed door") without breaking the function.
#570
Walk-to doesn't work like the other interactions - when you click walk-to on an object you are telling the character to walk to the x and y coordinates that you click the mouse at, so you're not actually interacting with the object.

One solution I can think of at the moment would be to get rid of the inbuilt Walk-to mouse mode and create a new mode (eg over Usermode 1 or Usermode 2) that handles all the walking instead. Then you can treat uses of this new cursor mode on objects like other mouse modes. Making the new mode walk your character around is slightly harder though, especially if you're unfamiliar with scripting.

Alternatively if this is the only, or one of only a few instances you want to do this, you could use something like the following code in the room's repeatedly execute event:
Code: ags

if(mouse.IsButtonDown(eMouseLeft)&&(mouse.Mode==eModeWalkto)&&(Game.GetLocationName(mouse.x, mouse.y)=="Door")){
  player.Walk(x, y, eNoBlock, eWalkableAreas);
}

Where you replace 'Door' with the description of your door object (case sensitive) and 'x' and 'y' with the coordinates to move the character to. This script basically checks every game cycle to see if
1) The player is pressing the left mouse button and
2) The mouse mode is currently walk-to and
3) The mouse is currently over the door
and moves the player to the specified position if they are all true.
#571
General Discussion / Re: Music from Windows
Tue 19/02/2008 21:05:53
Nice! I downloaded Mod Tracker at the weekend actually (completely unrelatedly) after seeing it mentioned on another game making forum. Couldn't figure out how to get it to work though, but I guess I'll have to have another go now...
#572
You'll need to have a variable that counts how many of the items have been used, then makes the door appear when it reaches the correct amount. For example (in AGS 3.0)...
Code: ags

//At the top of the room script
//declare your variable
int breakfast=0;  //stores how many items have been used, initially none


//in the use inventory on bowl function
function oBowl_UseInv()
{
  //first do the interactions
  if(player.ActiveInventory==iMilk){
    //use the milk
    breakfast++;  //used an item so increase breakfast by one
  }else if(player.ActiveInventory==iCereal){
    //use the cereal
    breakfast++;
  }else{
    player.Say("I can't use that");  //used some other item, don't increase variable
  }

  //now check to see if both items have been used
  if(breakfast==2){
    oDoor.Visible=true;  //make the door appear
  }
}


Obviously with this method you'd have to bear in mind that if the player keeps hold of the milk or cereal they'd be able to use them twice to make the door appear. In that case you'd need to use separate booleans for the milk and the cereal, set to true when they're used, and check that they're both true before making the door appear.
#573
That may be true, but what I'm saying is that you shouldn't condem someone with a fear of something. Someone who is actually racist/sexist etc is a different matter.
#574
Quote from: Andail on Thu 14/02/2008 12:29:32
Oh come on, running out from a barber shop just because you notice the barber might be homosexual is a very provocative act.
Okay, say someone has pogonophobia (the fear of beards). Whenever they see someone with a beard they turn around  and walk the other way. If they enter a shop and someone with a beard also enters they leave. Are they being provocative towards bearded people? What about someone with vertigo. They refuse to take a look at the view from your 23rd floor apartment. Are they doing it because they don't like you, because they hate the view? People in these positions are fully aware that any problems are their own, they avoid people or situations because they themselves have a problem, not because there is something wrong with the people or situation. You're only saying that because its about homosexuals, and they're part of a big messy patchwork of political correctness.

Then again, I've never understood the use of 'homophobia' as an equivalent to, say, racism and sexism.
#575
Kafka's Koffee (MrColossal's site) is http://kafkaskoffee.com/

Edit: And there's some tutorial threads at the top of the Critics Lounge, specifically here and here
#576
I've not heard of it being done, but from a purely marketing point of view it'd be a great idea for games/music/dvds/whatever with environmental messages
#577
I think you can still get global messages using the Game.GlobalMessages[int message] command, ie. something like
Quote from: The manual ;)
String message = Game.GlobalMessages[997];
Display("Global message 997 says: %s", message);
But you can't set them or view them in the editor in AGS 3.0

Ah, here we go, another quote from the manual
Quote from: The manual
Global Messages

Global Messages are no longer supported and should be considered obsolete -- there's really no need for them now that the interaction editor has gone. Any global messages that you had will be retained and will still work, however the AGS 3 editor provides no way to edit them. If you need to change one, just replace the DisplayMessage command with a normal Display() command.
#578
Quote from: Mirek on Fri 08/02/2008 16:10:21
Error: Null string supplied to CheckForTranslations
Actually I don't think this error is anything to do with modules being made on previous versions.

What's happening here is that you're trying to display a string somewhere without assigning any text to it. From the nature of the problem I guess you're writing to entry 3 without writing anything to entry 2, so when the compiler checks to see if there are any available translations for entry 2, it can't find a value to check and crashes. This was all helpfully explained to me a while back in this thread.

Instead of just ignoring entry 2, you'll need to assign it a value of "". (Something like JournalModule.AddEntry(""); ? I've not used this module, so I can't tell you exactly what to type). If that doesn't work, try adding just a space (JournalModule.AddEntry(" "); ?)

Alternatively post the code and ask someone who's used the module :) From what I understand if you want to enter text into entry 3, you first have to enter blank text or a space or something into entry 1 and 2, then when you want to change entry 1 and 2 you'll have to edit them.
#579
The problem is exactly as the error message says; SCI fonts don't support several characters. The solution is either to use ' rather than `, or alternatively import a TTF (true-type font) to use instead of the default SCI one. There's information in the manual about doing this.
#580
Quote from: BaRoN on Sun 03/02/2008 04:15:21
Any other takers?

I'd love to, but I'm far to busy with other projects and life in general. Its an intriguing, if difficult, idea though. Sorry!
SMF spam blocked by CleanTalk