- SOLVED - When I change the view of my character, blinking view stays the same

Started by SirLean, Thu 05/10/2023 02:37:29

Previous topic - Next topic

SirLean

So basically I want to make my character sit besides a tree while he's fishing, therefore changing the "standing" blink that he normally has. This would mean that the blinking view changes to the one where he's sitting, so it should be easy.

But the "blink" stays the same as the standing one...

The hotspot is the water, cPersonajeKid is my main character, blinking while sitting view is 7, FLASHEANDOPESCASENTADO is the view of him simply sitting, iCanha is the fishing rod

Code: ags
function hHotspot2_UseInv()
{
if (cPersonajeKid.ActiveInventory == iCanha) {
  
  cPersonajeKid.Walk(1452, 796, eBlock);
  
  cPersonajeKid.ChangeView(FLASHEANDOPESCASENTADO);
  
  cPersonajeKid.BlinkView =7;
  cPersonajeKid.BlinkInterval = 160;
  
  
  }
}

When I check the game, he sits perfectly, but in the blinking frame he stands up and blinks like he's standing...

What am I doing wrong?  :confused:

thx

Crimson Wizard

The code seems right, are you sure you don't set BlinkView elsewhere that might override this setting?

Khris

You can debug your game by adding this to the room script (or just the eKeyB line to the existing global script function):

Code: ags
function on_key_press(eKeyCode k) {
  if (k == eKeyB) Display("Blink view is: %d", player.BlinkView);
}

Now you can press the B key to check the blink view any time the game is idle.

SirLean

Quote from: Crimson Wizard on Thu 05/10/2023 02:49:11The code seems right, are you sure you don't set BlinkView elsewhere that might override this setting?

I checked the code and there isn't any other BlinkView code, just the one on the "Character" setting for the normal blink view

Crimson Wizard

Are you absolutely certain that view 7 is the right one? I may recommend using view names everywhere instead of numbers, similar to how you did with cPersonajeKid.ChangeView function call; that is :
Code: ags
cPersonajeKid.BlinkView = VWHATEVERNAMEIS;

SirLean

I solved it.

In fact I had assigned in the Character Settings, both for Blink and for Idle, the standing blink (3).

The character as I saw it in the game blinking didn't respond to the actual "blink setting" to blink, but actually, from the "IdleView"

and by simply using

Code: ags
cEgo.SetIdleView(7, 5);

now he "blinks" when changing the view as I wanted.

it was a problem of semantics all along, I guess the BlinkView only affects the portrait blink if the game has it added on?

Anyways, Thank you so much! you are always really helpful!! :smiley:  :smiley:  :smiley:  :smiley:  :smiley:  :kiss:


AndreasBlack

I believe "Blink View" only works for Sierra portrait style games, but we "beginners" might not know that. I wished they could change that in the future, or maybe it's already possible, not sure. But blink view should work for normal characters walking around aswell, very confusing

SirLean

Quote from: AndreasBlack on Fri 06/10/2023 00:17:42I believe "Blink View" only works for Sierra portrait style games, but we "beginners" might not know that. I wished they could change that in the future, or maybe it's already possible, not sure. But blink view should work for normal characters walking around aswell, very confusing


Yeah, thank you, now I don't feel so... unwise haha..

Crimson Wizard

Ah... that is the problem. Somehow this did not click for me either.

But then this note must be added in the manual.

SirLean

Quote from: Crimson Wizard on Fri 06/10/2023 00:52:36Ah... that is the problem. Somehow this did not click for me either.

But then this note must be added in the manual.

Glad to have helped make a better manual :)

SMF spam blocked by CleanTalk