|
Reset entity's skill
#110307
02/02/07 11:30
02/02/07 11:30
|
Joined: Dec 2006
Posts: 40
viktoria
OP
Newbie
|
OP
Newbie
Joined: Dec 2006
Posts: 40
|
How can i call all entities(about 50), and reset it all from another function? They were created in Wed and dont"t have entity pointer in Script, but have an action function. Something of the kind: Code:
define blocked, skill1; numberOfEntities = 50;
function f1{ while (i<= numberOfEntities){ ["entityName"+i].blocked = 0; i +=1; } }
|
|
|
Re: Reset entity's skill
[Re: viktoria]
#110308
02/02/07 12:47
02/02/07 12:47
|
Joined: Jul 2002
Posts: 4,436 Germany, Luebeck
Xarthor
Expert
|
Expert
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
|
There is an instruction called "ent_next(entity)" please refer to the manual for more information. Here is the example code rewritten to fit your needs: Code:
define blocked, skill1;
function reset_skill() { you = ent_next(NULL);
while(you != NULL) { you.blocked = 0; you = ent_next(you); } }
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|