Is there a way to have DelayCommand reference a float stored on OBJECT_SELF as the amount of time to delay?
Sorry if this is a nub question, scripting skills are still lacking quite a bit.
Delay Command Variable driven?
Débuté par
Birdman076
, févr. 21 2012 07:42
#1
Posté 21 février 2012 - 07:42
#2
Posté 21 février 2012 - 07:47
<taking a crack...>
DelayCommand((GetLocalFloat(OBJECT_SELF,"fDelay")), SomeCommand());
Should work fine, though I am no place I can test it...
<...at it>
DelayCommand((GetLocalFloat(OBJECT_SELF,"fDelay")), SomeCommand());
Should work fine, though I am no place I can test it...
<...at it>
#3
Posté 21 février 2012 - 07:49
Compiles, I think that did the trick I'll test it out after I get done putting in all the parameters. Thank you sir.
#4
Posté 21 février 2012 - 07:50
Sure can. Something like so:
void main()
{
float MyDelay = GetLocalFloat(OBJECT_SELF, "NAME OF FLOAT");
DelayCommand(MyDelay, ActionToDelay);
}
Whoops. Rolo beat me to it.
void main()
{
float MyDelay = GetLocalFloat(OBJECT_SELF, "NAME OF FLOAT");
DelayCommand(MyDelay, ActionToDelay);
}
Whoops. Rolo beat me to it.
Modifié par GhostOfGod, 21 février 2012 - 07:51 .
#5
Posté 21 février 2012 - 08:13
<frantically...>
Yeah, but I was in a hurry. I just didn't want to declare a single instance variable :-P
Your's is a *lot* easier to read/follow. :-) <yup. neater>
<...finger-combing his beard>
Yeah, but I was in a hurry. I just didn't want to declare a single instance variable :-P
Your's is a *lot* easier to read/follow. :-) <yup. neater>
<...finger-combing his beard>





Retour en haut






