Hello everyone again…
I looked at getting the cold breath to work in my cold environment that I downloaded fro here:
https://neverwintervault.org/project/nwn1/hakpak/ccc-2011-dec-winter
The one Cestus Dei - Foggy Breath effect made
I can’t get it to work …ugh
His script for it is:
{
// Apply Fogbreath VFX
object oPC = GetFirstPC();
effect eFogBref = EffectVisualEffect( 780, FALSE );
eFogBref = ExtraordinaryEffect(eFogBref);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eFogBref, oPC);
}
Instead of l EffectVisualEffect( 780, FALSE )
I use the VFX_FNF_SMOKE_PUFF in place of his line reference to 780, but all I get is a puff rise up from the ground.
My line 780 on my vfx 2da is something completely different. Is there a vfx I’m missing?
I found this script below that does a smoking effect that might work but can’t blend it with my script:
location GetLocationAboveAndInFrontOf(object oPC, float fDist, float fHeight)
{
float fDistance = -fDist;
object oTarget = (oPC);
object oArea = GetArea(oTarget);
vector vPosition = GetPosition(oTarget);
vPosition.z += fHeight;
float fOrientation = GetFacing(oTarget);
vector vNewPos = AngleToVector(fOrientation);
float vZ = vPosition.z;
float vX = vPosition.x - fDistance * vNewPos.x;
float vY = vPosition.y - fDistance * vNewPos.y;
fOrientation = GetFacing(oTarget);
vX = vPosition.x - fDistance * vNewPos.x;
vY = vPosition.y - fDistance * vNewPos.y;
vNewPos = AngleToVector(fOrientation);
vZ = vPosition.z;
vNewPos = Vector(vX, vY, vZ);
return Location(oArea, vNewPos, fOrientation);
}
void SmokePipe(object oActivator)
{
string sEmote1 = "*puffs on a pipe*";
string sEmote2 = "*inhales from a pipe*";
string sEmote3 = "*pulls a mouthful of smoke from a pipe*";
float fHeight = 1.7;
float fDistance = 0.1;
// Set height based on race and gender
if (GetGender(oActivator) == GENDER_MALE)
{
switch (GetRacialType(oActivator))
{
case RACIAL_TYPE_HUMAN:
case RACIAL_TYPE_HALFELF:
fHeight = 1.7;
fDistance = 0.12;
break;
case RACIAL_TYPE_ELF:
fHeight = 1.55;
fDistance = 0.08;
break;
case RACIAL_TYPE_GNOME:
case RACIAL_TYPE_HALFLING:
fHeight = 1.15;
fDistance = 0.12;
break;
case RACIAL_TYPE_DWARF:
fHeight = 1.2;
fDistance = 0.12;
break;
case RACIAL_TYPE_HALFORC:
fHeight = 1.9;
fDistance = 0.2;
break;
}
}
else
{
// FEMALES
switch (GetRacialType(oActivator))
{
case RACIAL_TYPE_HUMAN:
case RACIAL_TYPE_HALFELF:
fHeight = 1.6;
fDistance = 0.12;
break;
case RACIAL_TYPE_ELF:
fHeight = 1.45;
fDistance = 0.12;
break;
case RACIAL_TYPE_GNOME:
case RACIAL_TYPE_HALFLING:
fHeight = 1.1;
fDistance = 0.075;
break;
case RACIAL_TYPE_DWARF:
fHeight = 1.2;
fDistance = 0.1;
break;
case RACIAL_TYPE_HALFORC:
fHeight = 1.8;
fDistance = 0.13;
break;
}
}
location lAboveHead = GetLocationAboveAndInFrontOf(oActivator, fDistance, fHeight);
// emotes
switch (d3())
{
case 1:
AssignCommand(oActivator, ActionSpeakString(sEmote1));
break;
case 2:
AssignCommand(oActivator, ActionSpeakString(sEmote2));
break;
case 3:
AssignCommand(oActivator, ActionSpeakString(sEmote3));
break;
}
// glow red
AssignCommand(oActivator, ActionDoCommand(ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_LIGHT_RED_5), oActivator, 0.15)));
// wait a moment
AssignCommand(oActivator, ActionWait(3.0));
// puff of smoke above and in front of head
AssignCommand(oActivator, ActionDoCommand(ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SMOKE_PUFF), lAboveHead)));
// if female, turn head to left
if ((GetGender(oActivator) == GENDER_FEMALE) && (GetRacialType(oActivator) != RACIAL_TYPE_DWARF))
AssignCommand(oActivator, ActionPlayAnimation(ANIMATION_FIREFORGET_HEAD_TURN_LEFT, 1.0, 5.0));
// funky effect
//ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectParalyze(), oActivator);
}
My script on my On Enter in my Events to an area is:
////////////////////////////////////////////////////////////////////////////////
// Cold of Winter //
// sl_winter_onente //
// Author :sly777 for Land of Cheshire //
// special thanks to xanas our lead scripter //
// for helping make this cleaner :) //
////////////////////////////////////////////////////////////////////////////////
//put on enter area you want winter effect //
void coldofwinter(object oPC,object oArea);
void main()
{
// Apply Fogbreath VFX
object oPC = GetFirstPC();
effect eFogBref = EffectVisualEffect( VFX_FNF_SMOKE_PUFF, FALSE );
eFogBref = ExtraordinaryEffect(eFogBref);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eFogBref, oPC);
if(!GetIsPC(oPC)) return;
object oArea=OBJECT_SELF;
int nIntensity = GetLocalInt(oArea, "Intensity");
if(nIntensity == 0) return;
SetLocalInt(oPC,"Intensity", nIntensity);
SendMessageToPC(oPC, "Its very cold and windy ");
DelayCommand(20.0,coldofwinter(oPC,oArea));
}
void coldofwinter(object oPC,object oArea)
{
int nInventorySlot;
int nTotalIntensity;
int AC;
effect eDmg;
effect slow;
object oItem;
string sTag;
float fDist;
if (GetArea(oPC)==oArea)
{
nTotalIntensity=GetLocalInt(oPC,"Intensity");
if (GetIsNight()==TRUE) nTotalIntensity+=3;// colder at night
if (GetIsDay()==TRUE) nTotalIntensity-=4;// warmer in the day
if (GetWeather(oArea)==WEATHER_SNOW) nTotalIntensity-=2;//warmer if its snowing
if (GetWeather(oArea)==WEATHER_RAIN) nTotalIntensity+=4;//colder if its raining
oItem =GetItemInSlot(INVENTORY_SLOT_BOOTS,oPC);//check for special boots
sTag=GetTag(oItem) ;
if (sTag=="warmboots") nTotalIntensity-=2;
if (sTag=="winterboots") nTotalIntensity-=4;
oItem =GetItemInSlot(INVENTORY_SLOT_ARMS,oPC);//check for special gloves
sTag=GetTag(oItem) ;
if (sTag=="warmgloves") nTotalIntensity-=2;
if (sTag=="wintergloves") nTotalIntensity-=4;
oItem =GetItemInSlot(INVENTORY_SLOT_HEAD,oPC);//check for special headgear
sTag=GetTag(oItem) ;
if (sTag=="warmhat") nTotalIntensity-=2;
if (sTag=="winterhat") nTotalIntensity-=4;
oItem=GetItemInSlot(INVENTORY_SLOT_CHEST,oPC);//check if pc wear something or heavy armor
AC=GetItemACValue(oItem);
nInventorySlot=(GetIsObjectValid(oItem));
if (AC >= 4) nTotalIntensity+=2;
else if (nInventorySlot=1) nTotalIntensity+=4;
{
oItem=GetItemInSlot(INVENTORY_SLOT_CLOAK,oPC);//check for special cloaks
sTag=GetTag(oItem);
if (sTag=="warmcloak") nTotalIntensity-=2;
else if (sTag=="wintercloak") nTotalIntensity-=4;
}
oItem=GetNearestObjectByTag("Campfire",oPC,1);//check for fire nearby
if (oItem!=OBJECT_INVALID)
{
SendMessageToPC(oPC, "The fire seems to make you warmer but you still risk freezing being exposed out here as you are.");
fDist=GetDistanceBetween(oItem,oPC);
if (fDist<1.0) nTotalIntensity-=8;
else if (fDist<3.0) nTotalIntensity-=3;
else if (fDist<5.0) nTotalIntensity-=2;
SetLocalInt(oPC, "nsavethrow", 0);
}
SetLocalInt (oPC,"nsavethrow",GetLocalInt(oPC, "nsavethrow")+1);//get the saving throw harder with time
int time = 15 + GetLocalInt(oPC,"nsavethrow");//saving throw vs cold (fortitude save)
if (FortitudeSave(oPC, time, SAVING_THROW_TYPE_COLD ))
{
}
else
{
slow=EffectMovementSpeedDecrease(25);
eDmg=EffectDamage(nTotalIntensity,DAMAGE_TYPE_COLD);
if (nTotalIntensity <= 6)ApplyEffectToObject(DURATION_TYPE_TEMPORARY,slow,oPC,30.1f);
else if (nTotalIntensity >= 7)ApplyEffectToObject(DURATION_TYPE_INSTANT,eDmg,oPC,1.0);
SendMessageToPC(oPC,"This environment is very cold.");
} // do cold damage or speed decrease
DelayCommand(30.0,coldofwinter(oPC,oArea));
} // end areaofpc = area
}
Any help would be great as I would like this effect.