Prowler Productions
  Dink Smallwood Forum
  Mouse pointer question...

Post New Topic  
profile | register | faq

Author Topic:   Mouse pointer question...
EP posted 02-16- 04:25 PM CT (US)   Click Here to See the Profile for EP   Click Here to Email EP  
I am trying to change which sprite the mouse pointer is set on. I know that the mouse pointer is assigned to the dink sprites in start.c, but I don't fully understand how, and I don't understand how to change this in the middle of a D-mod. Any help would be appreciated, thanks.
Tamtur posted 02-17- 01:17 AM CT (US)     Click Here to See the Profile for Tamtur  Click Here to Email Tamtur     
A few weeks ago I had some questions about keeping or turning on/off the mouse, and the replies here answered my questions. It's at http://www.prowler-pro.com/forum/Forum1/HTML/000402.html
Basically, the mouse pointer is set to whatever sprite you set as sprite 1, which is (normally) dink.
EP posted 02-18- 09:27 PM CT (US)     Click Here to See the Profile for EP  Click Here to Email EP     
What is causing me trouble now is switching the mouse pointer in the middle of the game. I attached the following to a base script for the room I want the pointer to change in:
void main(void)
{
sp_base_walk(1, 200); //the new sprite
//not sure how to adjust these next commands,
sp_base_attack(1, 100);
sp_dir(1, 8);
sp_brain(1, 1);
sp_que(1, 0);
sp_noclip(1, 0);

//lets give this new sprite hellfire to start out with, and arm it.
add_item("item-sfb", 70, 1);
&cur_weapon = 1;
arm_weapon();
}
This does not work, although it does work alright when I place these commands into start1.c Even when I put this in start1.c, the mouse pointer only looks like the new sprite when it is moving (because I only changed the base walk), and I'm not sure how to change the appearance of the script when it is standing still. Any help with either of these would be appreciated, thanks.

Tamtur posted 02-19- 02:57 PM CT (US)     Click Here to See the Profile for Tamtur  Click Here to Email Tamtur     
I attached this script into a sprite, and it works to switch the control from normal dink into a mouse pointer. It also creates a Dink sprite (&dinktry) that is in the same position but not controlled directly with the mouse. It looks like the mouse pointer just appears, although the dink sometimes jumps a little when it switches. &dinktry is a global variable.

void talk(void)
{
//saving dink's current location so I can put the new dink sprite there
int &xloc = sp_x(1,-1);
int &yloc = sp_y(1,-1);

//changing dink to the mouse
sp_seq(1, 0);
sp_brain(1, 13);
sp_que(1,20000);
sp_noclip(1, 1);
sp_base_walk(1, 0);
sp_base_attack(1, 0);
sp_nohit(1,1);

//these two commands are the ones that change the base sprite
sp_pseq(1,10);
sp_pframe(1,8);

//creating the dink sprite
&dinktry = create_sprite(&xloc,&yloc,1,12,1);
sp_base_walk(&dinktry, 70);
sp_base_attack(&dinktry, 100);
sp_speed(&dinktry, 2);
sp_timing(&dinktry, 33);
sp_base_idle(&dinktry, 522);
}

Post New Topic  Post Reply
Hop to:


Contact Us | Prowler Productions

Powered by: Ultimate Bulletin Board, Freeware Version 5.10a
Purchase our Licensed Version- which adds many more features!
© Infopop Corporation (formerly Madrona Park, Inc.), 1998 - 2000.