The Dink Network

forcee a vison

August 12th 2003, 02:57 AM
fairy.gif
glennglenn
Peasant He/Him Norway
GlennGlenn doesn't want a custom title. 
i have maked a script with a vision and dink must find a mushrom to the man so he can heal him self here in this script i must force a vision first the man are almost dead and in vision 1 the man should be healed but when i force vision 1 the man still lying on the floor
August 12th 2003, 11:24 AM
custom_odd.gif
From Dink C Editor Help:

force_vision( int new_vision );

Changes vision and updates screen to reflect vision changes.

Basically like walking onto a new screen, but doesn't change dinks location.

Warning: it kills all script and sprites and reconstructs them using the new vision. It also makes the script being run stay alive by connecting it to sprite 1000 (script never dies).

You must use kill_this_task() or it will NEVER die.

I found this in one of my old scripts:
force_vision(int 1);

I'm not sure if the int is supposed to be there, but I remember it working...meh

And I'd consider just not using vision... You could have a script attached to the guy, and in the main proc have something like this:

void main(void)
{
if (&check == 0) {
//failed whatever check, means he's still dead sp_pseq(¤t_sprite, ##); sp_pframe(¤t_sprite, ##); sp_brain(¤t_sprite, 0); }
if (&check == 1)
{
//didn't fail, he's alive
all the normal stuff
}
}

Then you can have the check in talk, too, and have it change what he says etc...

I think you use sp_pframe and sp_pseq, because it's not changing his animation, it's just changing his current picture...