1 registered members (AndrewAMD),
568
guests, and 3
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: model selected
[Re: kenced]
#414310
12/28/12 15:57
12/28/12 15:57
|
Joined: Jul 2008
Posts: 2,107 Germany
rayp
X
|
X
Joined: Jul 2008
Posts: 2,107
Germany
|
you could color it with
..
set(my,LIGHT);
my.lightrange = 0;
my.red = 255;
my.green = 1;
my.blue = 1;
..
Another way u place a sprite ( a circle fex ) at the entity. fex
define selected skill100
void selection_sprite(){ // fex a circle sprite
set(my,PASSABLE|TRANSLUCENT);
my.tilt += 90;
while(you){
vec_set(my.x, you.x);
if (you) if (!you.selected) break;
wait(1);
}
wait(1);
ptr_remove(me);
}
..
my.selected = 1;
ent_create("circle.tga", vector(my.x, my.y, my.z), selection_sprite);
..
wait(-1);
my.selected = 0;
Last edited by rayp; 12/28/12 16:03.
Acknex umgibt uns...zwischen Dir, mir, dem Stein dort... "Hey Griswold ... where u gonna put a tree that big ?" 1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected rayp.flags |= UNTOUCHABLE;
|
|
|
Re: model selected
[Re: kenced]
#414721
01/07/13 06:02
01/07/13 06:02
|
Joined: Jul 2008
Posts: 2,107 Germany
rayp
X
|
X
Joined: Jul 2008
Posts: 2,107
Germany
|
A flag is local. U need a global skill / var. U only want one selection right ? So u need a global var, like i said above. So not
set (my, FLAG1);
or
my.selected = 1;
do
var selected = 0;
action blabla...
..
Edit: U can use local flags or skills of course, but then u would need a FOR loop checking all ent's for selections before setting a new selection, possible too of course, but a bit more complicated.
..
for(you = ent_next(NULL); you; you = ent_next(you))
{
if(is(you, FLAG1))
reset (you, FLAG1);
}
..
Edit: While thinking about it, use the FOR-method. Cause its multi-selection-safe ^^
Last edited by rayp; 01/07/13 06:26.
Acknex umgibt uns...zwischen Dir, mir, dem Stein dort... "Hey Griswold ... where u gonna put a tree that big ?" 1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected rayp.flags |= UNTOUCHABLE;
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|