Character lifetime. can this be set like the Jedis?
Moderator: Moderators
- Rends
- Sith

- Posts: 1278
- Joined: Fri Oct 15, 2004 6:34 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Germany
- Contact:
Character lifetime. can this be set like the Jedis?
I want to give one of my droids a limited lifetime .similar to the Jedi/hero lifetime
Can this be done?
Can this be done?
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: character lifetime. can this be set like the Jedis?
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.
-
AQT
- Gametoast Staff

- Posts: 4910
- Joined: Sat Nov 03, 2007 4:55 pm
- Location: SoCal, USA
Re: character lifetime. can this be set like the Jedis?
Or isn't there an ODF parameter something like
? Maybe if you insert in a big negative value the droid's health would slowly decrease over time.
Code: Select all
AddHealth = ""- StarkillerMarek
- Rebel Colonel

- Posts: 611
- Joined: Wed Aug 12, 2009 4:42 pm
- Location: I may be back.
Re: character lifetime. can this be set like the Jedis?
I just checked a few minutes ago, but nothing like that came up.
-
Xavious
- Sith Master

- Posts: 2783
- Joined: Mon Jun 12, 2006 3:46 pm
Re: character lifetime. can this be set like the Jedis?
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).StarkillerMarek wrote:I just checked a few minutes ago, but nothing like that came up.
-
kinetosimpetus
- Imperial Systems Expert

- Posts: 2381
- Joined: Wed Mar 25, 2009 4:15 pm
- Projects :: A secret project
Re: character lifetime. can this be set like the Jedis?
AddHealth = "" //will add that amount of health each second, so the smaller negative, the slower it would drain.
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: character lifetime. can this be set like the Jedis?
Ah yes, you can do that via LUA or odf - easier with ODF.
-
obiboba3po
- 2008 Most Technically Challenging Avatar
- Posts: 2376
- Joined: Tue Feb 12, 2008 7:46 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: NJ, USA
Re: Character lifetime. can this be set like the Jedis?
I know its often done to regenerate health when some is lost, it should work in reverse as well
- Frisbeetarian
- Jedi

- Posts: 1233
- Joined: Wed Sep 12, 2007 3:13 pm
Re: Character lifetime. can this be set like the Jedis?
It would seem to be an effect of SetHeroClass(), which of course can only be used once per side.
- [RDH]Zerted
- Gametoast Staff

- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
Re: Character lifetime. can this be set like the Jedis?
Are you sure about that?Frisbeetarian wrote:...which of course can only be used once per side.
- Frisbeetarian
- Jedi

- Posts: 1233
- Joined: Wed Sep 12, 2007 3:13 pm
Re: Character lifetime. can this be set like the Jedis?
I'm actually sure that I was wrong.
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: Character lifetime. can this be set like the Jedis?
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.
- StarkillerMarek
- Rebel Colonel

- Posts: 611
- Joined: Wed Aug 12, 2009 4:42 pm
- Location: I may be back.
Re: Character lifetime. can this be set like the Jedis?
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.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.
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: Character lifetime. can this be set like the Jedis?
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.
-
kinetosimpetus
- Imperial Systems Expert

- Posts: 2381
- Joined: Wed Mar 25, 2009 4:15 pm
- Projects :: A secret project
Re: Character lifetime. can this be set like the Jedis?
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.
-
Darth_Squoobus
- General

- Posts: 760
- Joined: Mon Aug 03, 2009 3:21 am
- Projects :: No Mod project currently.
- Location: over the hills and far away
Re: Character lifetime. can this be set like the Jedis?
Are you making a droid hero? Or are you just making a model with a limited warranty?Rends wrote:I want to give one of my droids a limited lifetime .similar to the Jedi/hero lifetime
Can this be done?
And I agree with AQT. Editing the ODF would be easier.
- [RDH]Zerted
- Gametoast Staff

- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
Re: Character lifetime. can this be set like the Jedis?
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.Fiodis wrote:...trying to change the hero when I messed up and he appeared on the unit selection screen...
- Rends
- Sith

- Posts: 1278
- Joined: Fri Oct 15, 2004 6:34 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Germany
- Contact:
Re: Character lifetime. can this be set like the Jedis?
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.Darth_Squoobus wrote:Are you making a droid hero? Or are you just making a model with a limited warranty?Rends wrote:I want to give one of my droids a limited lifetime .similar to the Jedi/hero lifetime
Can this be done?
And I agree with AQT. Editing the ODF would be easier.
