Invisible - Fixed thanks :)
Is there no other way for Dink to be made invisible - a sequence to run and him to be made visible again without fading and redrawing the screen? I am doing adding a summoning sequence to the regular fireball spell - the character doesn't redraw after the sequence has played through.
Any hints pls or do I have to fade down and up again which I prefer not to do unless 100% necessary?
sp_no_draw(1,1);
sp_no_draw(1,0);
doesnt work
Any hints pls or do I have to fade down and up again which I prefer not to do unless 100% necessary?
sp_no_draw(1,1);
sp_no_draw(1,0);
doesnt work
You want to make Dink invisible? The preferred way is to say "Koolahlimpa!" and throw glitter in the air.
Edit: Sorry, but I think making a blank sequence and running him through it will work.
Edit: Sorry, but I think making a blank sequence and running him through it will work.
sp_no_draw(1,1); isn't supposed to work. sp_nodraw(1,1) on the other hand...

Oh yeah. right. go it. 'Thanks meta' (message by EmDee^)
Yeah sorry I have sp_nodraw - my error - but it still doesnt work
So i can do this without fade down and redrawing the screen?
argg playing with it keeps making it worse lol
This is what I have
Character walks up touches this scroll - scroll disappears, character disappears, he plays his summon sequence (but also tells me the backpack is full) he disappears and it freezes telling me -still- the back pak is full, therefore isnt playing thru to its conclusion... so what have I not done right?

So i can do this without fade down and redrawing the screen?
argg playing with it keeps making it worse lol
This is what I have
//summons magic and gives fireball void main( void ) { //set this sprite to react to touch, but not to being hit sp_touch_damage(¤t_sprite, -1); sp_nohit(¤t_sprite, 1); //using this global variable to get around //a bug with Dink freezing as he touches and //tries to talk to the scroll at the same time &dddd = 0; } void touch( void ) { //first better check that there is a spare magic slot int &fmagic = free_magic(); if (&fmagic < 1) { say_stop("Hmmm, the old backpack is full of magic", 1); //no free slot so let's exit this script return; } //now we can give the magic add_magic("item-fb", 437, 1); //add some razzle-dazzle playsound(43,22050,0,0,0); freeze(1); &save_x = sp_x(1, -1); &save_y = sp_y(1, -1); // Summon sequence preload_seq(38); sp_nodraw(1,0); sp_nodraw(¤t_sprite,1); int &summon = create_sprite(312,257,4,38,1); sp_seq(&summon,38); sp_frame_delay(&summon,100); sp_brain(&summon, 7); sp_nodraw(1,1); wait(250); say_stop("I now have fireball.", 1); //shrink to this percent then die unfreeze(1); &dddd = 666; sp_brain_parm(¤t_sprite, 5); sp_brain(¤t_sprite, 12); sp_touch_damage(¤t_sprite, 0); sp_timing(¤t_sprite, 0); int &hold = sp_editor_num(¤t_sprite); if (&hold != 0) { //this was placed by the editor, lets make it not come back editor_type(&hold, 1); //kill sprite forever } }
Character walks up touches this scroll - scroll disappears, character disappears, he plays his summon sequence (but also tells me the backpack is full) he disappears and it freezes telling me -still- the back pak is full, therefore isnt playing thru to its conclusion... so what have I not done right?
sp_nodraw(1, 1); worked fine in my thief dmod, i didnt have to fade out or draw screen or anything. Did you type it exactly like the above?
Above is script copied so yeah - though you have a space there - so I tried with a space as well but still no go
The only lines I have changed are line 20 from say to say_stop
and 32 to 43
rest is usual fireball script

The only lines I have changed are line 20 from say to say_stop
and 32 to 43
rest is usual fireball script
Try putting a space after the ffirst bracket. Tis what I do with the void command.
Wish i could help, but this is way over my head im afraid sorry

Put the sp_touch_damage(¤t_sprite, 0); at the start of the touch procedure - it's probably calling the script many times while Dink is touching it, filling the slots with magic and generally causing havoc
Edit: Also, you possibly have the sp_nodraw's the wrong way round?
sp_nodraw(1, 1) makes him invisible, sp_nodraw(1, 0) makes him visible again.

Edit: Also, you possibly have the sp_nodraw's the wrong way round?
sp_nodraw(1, 1) makes him invisible, sp_nodraw(1, 0) makes him visible again.
Hey welcome back Sparrow, and nope none of that worked - the ¤t_sprite is the scroll not the summon sequence... and if I change the sp_nodraw round - he doesnt disapear as he should (which he does the other way round)
If I change the touch damage he walks over the scroll and he cant pick it up therefore nothing happens.. (sorry I am retarded when it comes to this stuff *sighs* baby steps!)

If I change the touch damage he walks over the scroll and he cant pick it up therefore nothing happens.. (sorry I am retarded when it comes to this stuff *sighs* baby steps!)
Maybe the object with which you attached the script is too small? I once attached a cscript to a coin and no matter how hard I tried it wouldn't work. Just a wild guess is all.
I know the current_sprite is the scroll, I was thinking that every time the script gets to the wait(250) then it will start again from the beginning because Dink is still touching it. Didn't test or anything though so may well be wrong
Don't see how it would both play the sequence and tell you the backpack is full otherwise.
E: Change the touch damage in the touch procedure I meant, not in the main.

Don't see how it would both play the sequence and tell you the backpack is full otherwise.
E: Change the touch damage in the touch procedure I meant, not in the main.
void touch(void) { sp_touch_damage(¤t_sprite, 0); //rest of code )
will send it if you want it really does both hehe i am so dumb i make this thing do stuff it shouldnt...
eek and yes i changed it to the touch (as in removed and put it under touch)but if touch is set to 0 how can he activate the rest?
eek and yes i changed it to the touch (as in removed and put it under touch)but if touch is set to 0 how can he activate the rest?
It should look like this:
void main( void )
{
//set this sprite to react to touch, but not to being hit
sp_touch_damage(¤t_sprite, -1);
sp_nohit(¤t_sprite, 1);
//using this global variable to get around
//a bug with Dink freezing as he touches and
//tries to talk to the scroll at the same time
&dddd = 0;
}
void touch( void )
{
sp_touch_damage(¤t_sprite,0);
//rest of the script
void main( void )
{
//set this sprite to react to touch, but not to being hit
sp_touch_damage(¤t_sprite, -1);
sp_nohit(¤t_sprite, 1);
//using this global variable to get around
//a bug with Dink freezing as he touches and
//tries to talk to the scroll at the same time
&dddd = 0;
}
void touch( void )
{
sp_touch_damage(¤t_sprite,0);
//rest of the script
Ahhh i needed both
Thanks heaps for that scratcher (and Sparrow) - now how do I make him come back after the animation sequence is completed
That plays thru nicely as it should - but no character when it done - hes invisible still...
sp_nodraw(¤t_sprite,1);
preload_seq(38);
sp_nodraw(1,0);
sp_nodraw(¤t_sprite,1);
int &summon = create_sprite(312,257,4,38,1);
sp_seq(&summon,38);
sp_frame_delay(&summon,100);
sp_brain(&summon, 7);
sp_nodraw(1,1);
wait(250);
If I change the 3rd line to 1,1 and 9th line to 1,0 he doesnt disappear and stands back whilst the sequence plays


That plays thru nicely as it should - but no character when it done - hes invisible still...
sp_nodraw(¤t_sprite,1);
preload_seq(38);
sp_nodraw(1,0);
sp_nodraw(¤t_sprite,1);
int &summon = create_sprite(312,257,4,38,1);
sp_seq(&summon,38);
sp_frame_delay(&summon,100);
sp_brain(&summon, 7);
sp_nodraw(1,1);
wait(250);
If I change the 3rd line to 1,1 and 9th line to 1,0 he doesnt disappear and stands back whilst the sequence plays
There is no wait at all between sp_nodraw(1,1) and sp_nodraw(1,0). Dink is told to turn invisible, and then turn visible again at the same instant... Put the sp_nodraw(1,0) after the wait() command instead:
sp_nodraw(¤t_sprite,1);
preload_seq(38);
sp_nodraw(1,1);
sp_nodraw(¤t_sprite,1);
int &summon = create_sprite(312,257,4,38,1);
sp_seq(&summon,38);
sp_frame_delay(&summon,100);
sp_brain(&summon, 7);
wait(250);
sp_nodraw(1,0);
sp_nodraw(¤t_sprite,1);
preload_seq(38);
sp_nodraw(1,1);
sp_nodraw(¤t_sprite,1);
int &summon = create_sprite(312,257,4,38,1);
sp_seq(&summon,38);
sp_frame_delay(&summon,100);
sp_brain(&summon, 7);
wait(250);
sp_nodraw(1,0);

Did you switch the numbers between sp_nodraw(1,1) and sp_nodraw(1,0)? As Sparrowhawk said, 1 is for making things invisible, 0 is for making them visible again.
Also, with wait(250), Dink only remains invisible for 250 milliseconds - it's a pretty dang quick animation if it only takes that long, so you might want to use a longer wait.
Also, with wait(250), Dink only remains invisible for 250 milliseconds - it's a pretty dang quick animation if it only takes that long, so you might want to use a longer wait.

yep i did the switcheroo
but playing with the wait... hmm...
All working YAY,
As discussed on chat - it was the wait that needed adjusting (big time) thank you SO very much
He left and came back so fast i missed it.
/me hands out bunches of bananas and some mighty squishy hugs thanks heaps!

but playing with the wait... hmm...
All working YAY,
As discussed on chat - it was the wait that needed adjusting (big time) thank you SO very much

/me hands out bunches of bananas and some mighty squishy hugs thanks heaps!
Me bites banana... oops that your finger MsDink... *hides face*