: why doesn't this sprite stay dead?
: void die ()
: {
: int &hold = sp_editor_num(¤t_sprite);
: if (&hold != 0)
: {
: editor_type(&hold, 1);
: }
: sp_kill(¤t_sprite,1);
: }
: //Looks just like a script from the original Dink.
: //This didn't work either!
: void die ()
: {
: int &hold = sp_editor_num(¤t_sprite);
: if (&hold != 0)
: editor_type(&hold, 1);
: }
Did you place this sprite from Editor or you create it from a script? If you create it from script, then sp_editor_num(¤t_sprite) would be zero and therefore it would come back again and again...
You need to use version or global variable to decide if you want to create this sprite in the first place.
If you did place it in Editor, then I don't know. Sorry. ;)
: why doesn't this sprite stay dead?
: void die ()
: {
: int &hold = sp_editor_num(¤t_sprite);
: if (&hold != 0)
: {
: editor_type(&hold, 1);
: }
: sp_kill(¤t_sprite,1);
: }
: //Looks just like a script from the original Dink.
: //This didn't work either!
: void die ()
: {
: int &hold = sp_editor_num(¤t_sprite);
: if (&hold != 0)
: editor_type(&hold, 1);
: }
: Also in the bane of the magi, the spirit door should be created with br.6 , repeating a sequence of movement within the door.
: But it appears as a single frame
: /
: &dr = create_sprite(&gox,&goy,6,892,1);
: sp_script(&dr,"edoor");
: /
: putting this in the "edoor" script didn't work either. (told ya my computer is possesed:))
: sp_brain(¤t_sprite,6);
: yet if I set the sprite with the editor, and set brain properties to 6, it works! Wierd.
i dont know whats wrong with the dying stuff, but for your door, you need to give it a sequence! you do not need to give it brain 6 again, because you already did when you created it (x,y,brain,pseq,pframe) in case you are wondering, the pseq and pframe is just what the sprite is with brain 0, doing nothing. when you give it a repeat brain, you need to give it the seq that is will repeat.. for instance: sp_seq(&door, 814); sequence 814 over and over and over and over...
: i dont know whats wrong with the dying stuff, but for your door, you need to give it a sequence! you do not need to give it brain 6 again, because you already did when you created it (x,y,brain,pseq,pframe) in case you are wondering, the pseq and pframe is just what the sprite is with brain 0, doing nothing. when you give it a repeat brain, you need to give it the seq that is will repeat.. for instance: sp_seq(&door, 814); sequence 814 over and over and over and over...
I was gonna say the same thing. As for the not-dead-thing, can you give any more of the script, or general information about the situation?
: : i dont know whats wrong with the dying stuff, but for your door, you need to give it a sequence! you do not need to give it brain 6 again, because you already did when you created it (x,y,brain,pseq,pframe) in case you are wondering, the pseq and pframe is just what the sprite is with brain 0, doing nothing. when you give it a repeat brain, you need to give it the seq that is will repeat.. for instance: sp_seq(&door, 814); sequence 814 over and over and over and over...
: I was gonna say the same thing. As for the not-dead-thing, can you give any more of the script, or general information about the situation?
Thanks. That will fix the door, as for the kight not staying dead, he was set with the editor but now I've learned a bit more mabey I'll get it.