At the moment i have a problem with Animations and Rotations in conjunction with stuff that need to be executet on a regular time basis.
I have a pawn, that should carry and start an "explosion" (in fact it's rather a light) regularly, like the flashing indicator on a car.
But every time i do a Rotation or a Animation, the effect runs "out of rhythm".
Is there any scripting style, so that you can let the animations finish, without interrupting the rest ?
Animations and Timing
i honestly never got too deep into pawn scripting, so ill dodge the actual question, but i have an idea: if you cannot do this, you might simply make a second pawn which has the explosion, with the entityname and bonename fields filled in appropriately to attach it to the first entity, and in the attached entity simply have the flash script.
RF2 site: http://realityfactory2.sourceforge.net/
RF2 tasks: http://sourceforge.net/pm/?group_id=179085
RF2 tasks: http://sourceforge.net/pm/?group_id=179085
That would be a Solution !
But I still have no clue what is going on in Low Level Orders, i mean the return 0; / return; / Return(); stuff...
I always read that the Orders would continue to loop (when they are not sealed with a return 0;) even if the Interpreter was sent to/ and executes another Order.
But I could not use / get that to work until now...
So i hope that there would be a possibility to let the Animations and Rotation finish, while the Interpreter jumps to another Order and do that in the main Pawn Script.
But I still have no clue what is going on in Low Level Orders, i mean the return 0; / return; / Return(); stuff...
I always read that the Orders would continue to loop (when they are not sealed with a return 0;) even if the Interpreter was sent to/ and executes another Order.
But I could not use / get that to work until now...
So i hope that there would be a possibility to let the Animations and Rotation finish, while the Interpreter jumps to another Order and do that in the main Pawn Script.
i dont know, but as for the return stuff, if it works the same way it does in c++, it returns a variable, for instance, you could have an order named HasWeapon() that returns 1 if the enemy has a weapon and 0 if the enemy does not, then you could say in another function
if(HasWeapon() == 1)
{
NewOrder("Fire");
}
just as an example. there are probably errors, ive never tried to use return in rf scripting. i really need to use rf more...
to my knowledge orders do not continue to loop, thats why theres the restartorder() function, for instance:
Idle[ ()
{
PlayAnimation("Idle", true, "");
RestartOrder();
} ]
would constantly play that pawns idle animation.
sorry im not as knowledgeable about pawns as i should be, i just never got really deep into scripting them...
if(HasWeapon() == 1)
{
NewOrder("Fire");
}
just as an example. there are probably errors, ive never tried to use return in rf scripting. i really need to use rf more...
to my knowledge orders do not continue to loop, thats why theres the restartorder() function, for instance:
Idle[ ()
{
PlayAnimation("Idle", true, "");
RestartOrder();
} ]
would constantly play that pawns idle animation.
sorry im not as knowledgeable about pawns as i should be, i just never got really deep into scripting them...
RF2 site: http://realityfactory2.sourceforge.net/
RF2 tasks: http://sourceforge.net/pm/?group_id=179085
RF2 tasks: http://sourceforge.net/pm/?group_id=179085
ah. forgot to add to the post, again, if it works the same way it does in c++, return can exit an order prematurely.
i've put off getting deeply into simkin for too long...
i've put off getting deeply into simkin for too long...
RF2 site: http://realityfactory2.sourceforge.net/
RF2 tasks: http://sourceforge.net/pm/?group_id=179085
RF2 tasks: http://sourceforge.net/pm/?group_id=179085