Gamestudio Links
Zorro Links
Newest Posts
WFO Training with parallel cores Zorro64
by Martin_HH. 02/24/26 19:51
Zorro version 3.0 prerelease!
by TipmyPip. 02/24/26 17:09
ZorroGPT
by TipmyPip. 02/23/26 21:52
Camera always moves upwards?
by clonman. 02/21/26 09:29
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
5 registered members (Martin_HH, TipmyPip, AndrewAMD, Grant, USER0328), 5,287 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
entity clickable? #388167
11/29/11 02:24
11/29/11 02:24
Joined: Nov 2011
Posts: 17
Caloocan City
kHimaSutra Offline OP
Newbie
kHimaSutra  Offline OP
Newbie

Joined: Nov 2011
Posts: 17
Caloocan City
guys.. can you help me..
i'm planning to highlight an entity when it was clicked and holds the entity to move by clicking any location.

function scan_ent()
{
if(event_type == EVENT_CLICK)
{
printf("Entity Detected!"); // testing part
}
}

action play_walk() //animation of "walk" for this entity
{
enable_mouse = 2;
my.emask |= ENABLE_CLICK;
my.event = scan_ent;

while(1)
{ walk_percent += 3*time_step ;
ent_animate(me,"walk",walk_percent,ANM_CYCLE);
wait(1);
}
}

function cursor() //enables the mouse;
{
mouse_mode = 2;
mouse_map = cursor_pcx;
mouse_range = 2000;
}

Re: entity clickable? [Re: kHimaSutra] #388170
11/29/11 08:24
11/29/11 08:24
Joined: Mar 2006
Posts: 1,993
Karlsruhe
PadMalcom Offline
Serious User
PadMalcom  Offline
Serious User

Joined: Mar 2006
Posts: 1,993
Karlsruhe
Does your code work? What's your question?

Re: entity clickable? [Re: PadMalcom] #388316
12/01/11 00:30
12/01/11 00:30
Joined: Nov 2011
Posts: 17
Caloocan City
kHimaSutra Offline OP
Newbie
kHimaSutra  Offline OP
Newbie

Joined: Nov 2011
Posts: 17
Caloocan City
yes sir..

when i clicked the model.. it shows an prompt "Entity Detected".
i wanna know how to highlight the "edge" of the entity once it was clicked?

Re: entity clickable? [Re: kHimaSutra] #388317
12/01/11 07:42
12/01/11 07:42
Joined: Mar 2006
Posts: 1,993
Karlsruhe
PadMalcom Offline
Serious User
PadMalcom  Offline
Serious User

Joined: Mar 2006
Posts: 1,993
Karlsruhe
Guess you'll need a shader for that. Look at this one here:

http://www.opserver.de/wiki/index.php/Glow_Shader_With_Alpha_Support

Or you simply enlight the model by changing its brightness.

Good luck

Re: entity clickable? [Re: PadMalcom] #388319
12/01/11 08:39
12/01/11 08:39
Joined: Nov 2011
Posts: 17
Caloocan City
kHimaSutra Offline OP
Newbie
kHimaSutra  Offline OP
Newbie

Joined: Nov 2011
Posts: 17
Caloocan City
maybe i'll choose to change the brightness of the model..

one question.. how do i remove the ambient of the model when i used this code:

vec_set(mat_model.ambient_blue,vector(255,0,0));


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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