Bioware Archive
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
SMF - Just Installed!
Home
Help
Login
Register
Bioware Archive
»
Bioware Archive V2
»
Builders - Scripting
»
Delay Command Variable driven?
« previous
next »
Print
Pages: [
1
]
Author
Topic: Delay Command Variable driven? (Read 344 times)
Legacy_Birdman076
Sr. Member
Posts: 320
Karma: +0/-0
Delay Command Variable driven?
«
on:
February 21, 2012, 07:42:28 pm »
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.
Logged
Legacy_Rolo Kipp
Hero Member
Posts: 4349
Karma: +0/-0
Delay Command Variable driven?
«
Reply #1 on:
February 21, 2012, 07:47:02 pm »
<taking a crack...>
DelayCommand((GetLocalFloat(OBJECT_SELF,"fDelay")), SomeCommand());
Should work fine, though I am no place I can test it...
<...at it>
Logged
Legacy_Birdman076
Sr. Member
Posts: 320
Karma: +0/-0
Delay Command Variable driven?
«
Reply #2 on:
February 21, 2012, 07:49:28 pm »
Compiles, I think that did the trick I'll test it out after I get done putting in all the parameters. Thank you sir.
Logged
Legacy_GhostOfGod
Hero Member
Posts: 1490
Karma: +0/-0
Delay Command Variable driven?
«
Reply #3 on:
February 21, 2012, 07:50:11 pm »
Sure can. Something like so:
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 .
Logged
Legacy_Rolo Kipp
Hero Member
Posts: 4349
Karma: +0/-0
Delay Command Variable driven?
«
Reply #4 on:
February 21, 2012, 08:13:58 pm »
<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>
Logged
Print
Pages: [
1
]
« previous
next »
Bioware Archive
»
Bioware Archive V2
»
Builders - Scripting
»
Delay Command Variable driven?