Page 1 of 1

Character lifetime. can this be set like the Jedis?

Posted: Sat Oct 03, 2009 8:24 pm
by Rends
I want to give one of my droids a limited lifetime .similar to the Jedi/hero lifetime
Can this be done?

Re: character lifetime. can this be set like the Jedis?

Posted: Sat Oct 03, 2009 8:29 pm
by Fiodis
You mean the shrinking lightsaber? That's heros-only. You could put a timer after which they die, and perhaps add time to it if they kill a unit, via LUA code.

Re: character lifetime. can this be set like the Jedis?

Posted: Sat Oct 03, 2009 8:33 pm
by AQT
Or isn't there an ODF parameter something like

Code: Select all

AddHealth     = ""
? Maybe if you insert in a big negative value the droid's health would slowly decrease over time.

Re: character lifetime. can this be set like the Jedis?

Posted: Sat Oct 03, 2009 8:34 pm
by StarkillerMarek
I just checked a few minutes ago, but nothing like that came up.

Re: character lifetime. can this be set like the Jedis?

Posted: Sat Oct 03, 2009 8:37 pm
by Xavious
StarkillerMarek wrote:I just checked a few minutes ago, but nothing like that came up.
Checked what? Using the AddHealth with a negative value should work (I think the 1.3 patch uses the AddHealth function, and you can use negative values there).

Re: character lifetime. can this be set like the Jedis?

Posted: Sat Oct 03, 2009 8:39 pm
by kinetosimpetus
AddHealth = "" //will add that amount of health each second, so the smaller negative, the slower it would drain.

Re: character lifetime. can this be set like the Jedis?

Posted: Sat Oct 03, 2009 10:03 pm
by Fiodis
Ah yes, you can do that via LUA or odf - easier with ODF.

Re: Character lifetime. can this be set like the Jedis?

Posted: Sat Oct 03, 2009 10:09 pm
by obiboba3po
I know its often done to regenerate health when some is lost, it should work in reverse as well

Re: Character lifetime. can this be set like the Jedis?

Posted: Sun Oct 04, 2009 5:00 pm
by Frisbeetarian
It would seem to be an effect of SetHeroClass(), which of course can only be used once per side.

Re: Character lifetime. can this be set like the Jedis?

Posted: Sun Oct 04, 2009 6:04 pm
by [RDH]Zerted
Frisbeetarian wrote:...which of course can only be used once per side.
Are you sure about that?

Re: Character lifetime. can this be set like the Jedis?

Posted: Sun Oct 04, 2009 6:21 pm
by Frisbeetarian
I'm actually sure that I was wrong.

Re: Character lifetime. can this be set like the Jedis?

Posted: Sun Oct 04, 2009 6:40 pm
by Fiodis
Actually, I remember in my earliest days of modding when I was working on Zorolar, I was trying to change the hero when I messed up and he appeared on the unit selection screen instead, but he had the lightsaber-health thing like a hero. Perhaps if you screwed up on purpose this way, you'd get what you wanted.

Re: Character lifetime. can this be set like the Jedis?

Posted: Sun Oct 04, 2009 8:55 pm
by StarkillerMarek
Fiodis wrote:Actually, I remember in my earliest days of modding when I was working on Zorolar, I was trying to change the hero when I messed up and he appeared on the unit selection screen instead, but he had the lightsaber-health thing like a hero. Perhaps if you screwed up on purpose this way, you'd get what you wanted.
How would he do that? And I am sorry for my last post in this thread, I was typing an e-mail to someone, but I did not remember to switch back to Micorsoft Mail, so it ended up being posted in here.

Re: Character lifetime. can this be set like the Jedis?

Posted: Sun Oct 04, 2009 9:51 pm
by Fiodis
I'm not sure how he would attain that (my mind worked differently back in those days) but I'm tossing out there that I had this result by accident. I'm pretty sure I had mistyped or misplaced something in the LUA dealing with heros. I'll work on this myself.

Re: Character lifetime. can this be set like the Jedis?

Posted: Sun Oct 04, 2009 9:58 pm
by kinetosimpetus
I know if you set the same unit as rifleman and hero, it will show in the rifleman spot, with hero timer, but no AI (at least I don't remember specifically seeing one using it... and never really tested it in MP) the hero unlock message would still pop up when using it, but would be the same guy.

Re: Character lifetime. can this be set like the Jedis?

Posted: Sun Oct 04, 2009 10:21 pm
by Darth_Squoobus
Rends wrote:I want to give one of my droids a limited lifetime .similar to the Jedi/hero lifetime
Can this be done?
Are you making a droid hero? Or are you just making a model with a limited warranty?

And I agree with AQT. Editing the ODF would be easier.

Re: Character lifetime. can this be set like the Jedis?

Posted: Sun Oct 04, 2009 11:01 pm
by [RDH]Zerted
Fiodis wrote:...trying to change the hero when I messed up and he appeared on the unit selection screen...
The last unit added to a team is processed as a hero if that team has a hero. If you use SetHeroClass on yoda and then do a AddUnitClass on luke while still in ScriptInit, Yoda will be on the unit selection screen and luke will be the unlocked hero the game gives you.

Re: Character lifetime. can this be set like the Jedis?

Posted: Mon Oct 05, 2009 6:16 am
by Rends
Darth_Squoobus wrote:
Rends wrote:I want to give one of my droids a limited lifetime .similar to the Jedi/hero lifetime
Can this be done?
Are you making a droid hero? Or are you just making a model with a limited warranty?

And I agree with AQT. Editing the ODF would be easier.
No hero, i just wanted to know if it is possible. At the end i switched most of my droids from droid class to soldiers because of better AI behavior.