Page 1 of 1
Odfs
Posted: Wed Feb 06, 2008 10:39 pm
by woner11
Is it possible to have a property in an odf change over a set period of time? (please say yes)

Re: Odfs
Posted: Wed Feb 06, 2008 11:01 pm
by [RDH]Zerted
Yes, depending on what it is. You can use SetClassProperty() to change it ingame through the lua. Changing some things online, such as ammo counts, will crash the game.
Re: Odfs
Posted: Wed Feb 06, 2008 11:08 pm
by woner11
Could I for example have the damage radius change or the push factor change over a period of time. From like push to pull or something like that.
Re: Odfs
Posted: Wed Feb 06, 2008 11:54 pm
by [RDH]Zerted
No, you can have a lua timer or event and then change the ODF value when that timer finishes or the event is triggered.
Re: Odfs
Posted: Thu Feb 07, 2008 1:01 am
by woner11
I'm sorry, I am trying to advance in my knowledge of scripting, so I'm trying to understand this whole thing. So, you're saying I have an odf. A timer ticks down and then a value changes. Right? How do you set this up in your odf. I think this could be very helpfull for some of the new things I'm trying to do. Such as (I'm sorry Teancum) force telekinesis. Or other things. It isn't limited to that, there are other things too.
Re: Odfs
Posted: Fri Feb 08, 2008 4:27 am
by Eagle Eye
read the battlefront2_scripting_system doc in the documentation folder. This will help you getting an wider overview over all the battlefront 2 lua functions for finding out what u need.
Re: Odfs
Posted: Fri Feb 08, 2008 12:36 pm
by Maveritchell
woner11 wrote:I'm sorry, I am trying to advance in my knowledge of scripting, so I'm trying to understand this whole thing. So, you're saying I have an odf. A timer ticks down and then a value changes. Right? How do you set this up in your odf. I think this could be very helpfull for some of the new things I'm trying to do. Such as (I'm sorry Teancum) force telekinesis. Or other things. It isn't limited to that, there are other things too.
Sounds like you've got a couple problems right off the bat. If I've inferred correctly, you want to make a weapon that does push-pull-push-pull ad infinitum to do a sort've hackjob "levitate" power. It's an interesting concept but I don't think you can pull it off for a couple reasons.
1) You can't have multiple (or more than 2, specifically) push (or pull) effects per attack. Once you press a button to do a force push-type power, it deploys one ordnance (or two if you have a secondary ordnance) instantaneously. I'm pretty positive there's no good workaround 'cause I've played with this a lot. I wanted to make a "force whirlwind" (a la KotOR) power, which would lift the enemy up and the best I could come up with was a primary push and secondary pull, which lifts the enemy up but it only lasts for a fraction of a second.
2) Even if you could get enough pushes/pulls triggered, to constantly switch between the two to create the effect you want would require microtimers (timers lasting only a fraction of a second), which I believe is something the timers in .lua were not designed for.
Re: Odfs
Posted: Fri Feb 08, 2008 5:38 pm
by woner11
Is it then possible to have more than two ordances?
Re: Odfs
Posted: Fri Feb 08, 2008 7:04 pm
by Maveritchell
That's what I just answered. Not as far as I know.
Re: Odfs
Posted: Fri Feb 08, 2008 11:38 pm
by woner11
This may seem unrelated, but it is. I have one quick question: What does SecondaryOrdnancePeriod = 1 mean, and what would happen if I increase the value or decrease it? If this is documented somewhere please let me know.
Re: Odfs
Posted: Sat Feb 09, 2008 3:20 pm
by SBF_Dann_Boeing
Damage and laser color can be changed over the duration of a laser's travel. Like it starts out as green laser that does 500 damage, and ends up as a red laser with 150 damage after it's travelled for a while.
Like this:
Code: Select all
MaxDamage = "500.0"
DamageTransitionDelay = "0.2" //How long in seconds before the damage change begins.
DamageTransitionPeriod = "0.1" //How long in seconds the damage change lasts.
DamageFinalDamage = "150.0" //What the damage would be at the end of the transition period. A negative value means that no change is applied.
FadeLightColor = "1" //Whether or not the color on the light should be faded along with the damage.
EndLaserGlowColor = "160 43 43 100" //What color the laser glow will be by the end of the transition. Varies over DamageTransitionPeriod. (only for lasers.)
EndLightColor = "160 43 43 150" //What color light will be applied by the end of the transition. Varies over DamageTransitionPeriod.