Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Script: adjust current vitality?

Page: 1 of 1
 Vox Kalam
09-27-2007, 9:41 PM
#1
Can it be done, without altering the MAXIMUM vitality?
 GameGeeks
09-27-2007, 10:05 PM
#2
cant you just use the editor to do that? or a code?
 Vox Kalam
09-27-2007, 10:20 PM
#3
No, I need a script to make a character wounded, down to like 1vp, in-convo.
 tk102
09-27-2007, 10:21 PM
#4
You mean like EffectHeal and EffectDamage?

void main() {
object oTarget2Heal=GetObjectByTag("somebody");
object oTarget2Hurt=GetObjectByTag("somebody_else");

effect eHeal=EffectHeal(10); // heal 10 VP
effect eHurt=EffectDamage(10); // damage 10 VP

ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oTarget2Heal);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHurt, oTarget2Hurt);
}
 Vox Kalam
09-27-2007, 11:04 PM
#5
perfect, thanks. :D
 GeorgNihilus
03-18-2009, 10:55 PM
#6
So ... how can I script for a poisoning effect on my PC and let's say Atton for 10 seconds?? with 10 VP loss?

thanks :)
 stoffe
03-19-2009, 9:20 AM
#7
So ... how can I script for a poisoning effect on my PC and let's say Atton for 10 seconds?? with 10 VP loss?

First you'd need a custom poison that behaves in that particular way. You can add one by adding a new line in the poison.2da file.

Then you can apply it with a script like:


void main() {
object oPC = GetFirstPC();
object oAR = GetObjectByTag("Atton");

effect ePoison = EffectPoison(999);

ApplyEffectToObject(DURATION_TYPE_PERMANENT, ePoison, oPC);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, ePoison, oAR);
}


Replace 999 with the line number from the poison.2da file that contains your new poison type. (Note that poison effects should generally be applied with a Permanent duration since the poison types have their own built-in duration that's set in the poison.2da file.)
 GeorgNihilus
03-19-2009, 10:51 AM
#8
(Note that poison effects should generally be applied with a Permanent duration since the poison types have their own built-in duration that's set in the poison.2da file.)

Duration was one of my doubts :) ... plus the poisoning animation but it fires right there ...

thanks again Stoffe ... :D
Page: 1 of 1