Character lifetime. can this be set like the Jedis?

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
Rends
Sith
Sith
Posts: 1278
Joined: Fri Oct 15, 2004 6:34 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Germany
Contact:

Character lifetime. can this be set like the Jedis?

Post by Rends »

I want to give one of my droids a limited lifetime .similar to the Jedi/hero lifetime
Can this be done?
User avatar
Fiodis
Master of the Force
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?

Post 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.
AQT
Gametoast Staff
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?

Post 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.
User avatar
StarkillerMarek
Rebel Colonel
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?

Post by StarkillerMarek »

I just checked a few minutes ago, but nothing like that came up.
Xavious
Sith Master
Sith Master
Posts: 2783
Joined: Mon Jun 12, 2006 3:46 pm

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

Post 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).
kinetosimpetus
Imperial Systems Expert
Imperial Systems Expert
Posts: 2381
Joined: Wed Mar 25, 2009 4:15 pm
Projects :: A secret project
Games I'm Playing :: Warframe STO

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

Post by kinetosimpetus »

AddHealth = "" //will add that amount of health each second, so the smaller negative, the slower it would drain.
User avatar
Fiodis
Master of the Force
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?

Post by Fiodis »

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.
Games I'm Playing :: League of Legends
xbox live or psn: No gamertag set
Location: NJ, USA

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

Post by obiboba3po »

I know its often done to regenerate health when some is lost, it should work in reverse as well
User avatar
Frisbeetarian
Jedi
Jedi
Posts: 1233
Joined: Wed Sep 12, 2007 3:13 pm

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

Post by Frisbeetarian »

It would seem to be an effect of SetHeroClass(), which of course can only be used once per side.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

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

Post by [RDH]Zerted »

Frisbeetarian wrote:...which of course can only be used once per side.
Are you sure about that?
User avatar
Frisbeetarian
Jedi
Jedi
Posts: 1233
Joined: Wed Sep 12, 2007 3:13 pm

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

Post by Frisbeetarian »

I'm actually sure that I was wrong.
User avatar
Fiodis
Master of the Force
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?

Post 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.
User avatar
StarkillerMarek
Rebel Colonel
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?

Post 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.
User avatar
Fiodis
Master of the Force
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?

Post 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.
kinetosimpetus
Imperial Systems Expert
Imperial Systems Expert
Posts: 2381
Joined: Wed Mar 25, 2009 4:15 pm
Projects :: A secret project
Games I'm Playing :: Warframe STO

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

Post 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.
Darth_Squoobus
General
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?

Post 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.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

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

Post 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.
User avatar
Rends
Sith
Sith
Posts: 1278
Joined: Fri Oct 15, 2004 6:34 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Germany
Contact:

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

Post 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.
Post Reply