Changing character view problem

Started by Deax Strife, Thu 29/12/2005 15:57:31

Previous topic - Next topic

Deax Strife

My EGO character has view 5 and speech view 4, but i wanted his view to change to view 7.

So i went to the interaction editor and placed:

Use inventory on hotspot
Conditional - If the player has an inventory item - Inventory item number: 4
Character - Change character view (EGO, 7)

It seems to work just fine. He walks like view 7, but the problem comes when he talks to an npc. Then the speech view reverts back to speech view 4.

How do i change the speech view as well. There aren't any actions in the Interaction Editor which says:
Character - Change character speech view.

Please helpÃ,  :'(

monkey0506

About the only way I see of doing it would be to use the script, so:

  • Add a Run Script event to the list of interactions.
  • Edit the script, and then type the appropriate code for your version of AGS:

    Code: ags
    // AGS VERSIONS 2.7 AND LATER
    cEgo.SpeechView = 7;
    
    // AGS VERSIONS 2.62 AND EARLIER
    SetCharacterSpeechView(EGO, 7);


    That will set the speech view for the character to view 7.

Duckbutcher

Is there some sort of other command to change the speech views of NPCs? Because I can only get the above to work with the player character. I'm trying to change the talking view of one of my NPCs and for some reason have hit a brick wall.

This is what I've tried so far. In the interaction editor, at the point I want to make the change,  I choose a 'Run Script' command and then:

character[SCHUMAN].SpeechView = 27;

Which didn't work, so I tried:

cSchuman.SpeechView = 27;

And it ignores both of them. I don't get any error messages, it just continues to use the regular speech view.
Rather than start a new thread, I thought I'd add to this one. Can anyone help?

Nathan23

try to use a display commandÃ,  after you putÃ,  cSchuman.SpeechView = 27
and look if the character change his talkview, like this:

Code: ags


cSchuman.SpeechView = 27;
cSchuman.Say("Trying....");



I think the SpeechView property must be set in the beginning of the script of the room, perhaps you should use variables to set this in  the room script

Duckbutcher

Tried the above, still nothing. It doesn't display the message you suggested, so it's as if it's just ignoring the order to run script. How odd. It's baffling because I've done this several times with my main character (ego) and not had any problems at all. Any further suggestions?

Khris

Quote from: Nathan23 on Fri 08/09/2006 19:16:53I think the SpeechView property must be set in the beginning of the script of the room, perhaps you should use variables to set this inÃ,  the room script
No, and no.

Duckbutcher:
Could it be that you are by mistake confusing two of your characters? If not, and the RunScript-action isn't run at all, where exactly did you put it?
And you could use Display("Trying...");, so the message will be shown independantly from what's on the screen.

SMF spam blocked by CleanTalk