Prowler Productions
  Dink Smallwood Forum
  Where do I put set_keep_mouse?

Post New Topic  
profile | register | faq

Author Topic:   Where do I put set_keep_mouse?
Tamtur posted 01-15- 01:49 PM CT (US)   Click Here to See the Profile for Tamtur   Click Here to Email Tamtur  
I have been trying to keep the mouse in my dmod and have not been successful yet. I do have sprite 1 with a brain of 13. I don't know exactly where to put set_keep_mouse(1) (does it need the void in front of it?) - the tutorial only says "after the game has loaded". Also, are there other parameters for the sprite that are important to set? (hardness, speed, etc.) Will sprite one be the mouse pointer?


Thanks
Tamtur

Tamtur posted 01-15- 03:33 PM CT (US)     Click Here to See the Profile for Tamtur  Click Here to Email Tamtur     
Ok, sorry this is so long, but I have more questions.

I just realized that sprite 1 is Dink and that the pointer in the opening screen is actually Dink looking like a pointer. So what I am attempting is to have Dink be a sprite and the mouse be Dink. I am trying to make it work so that when I click on something it gets the x-y coordinates, then makes the Dink sprite move there... I am starting just by attempting to set the x and y coordinates as variables in the script. Would this be accomplished by:
int &xgoal = sp_x(¤t_sprite,-1);
int &ygoal = sp_y(¤t_sprite,-1);

where ¤t_sprite is the sprite clicked on - it would be called by the click procedure. If the above worked, I would then set the dink sprite's goal to the above numbers (adjusting him to walk around things).

But I'm getting ahead of myself because I still haven't figured out how to keep the mouse.

Is there an easier way to do this?

Any help is welcome

Thanks
Tamtur

Tamtur posted 01-15- 03:37 PM CT (US)     Click Here to See the Profile for Tamtur  Click Here to Email Tamtur     
That should be sp_x( & current_sprite,-1); (etc and without the spaces)

redink1 posted 01-15- 06:41 PM CT (US)     Click Here to See the Profile for redink1  Click Here to Email redink1     
Add this to the end of Start1.c (you'll probably see some familiar lines):

&update_status = 1;
draw_status();
set_keep_mouse(1);
//We're done, so let's kill this task & the game will begin!
kill_this_task();

Then, when you want to turn Dink into the mouse:

sp_seq(1, 0);
sp_brain(1, 13);
sp_pseq(1,10);
sp_pframe(1,8);
sp_que(1,20000);
sp_noclip(1, 1);
sp_base_walk(1, 0);
sp_base_attack(1, 0);
sp_nohit(1,1);

To change him back to Dink:

sp_base_walk(1, 70);
sp_base_attack(1, 100);
sp_dir(1, 8);
sp_brain(1, 1);
sp_que(1, 0);
sp_noclip(1, 0);

As for your second problem... you have it about figured out. I can't think of an easier way to do it. Make sure the sprite you click on is Brain 14 and has sp_touch_damage(current_sprite,-1); though.

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.