Changing Views

Started by Estaog, Sat 26/02/2005 08:51:01

Previous topic - Next topic

Estaog

Im having a problem with SetCharacterView, here is the code:



This is view 3:


And this is view 6:


Now the problem is that the view isn`t changing. I think the code is correct, but if anyone can help me, please do so.
Think about the kittens man!

http://members.aol.com/johnk0/godkills.jpg

Sam.

your problem is that most of your code is blurred, ags doesn't accept blurred code.

Seriously, i think what your code is missing is the character name. off the top of my head it should be:

SetCharacterView(EGO1, 0,2)

so, ego1 is the name of your character, 0 is the view and 2 is the speed or something.
Bye bye thankyou I love you.

DoorKnobHandle

It might be alot easier for you to just copy&paste the parts out of your script file, that have to do something with your problem and put those lines here using the [ CODE ] and [ /CODE ] tags (without the spaces)...

Ashen

I'm just glad someone else can see it blurring, I thought my eyes had broken.
Posting the code as text would probably be easier, but from what I can make out:

1) You can use Character numbers instead of names in SetCharacterView, so I don't think Zooty's suggestion works. Is it definately character 0 you want to change? It might be worth changing it to the script name anyway - it makes it easier to see what commands link to what character.
2) It looks like you've got some DisplaySpeech commands in there? I don't think SetCharacterView affects the speech view, so you may need to change that to 6 at the beginning (and back again afterwards, of course).

Although, when the code's readable, it may be something completely different.
I know what you're thinking ... Don't think that.

Estaog

The reason it`s blurred is that it contains some spoilers. And i think the reason is the DisplaySpeech function. But how can i make him bend down and speak?
Think about the kittens man!

http://members.aol.com/johnk0/godkills.jpg

Ashen

#5
It's hard to say exactly, without seeing the spoilers (or maybe I'm just nosey), but the two most obviouss ways would seem to be:
Make a 'Bending and Talking' view, then change to that temporarily.
Code: ags

SetCharacterSpeechView (0, BENDTALK);
DisplaySpeech (0, "Hey, how'd this get here?");
SetCharacterSpeechView (0, TALK);


Or, some combination of AnimateCharacter/Ex and DisplaySpeechBackground, e.g (not tested, so don't quote me on this):
Code: ags

SetCharacterView (0, 6); // Assuming view 6 has the anim you want
DisplaySpeechBackground (0, "Hmm, what have we here?");
AnimateCharacterEx (0, character[0].loop, 3, 0, 0, 1); // Character will animate while saying last line.
AddInventory (3);
DisplaySpeech (0, "I found a spoon. Good for me!"); // Clears the background speech. 
//Could also be more AnimateCharEx & DisplaySpeechBG commands.
ReleaseCharacterView (0);

It might take a little fiddling to sync up the animation and the pause you need to make the speech readable. I think there've been a few posts in the past dealing with animations during DisplaySpeechBackground, so search up one of them for more details.
I know what you're thinking ... Don't think that.

Estaog

Thanks for all your help guys. I just used ChangeCharacterSpeechView and the problem is gone.     
U no` what im sayin?
Think about the kittens man!

http://members.aol.com/johnk0/godkills.jpg

Indie Boy

#7
(potter can understand blur)i dont understand how
Spoiler
display speech "there is nothing more in there"
[close]
is a spoiler ???
I won't use this login.
Try IndieBoy instead

Estaog

Because they reveal a location of something. And that`s not what it says  :=.
Think about the kittens man!

http://members.aol.com/johnk0/godkills.jpg

SMF spam blocked by CleanTalk