The Dink Network

Visions problem: Begone, I don't believe in you!

October 7th 2011, 02:58 AM
duckdie.gif
I want a sprite to disappear after a variable changes. I put it on Vision 1 in the editor and used this:
 &vision == 0; 

It won't disappear What am I doing wrong?
October 7th 2011, 03:14 AM
peasantmg.gif
raven
Peasant He/Him Sweden
 
&vision = 0;

Note the 1 = sign
October 7th 2011, 03:16 AM
duckdie.gif
I've done that... I posted two of them by mistake.
It still won't disappear.
October 7th 2011, 03:36 AM
custom_robj.png
Robj
Jester He/Him Australia
You feed the madness, and it feeds on you. 
The vision can only be modified in a base script(A script attached to a screen). Make sure the script you are changing the vision in, is not attached to a sprite.
October 7th 2011, 03:38 AM
custom_msdink.png
MsDink
Peasant She/Her New Zealand
Tag - Umm.. tag, you're it? 
You have to add a script to the screen as well. All your 'seen all the time' sprites are set on 0 all the others on your other vision(s) 1 2 whatever

void main(void)
{

if(&story < #)
{
&vision = 1;
}

if(&story > #)
{
&vision = 0;
}

}


# = what number your story is up to

Well something like that (((hugs Pilly oh great teacher)))

Edit: Robj you are a ninja!!
October 7th 2011, 04:16 PM
custom_iplaydink.gif
iplaydink
Peasant He/Him Sweden
Hmm.. 
Hehe I think I only used visions once or twice in all my D-Mods XD

Often when you just want a sprite to disappear I find it easier to remove it in it's main procedure.
October 7th 2011, 09:39 PM
custom_msdink.png
MsDink
Peasant She/Her New Zealand
Tag - Umm.. tag, you're it? 
I had a whole bonfire to put out so much easier with visions lol
October 8th 2011, 02:23 PM
wizardg.gif
They also can't change while you're in that screen.
October 8th 2011, 03:01 PM
pillbug.gif
Pillbug
Peasant He/Him United States
Love! True love! 
I actually included that in my tutorial. If you use load_screen(); and draw_screen();, you can change visions while on that screen.

For example, you could have a normal vision script attached to the screen you're on:
void main(void)
{
if(&story == 0)
{
&vision = 0;
}

if(&story == 1)
{
&vision = 1;
}

}


And you could attach this script to a sprite:
void talk(void)
{
say_stop("Appear, magical Vision 1 sprite!",¤t_sprite);
&story += 1;
load_screen(your screen);
draw_screen(your screen);
}
October 8th 2011, 03:16 PM
wizardg.gif
Oh, I might have to use that.
October 8th 2011, 10:44 PM
duckdie.gif
Thanks, pilly and co.
Now gimme my visions video tutorial
October 8th 2011, 10:59 PM
pillbug.gif
Pillbug
Peasant He/Him United States
Love! True love! 
I can send you the old one that MsDink got if you want, but it needs some improvements.
EDIT: Link to VidTut download
October 8th 2011, 11:23 PM
duckdie.gif
*Gives Pillbug a cookie as promised*
Awesome tutorial, just what I needed
Oh, and nice voice
October 8th 2011, 11:27 PM
custom_msdink.png
MsDink
Peasant She/Her New Zealand
Tag - Umm.. tag, you're it? 
His voice isnt nice NICE!! its HAWT pfft
October 8th 2011, 11:32 PM
duckdie.gif
Hawt, for girls.
Guys would look stupid if they say it's hawt