So I made two scripts giving out a command to make an NPC run, and then a command to execute another script. Here they are:
void main()
{
ActionPauseConversation();
object oNPC = GetObjectByTag("n_dohad");
float x=466.74640;
float 7=83.11619;
float z=9.96480;
int bRun=TRUE;
vector vDohadrun=Vector(x,y,z);
location lFirststop=Location(vDohadrun,0.0f);
DelayCommand(1.0, AssignCommand(oNPC, ActionForceMoveToLocation(lFirststop,bRun)));
DelayCommand(4.0, ExecuteScript("14ab_fadein3", OBJECT_SELF));
ActionResumeConversation();
}
void main()
{
ActionPauseConversation();
object oNPC = GetObjectByTag("n_dohaw");
float x=465.80499;
float 7=84.91311;
float z=10.26097;
int bRun=TRUE;
vector vDohawrun=Vector(x,y,z);
location lFirststop=Location(vDohawrun,0.0f);
AssignCommand(oNPC, ActionForceMoveToLocation(lFirststop,bRun));
ActionResumeConversation();
}
Now I keep on getting a syntax error at "integer constant". I would assume that this has something to do with this: int bRun=TRUE; but I can't for the life of me figure it out. For it is pretty much the same as this script:
void main()
{
ActionPauseConversation();
SetGlobalFadeIn(0.0, 4.0);
object oNPC = GetObjectByTag("n_doha");
float x=467.35056;
float y=79.96013;
float z=9.69549;
int bRun=TRUE;
vector vDoharun=Vector(x,y,z);
location lFirststop=Location(vDoharun,0.0f);
DelayCommand(4.0, AssignCommand(oNPC, ActionForceMoveToLocation(lFirststop,bRun)));
DelayCommand(7.0, ExecuteScript("14ab_fadein2", OBJECT_SELF));
ActionResumeConversation();
}
Which compiled perfectly. Do you guys have any ideas?
well, just asking I don't know, but why put actionFORCEmoveto object? wouldn't it be fine with actionmovetolocation, soandso, 1) ?
or is that a k1 thing i dont know about?
no wouldnt be a k1 thing...that was dumb.
The Script actually compiles fine if you correct the typo at the y-coords ;) you wrote 7=.... And (as mathematics suggests) 7=7 and not 7=83 ;). Just change it to y=83....
The Script actually compiles fine if you correct the typo at the y-coords ;) you wrote 7=.... And (as mathematics suggests) 7=7 and not 7=83 ;). Just change it to y=83....
Oh wow....Thanks Fastmaniac.
Alright, here's another script that's troubling me. This time it compiles correctly and looks fine, but when it is used in the dialog the dialog cuts out at that node. The dialog just exits, but the script continues. The attacker shoots, but doesn't kill the person he's shooting at. I made sure the NPC that's supposed to die had 1 HP as well.
void main ()
{
ActionPauseConversation();
object oNPC = GetObjectByTag("scared");
object oShooter = OBJECT_SELF;
object oTarget = GetNearestObjectByTag("killed", OBJECT_SELF, 1);
ActionPauseConversation();
ChangeToStandardFaction(oShooter, 2);
ChangeToStandardFaction(oTarget, 4);
ApplyEffectToObject(1, EffectAssuredHit(), oShooter, 0.3);
DelayCommand(0.3, AssignCommand(oShooter, ActionAttack(oTarget, 0)));
DelayCommand(1.0, AssignCommand(oNPC, ActionPlayAnimation(18, 1.0, (-1.0))));
DelayCommand(4.0, ChangeToStandardFaction(oShooter, 4));
ActionResumeConversation();
}
Any ideas?
EDIT: I've fixed the problem, no need to reply to this question.