Frictional Games Forum (read-only)

Full Version: Set Zombie walking to waypoints
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Please i wanna set zombie to go on my coosed waypoints so tell me Script please and when he will dissapear when goes to end and when he will cyrcle around
you know iam noob at scriptinb and this is what guy have in his own script

AddEnemyPatrolNode(string& asName, string& asNodeName, float afWaitTime, string& asAnimation);

this is it but i puted this to my hps file
}
AddEnemyPatrolNode("Brute_1", "Point_1, "0", "");
{

and it writes ERROR
(10-29-2010, 03:10 PM)exit361 Wrote: [ -> ]you know iam noob at scriptinb and this is what guy have in his own script

AddEnemyPatrolNode(string& asName, string& asNodeName, float afWaitTime, string& asAnimation);

this is it but i puted this to my hps file
}
AddEnemyPatrolNode("Brute_1", "Point_1, "0", "");
{

and it writes ERROR

Well, i think it was already dicussed but numbers(int,float,byte...) values aren't set in "".

You should use 0 or 0.0f, both should work.
(10-29-2010, 03:10 PM)exit361 Wrote: [ -> ]}
AddEnemyPatrolNode("Brute_1", "Point_1, "0", "");
{
...

I think you should read the basic scripting tutorial.
http;//hpl2.frictionalgames.com
(10-29-2010, 03:10 PM)exit361 Wrote: [ -> ]you know iam noob at scriptinb and this is what guy have in his own script

AddEnemyPatrolNode(string& asName, string& asNodeName, float afWaitTime, string& asAnimation);

this is it but i puted this to my hps file
}
AddEnemyPatrolNode("Brute_1", "Point_1, "0", "");
{

and it writes ERROR

The }{ are mixed up. It should be:

{
AddEnemyPatrolNode("Brute_1", "Point_1, "0", "");
}

By the way. The .hps script isn't complete.

It should be something like:

Code:
void OnStart()
{
AddEnemyPatrolNode("Brute_1", "Point_1, "0", "");
}

void OnEnter()
{

}

void OnLeave()
{

}

Like that.
Nothing ive tryed this and it astill writes me ERROR Unexcepted end of file
Oh!!!! I see whats wrong! Point_1 isn't closed in! In AddEnemyPatrolNode("Brute_1", "Point_1<---, "0", "");
It should be: AddEnemyPatrolNode("Brute_1", "Point_1", "0", "");
0 shouldn't be in "" either.
omg now it writes Expected Identifier and unexpected token { ('-.-)
Ive gt this in my SCRIPT file lets see it

void OnStart()
{
AddUseItemCallback("", "Klic", "mansion_1", "KeyOnDoor", true);
AddUseItemCallback("", "Klic2", "mansion_4", "KeyOnDoor", true);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "mansion_1", 0.0f, true);
}
AddEnemyPatrolNode("Brute_1", "Point_1", 0.0f, "");
{



Wheres mistake?
Ive fixed that!! You dont have to put something to that script file if you dont want to set them specificaly to points you want you just have to put some points to your map then run it and when monster will hear sound then it will go to nearest point youve created!!! Big Grin YEJJJJJ!
Pages: 1 2