Character Change-different reactions [SOLVED]

Started by , Tue 04/01/2005 00:15:51

Previous topic - Next topic

Hhaze

I have enabled it so that my character can change views, and my player changes just fine. I have the view listed as a separate character as well using the setplayer character function.

The problem I'm having is that once I change the appearance of my character, I want the other characters to react differently to them. I already fooled around with the conditionals, and none of them seem to work. It just pulls up the original script that they used on the last character. So for some reason, it's as if the game isn't recognizing the new view as a separate player character.

strazer

QuoteI have the view listed as a separate character as well using the setplayer character function.

I don't quite understand. Are you trying to change to another player character or are you just assigning a different view to the player character?

Please post the actual code you're using.

And remember that with AGS v2.62, the .view variable returns the character's view number minus 1, so do for example
  if (character[EGO].view == 2) { // if character EGO's view is 3

hhaze

Thanks, I figured out how to do it. Before I was trying to use the point and click interaction manager and didn't realize that I needed to fool around with the actual script and variables and so forth.

My characters are twins, and I wanted one of them to pretend to be the other one. For instance, when she takes her hair down, a character would treat her differently than when she doesn't have her hair down. I set up her pretending to be her sister as a completely different character.

When I went into the global script, with a lot of variable tweaking, I could set it so that it worked the way I wanted it to.

Hhaze

But I wasn't able to figure out how to do it using just the interaction manager. Is such a thing possible? Because I would like to keep as much of my global script free as I can. 

strazer

QuoteMy characters are twins, and I wanted one of them to pretend to be the other one.

This sounds to me like it could easily be achieved just changing the character's view.
Interaction editor: Character - Change character view
Then use the code I wrote above to check the character's current view.

If you're comfortable with scripting at all, I suggest using it from the start.
Eventually, some things you'll have to do via script anyway, since not all commands are available through the interaction editor.
It's more more organized since you won't have a mix of interaction editor and script and it's easier to reuse code snippets via copy&paste.

hhaze


SMF spam blocked by CleanTalk