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

#1
Quote from: SSH on Sun 25/07/2010 12:12:46
Code: ags

function cFred_Talk () {
  if (player == cFred) {
     player.Say("I wish I had made the player character unclickable when switching, as click on oneself are annoying");
  } else if (player==cBetty) {
     player.Say("Hey, Fred, while Barney's not around lets get it on.");
  } else if (player==cBarney) {
     player.Say("Fred, old pal, if you hit on Betty, I'll kill you");
  }
}




This...This was surprisingly helpful.

I guess this code only works for objects and events; that makes sense.

Thanks!  :)
#2
Quote from: Khris on Sun 25/07/2010 11:49:11
That's no problem, it's what this forum's for :)

Still not sure what exactly you're trying to achieve; do you have a team of two characters the player can switch between and you want them to be able to talk to each other? Or is aChar1/aChar2 the same character in terms of game design and supposed to react differently depending on who's addressing him?

I have a team of multiple characters that can switch between different stages.

I want to be able to use the interacting/talking/Looking functions with other characters.

For example:
Character A: Oh look, its a chair
Character A switches to Character B, who is now the player character, while character A is a NPC.
Character B looks at the chair and says:
Hey, a Chair!

Different outcomes for a different character.

Thank you for all the help BTW, it's really kind of you!
#3
Quote from: Khris on Sun 25/07/2010 10:52:26
By this line: aChar1.Say("I will say something"); = false;, are you trying to retroactively make AGS not execute the first one?
I don't quite get how the function is supposed to work, but I'll assume you'll simply want a different outcome depending on who is the current player character.


Yes, this is exactly what I want to do.

The thing is though is that the code requires me to click on the previous character (aChar1) instead of (aChar2) to get the saying out of aChar2.

Sorry if I'm being too demanding, by the way. Thank you.
#4
Hiya, I'm Nico!

I'm a thirteen year old interested in designing games/arts in general; AGS combines both of them and got me really excited! It is very easy to use (of course you'll need to read the manual and go through some tutorials on youtube/wiki, but thats with starting any software!)

I am currently making a game for my friends in another forum, and I came here to ask for help and give suggestions on art!

I hope you'll except me as one of your own; I'm really young compared to the 20-30 year olds here!

-Nico
#5
Parse errors are all the rage these days.

The function I am trying to do is not working correctly because of a Parse error. I'm not too sure how to solve this; is it because my function is not correct?

The function is supposed to work like this: If a character is exchanged with another character, all the Mouse cursor functions will only be able to work for the exchanged character.

function aChar1_Talk()
{
 aChar1.Say("I will say something");
  if (player==aChar2)
   aChar2.Say("I'm saying something.");
   aChar1.Say("I will say something"); = false;
}
 
Thank you in advance.  :)
SMF spam blocked by CleanTalk