Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
0 registered members (), 635 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Mouse Gestures #250773
02/09/09 17:38
02/09/09 17:38
Joined: Feb 2009
Posts: 2
M
Michael_Stump Offline OP
Guest
Michael_Stump  Offline OP
Guest
M

Joined: Feb 2009
Posts: 2
wondering how to tell if the mouse is over an entity like an enemy or a door or any other model so that I can change the mouse icon (kinda like when you move your mouse over a hyperlink in IE)

Re: Mouse Gestures [Re: Michael_Stump] #250775
02/09/09 18:19
02/09/09 18:19

M
mercuryus
Unregistered
mercuryus
Unregistered
M



You can use mouse_ent to get the entity touched by the mouse pointer.
If you typify all your entites (e.g. set skill1 to a typedefined id) you can change the mouse_map when touching an entity.

Code:
function auto_mousecursor(){
  
  while(1){
    if(mouse_ent){
      switch(mouse_ent.skill1){
        case gc_typid_enemy: mouse_map=bmp_sword; break;
        case gc_typid_gold:  mouse_map=bmp_hand; break;
        case gc_typid_food: mouse_map=bmp_bag; break;
        case gc_typid_citizen: mouse_map=bmp_talk; break;
        deafult: mouse_map=bmp_cursor; break;
      }
    }else{
      mouse_map=bmp_cursor; 
    }
  }
}


got it?

Re: Mouse Gestures [Re: ] #251193
02/11/09 21:27
02/11/09 21:27
Joined: Feb 2009
Posts: 2
M
Michael_Stump Offline OP
Guest
Michael_Stump  Offline OP
Guest
M

Joined: Feb 2009
Posts: 2
sweet thanks

Re: Mouse Gestures [Re: Michael_Stump] #254404
03/03/09 05:29
03/03/09 05:29
Joined: Jun 2007
Posts: 152
Norway
D
Darkyyes Offline
Member
Darkyyes  Offline
Member
D

Joined: Jun 2007
Posts: 152
Norway
I need to ask for help in this function, how exactly to make my "enemies" recognizable with this function?


New to lite-c and gamestudio in general, thank you for reading.
Com, A7 v7.7
Re: Mouse Gestures [Re: Darkyyes] #254405
03/03/09 06:35
03/03/09 06:35

M
mercuryus
Unregistered
mercuryus
Unregistered
M



You have to use EVENTS.

The event to enable an entity touched by the mouse pointer is ENABLE_TOUCH (release: ENABLE_RELEASE).
Read the manual about events for this.
Watch the mouse_range to be shure you "reach" the entites.


Gamestudio download | chip programmers | 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