Error message when trying to disable IdleView on Region (SOLVED)

Started by jfarwyke, Wed 13/05/2009 13:04:28

Previous topic - Next topic

jfarwyke

I get this error message when trying to run the following code...
Code: ags
function region1_Standing()
{
cPup.SpeechView = -1;
cPup.IdleView = -1;
}

Error (line 31): property 'Character::IdleView' is read-only

Just what does it mean by 'read-only'? And is there a different way to disable the IdleView on a region?
Thanks!

Hudders

Readonly means you can only use that property to get the status of IdleView, you can't set it using that command.

To disable it in a region, it would probably be easiest to create a new view and use SetIdleView to set it when in that region.

Khris

I'd use the other two region events:

Code: ags
function region1_WalksOnto() {
  cPup.SetIdleView(-1, 0);   // disable idle view
}

function region1_WalksOff() {
  cPup.SetIdleView(2, 10);
}

jfarwyke

The SetIdleView works perfectly, thanks! And yes, I ended up using the walks onto/off events. I have the region on a walkable area that has a specific view and with the standing event, if I move the cursor to the GUI toolbar, my character switches the normal view for some reason. In fact, I never have much luck with the standing event. But now it works perfect, so thanks guys.

SMF spam blocked by CleanTalk