Companion auto healing

Post » Fri Jan 21, 2011 7:08 pm

I have been working on an update for my mod, and one problem with it is that when non essential, she doesnt auto heal after combat. But does when is esential. Just wondering if there is anything that I need to add to the script autoheal section, or if non essential companions can even autoheal.

Autoheal in the script:

Begin OnCombatEnd

If [ GetPlayerTeammate == 1 ]
ResetHealth
RestoreAV PerceptionCondition 100
RestoreAV EnduranceCondition 100
RestoreAV LeftAttackCondition 100
RestoreAV LeftMobilityCondition 100
RestoreAV RightAttackCondition 100
RestoreAV RightMobilityCondition 100
endif

End


Again this works fine when the companion is essential, but doesn't work when the companion isnt essential. Any ideas?
User avatar
Tanya Parra
 
Posts: 3435
Joined: Fri Jul 28, 2006 5:15 am

Post » Fri Jan 21, 2011 8:06 pm

Try getting rid of the square brackets? I've never used them, and I honestly don't know if they are valid or not ;)

This is all you really need:

Begin OnCombatEnd	ResetHealthEnd


Essential Actors auto-heal even without this - so that's probably why it would seem puzzling that it wouldn't work for non-essential actors.
User avatar
Tina Tupou
 
Posts: 3487
Joined: Fri Mar 09, 2007 4:37 pm

Post » Fri Jan 21, 2011 8:39 am

That's all you need for this to work and using the "[ " brackets seems to stop the code from executing use '(' and ')'

Begin OnCombatEndResetHealthRestoreAV PerceptionCondition 100RestoreAV EnduranceCondition 100RestoreAV LeftAttackCondition 100RestoreAV LeftMobilityCondition 100RestoreAV RightAttackCondition 100RestoreAV RightMobilityCondition 100End


Or use your var for 'hiring' your follower
Begin OnCombatEndif (YourVar == 1)ResetHealthRestoreAV PerceptionCondition 100RestoreAV EnduranceCondition 100RestoreAV LeftAttackCondition 100RestoreAV LeftMobilityCondition 100RestoreAV RightAttackCondition 100RestoreAV RightMobilityCondition 100endifEnd

User avatar
Charity Hughes
 
Posts: 3408
Joined: Sat Mar 17, 2007 3:22 pm

Post » Fri Jan 21, 2011 11:22 am

That's all you need for this to work and using the "[ " brackets seems to stop the code from executing use '(' and ')'

Begin OnCombatEndResetHealthRestoreAV PerceptionCondition 100RestoreAV EnduranceCondition 100RestoreAV LeftAttackCondition 100RestoreAV LeftMobilityCondition 100RestoreAV RightAttackCondition 100RestoreAV RightMobilityCondition 100End


Or use your var for 'hiring' your follower
Begin OnCombatEndif (YourVar == 1)ResetHealthRestoreAV PerceptionCondition 100RestoreAV EnduranceCondition 100RestoreAV LeftAttackCondition 100RestoreAV LeftMobilityCondition 100RestoreAV RightAttackCondition 100RestoreAV RightMobilityCondition 100endifEnd





Well I have tried both responces and it still doesnt work. What do you mean by using the var?

Does var mean variable?
User avatar
Rachel Briere
 
Posts: 3438
Joined: Thu Dec 28, 2006 9:09 am

Post » Fri Jan 21, 2011 1:08 pm

Well I have tried both responces and it still doesnt work.

You need to use a 'clean save game'. One that has never had the follower active when you saved your game.
User avatar
Shaylee Shaw
 
Posts: 3457
Joined: Wed Feb 21, 2007 8:55 pm

Post » Fri Jan 21, 2011 11:51 pm

Just did a clean save, and still only autoheals when essential, not non essential.
User avatar
Nomee
 
Posts: 3382
Joined: Thu May 24, 2007 5:18 pm

Post » Fri Jan 21, 2011 11:45 am

Don't know what to say since it works for my companion on combat end. You sure you have the script 'on' that NPC?
User avatar
Genevieve
 
Posts: 3424
Joined: Sun Aug 13, 2006 4:22 pm

Post » Fri Jan 21, 2011 8:05 pm

Just did a clean save, and still only autoheals when essential, not non essential.

It works the script MUST be 'on' your NPC (I.E 'YourFollower') try using your NPCs reference ID
Begin OnCombatEndYourFollowerref.ResetHealthYourFollowerref.RestoreAV PerceptionCondition 100YourFollowerref.RestoreAV EnduranceCondition 100YourFollowerref.RestoreAV LeftAttackCondition 100YourFollowerref.RestoreAV LeftMobilityCondition 100YourFollowerref.RestoreAV RightAttackCondition 100YourFollowerref.RestoreAV RightMobilityCondition 100End

User avatar
Rude_Bitch_420
 
Posts: 3429
Joined: Wed Aug 08, 2007 2:26 pm

Post » Fri Jan 21, 2011 5:01 pm

Post the whole script. Maybe something else is causing it to just halt.
User avatar
N Only WhiTe girl
 
Posts: 3353
Joined: Mon Oct 30, 2006 2:30 pm

Post » Fri Jan 21, 2011 12:30 pm

This is really starting to annoy me now. Everything I try doesnt work. I compared the auto heal to fawkes, and its the same. So why the hell wont it work for me :banghead:

Anyway here is the entire script:

scn JasmineScript

short JasIsHired
short JasIsFired
short JasIsGoHome
short JasIsGuard
short JasIsWait
short JasIsRelax
Short IsFollowingDefault
short IsFollowingShort
short IsFollowingLong
short JasmineNoHired

;Keeps Jasmine out of Vault87. Sends her home.

Begin Gamemode

if [ player.getincell Vault87c && GetQuestRunning MQ08 && JasIsHired == 1 ]
set IsFollowingDefault to 0
set IsFollowingShort to 0
set IsFollowingLong to 0
set JasIsGoHome to 1
ShowMessage JasmineGoingHome
endif

END

BEGIN OnCombatEND

if ( GetPlayerTeammate == 1 )
JasmineREF.ResetHealth
JasmineREF.RestoreAV PerceptionCondition 100
JasmineREF.RestoreAV EnduranceCondition 100
JasmineREF.RestoreAV LeftAttackCondition 100
JasmineREF.RestoreAV LeftMobilityCondition 100
JasmineREF.RestoreAV RightAttackCondition 100
JasmineREF.RestoreAV RightMobilityCondition 100
endif

END

;Show on Jasmines Death.

BEGIN OnDeath

If [ JasIsHired == 1 ]
Set JasIsHired to 0
ShowMessage JasmineIsDead
endif

END
User avatar
Carolyne Bolt
 
Posts: 3401
Joined: Mon Jul 10, 2006 4:56 am

Post » Sat Jan 22, 2011 12:46 am

How are you setting 'GetPlayerTeammate' equal to 1?
In dialog script?

Also, I am not sure why you are using the quest 'MQ08', you probably should have created your own.
User avatar
Craig Martin
 
Posts: 3395
Joined: Wed Jun 06, 2007 4:25 pm

Post » Fri Jan 21, 2011 1:41 pm

Try this and only use the '(' brackets or no brackets at all only the ( ) brackets work...
scn JasmineScriptshort JasIsHiredshort JasIsFiredshort JasIsGoHomeshort JasIsGuardshort JasIsWaitshort JasIsRelaxShort IsFollowingDefaultshort IsFollowingShortshort IsFollowingLongshort JasmineNoHired;Keeps Jasmine out of Vault87. Sends her home.Begin Gamemode;If you want Jas to stay out of Vault87; PC is in the cell Vault87c and 'JasIsHired' = 1 OR the Quest 'MQ08' is Running and 'JasIsHired' = 1if player.getincell Vault87c && JasIsHired == 1 || GetQuestRunning MQ08 && JasIsHired == 1set IsFollowingDefault to 0set IsFollowingShort to 0set IsFollowingLong to 0set JasIsGoHome to 1ShowMessage JasmineGoingHomeendifENDBEGIN OnCombatEND; I think JasIsHired should be if ( JasIsHired == 1 )JasmineREF.ResetHealthJasmineREF.RestoreAV PerceptionCondition 100JasmineREF.RestoreAV EnduranceCondition 100JasmineREF.RestoreAV LeftAttackCondition 100JasmineREF.RestoreAV LeftMobilityCondition 100JasmineREF.RestoreAV RightAttackCondition 100JasmineREF.RestoreAV RightMobilityCondition 100endifEND;Show on Jasmines Death.BEGIN OnDeath; USE The '(' bracketsIf ( JasIsHired == 1 )Set JasIsHired to 0ShowMessage JasmineIsDeadendifEND 

User avatar
Rusty Billiot
 
Posts: 3431
Joined: Sat Sep 22, 2007 10:22 pm

Post » Fri Jan 21, 2011 2:09 pm

OMG


I LOVE YOU HFIL

IT WORKS

I have been trying to get it working for nearly a month and you found the solution :celebration:


Thanks
Thanks
Thanks

A million thanks :biggrin:
User avatar
Zualett
 
Posts: 3567
Joined: Mon Aug 20, 2007 6:36 pm


Return to Fallout 3