0 registered members (),
17,416
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: ahmm..please help me
[Re: Kaizen_31]
#250796
02/09/09 20:50
02/09/09 20:50
|
Joined: May 2008
Posts: 331 Lithuania, Vilnius
Jaxas
Senior Member
|
Senior Member
Joined: May 2008
Posts: 331
Lithuania, Vilnius
|
oject can't have 2 actions at the same time!you can assign only one thru wed or in ent_create  so, try rewrite in one action 
The smaller the bug, the harder it is to kill. _________________________________________ Forklift DEMO (3dgs)
|
|
|
Re: ahmm..please help me
[Re: Jaxas]
#250819
02/10/09 01:35
02/10/09 01:35
|
Joined: Jul 2008
Posts: 1,178 England
MrGuest
Serious User
|
Serious User
Joined: Jul 2008
Posts: 1,178
England
|
you can have an action which targets another action #define points skill41
action all_enemy(){
while(me){
//do your thing
wait(1);
}
}
action enemy10(){
my.points = 10;
all_enemy();
}
action enemy50(){
my.points = 50;
all_enemy();
} then simply add the targets.points to the score, and assign these in wed as necessary hope this helps btw, try naming your forum topics something similar to the problem
|
|
|
Re: ahmm..please help me
[Re: MrGuest]
#250837
02/10/09 06:21
02/10/09 06:21
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
Another way it can be done (although I advise against it) is to have the first action call the second, then they will both be running for the entity. action Secondary_Action()
{ wait(1); //optional pause to let primary action finish "setting up"
while(me)
{
//do score tracking stuff ??
wait(1);
}
}
action Primary_Action()
{
Secondary_Action(); //This will use the ME pointer, as it is NOW
//
while(me)
{
//do entity movement stuff ??
if(my.LifePoints < 1) ent_remove(me);
wait(1);
}
}
...
// ent_create in some function OR Primary_Action assigned in WED
ent_create("p1.mdl", nullvector, Primary_Action);
...
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Re: ahmm..please help me
[Re: Kaizen_31]
#250982
02/11/09 02:43
02/11/09 02:43
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
Oh, OK. If thats all your oing to do in the enemy actions its very wasteful, but if theres other stuff in there then its OK. Enemy actions would be something like this... acion enemy_1()
{
while(me)
{
//do AI stuff
if(my.health<=0) ent_remove(me);
wait(1);
}
//this gets run when entity is dead...
player_score = player_score + 50;
}
acion enemy_2()
{
while(me)
{
//do other AI stuff
if(my.health<=0) ent_remove(me);
wait(1);
}
//this gets run when entity is dead...
player_score = player_score + 20;
}
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
|