Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (AndrewAMD, Ayumi, NewbieZorro), 14,141 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Mouse courser? #394091
02/09/12 22:39
02/09/12 22:39
Joined: Nov 2009
Posts: 70
Siwler Offline OP
Junior Member
Siwler  Offline OP
Junior Member

Joined: Nov 2009
Posts: 70
w_sup everyone?

I know how to switch mouse courser on and off on_level_load.

What I can't figure out is how to switch mouse courser on only certain levels, sense I have a lot of levels and I need to switch courser on specified level with out using on_a-z buttons.

Is it possible to do this and how?

Thank you if you chose to help.
Code:
on_level_load = change_mouse_mode;

function change_mouse_mode()
{
	mouse_map = cursor_pcx;
	
	if (mouse_mode >= 1) 
  { // was it already on?
    mouse_mode = 0;
  } 
   else 
  {
    mouse_mode = 1; 
  } 
  while (mouse_mode > 0) // move it over the screen
  {  
    vec_set(mouse_pos,mouse_cursor);
    wait(1);	
  }
  
}




Honesty will get you far, were dishonesty will get you only so far in life.

Re: Mouse courser? [Re: Siwler] #394092
02/09/12 22:50
02/09/12 22:50
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Probably the easiest solution:

action level_with_mouse()
{
mouse_activate(); // or mouse_mode = 4;
ptr_remove(me);
}


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Mouse courser? [Re: Superku] #394097
02/09/12 23:58
02/09/12 23:58
Joined: Nov 2009
Posts: 70
Siwler Offline OP
Junior Member
Siwler  Offline OP
Junior Member

Joined: Nov 2009
Posts: 70
Thanks for the help.

This is how I have it working, for each level that needs mouse courser active I call mouse_mode = 4; inside level_change code and for levels that don't need courser I call mouse_mode = 0;.

I hope this method of calling mouse_mode for each level don't complicate things later on.


Honesty will get you far, were dishonesty will get you only so far in life.

Re: Mouse courser? [Re: Siwler] #394100
02/10/12 00:48
02/10/12 00:48
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
I think you didn't understand Superku's suggestion. He meant that you should place an entity in every level you need the mouse to be active in and assign the action he posted to that entity. Additionally you should disable the mouse right before you call level_load. This way the mouse gets inactive as soon as a new level is loaded and if the level contains such a dummy entity it gets activated.


Always learn from history, to be sure you make the same mistakes again...

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1