Frictional Games Forum (read-only)

Full Version: Please help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Look at these pictures and tell me where is the wrong at the script (the script is for headless agripe (unactive) to appear when the player walk into the script area if you have ideas please help
Link1---->http://postimg.org/image/uj1u820mj/ (the error)
Link2---->http://postimg.org/image/qokwvc4dt/ (my sccript file)
You have to put the addentitycollidecallback in the OnStart section.

[Image: images?q=tbn:ANd9GcSVYSnOi8NlsD7QNJoz2Do..._sypqpjQ8Q]
You have a function that is outside any callback.
Put AddEntityCollideCallback("Player", "ScriptArea_1", "NailThatSucker", true, 1); under OnStart().
////////////////////////////
// Run first time starting map
void OnStart()
AddEntityCollideCallback("Player", "ScriptArea_1", "NailThatSucker", true, 1);
{
AddUseItemCallback("", "Key", "Door", "UseKeyOnDoor", true);
}

void UseKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Door", false, true);
PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false);
RemoveItem(asItem);
}

void NailTheSucker(sting &in asParent, string &in asChild, int alStates)
{
SetEntityActive("agrippa_headless_1", true);
AddPropForce("agrippa_headless_1", 0, 0, 0, world);
PlaySoundAtEntity("", "24_iron_maiden.snt", "agrippa_headless_1", 0, false);
}




somethink like this?
(still giving error even 2 errors)
(04-27-2013, 06:19 PM)mitkovarn Wrote: [ -> ]////////////////////////////
// Run first time starting map
void OnStart()
AddEntityCollideCallback("Player", "ScriptArea_1", "NailThatSucker", true, 1);
{
AddUseItemCallback("", "Key", "Door", "UseKeyOnDoor", true);
}

void UseKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Door", false, true);
PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false);
RemoveItem(asItem);
}

void NailTheSucker(sting &in asParent, string &in asChild, int alStates)
{
SetEntityActive("agrippa_headless_1", true);
AddPropForce("agrippa_headless_1", 0, 0, 0, world);
PlaySoundAtEntity("", "24_iron_maiden.snt", "agrippa_headless_1", 0, false);
}




somethink like this?
(still giving error even 2 errors)

No, inside the brackets:

Code:
void OnStart()
{
AddUseItemCallback("", "Key", "Door", "UseKeyOnDoor", true);
AddEntityCollideCallback("Player", "ScriptArea_1", "NailThatSucker", true, 1);
}
(04-27-2013, 06:27 PM)mitkovarn Wrote: [ -> ]http://postimg.org/image/5iugezp9j/ 3 errors

When a error says main(15,20), the computer means there is something wrong in the 15th line, the 20th symbol. So you see: 'sting' is not a data type, so sting is nothing and it should be string.
when 'world' is not declared, it should be between "".
That should do it..I hope

Tip: I wouldn't type everything, just copy paste everything is a good way to prevent typos
ty now the map is running but for what was all that writing the script wont work :X

so i am at the script and nothing is happening why?
(04-27-2013, 06:45 PM)mitkovarn Wrote: [ -> ]ty now the map is running but for what was all that writing the script wont work :X

so i am at the script and nothing is happening why?

Make sure all the names in-game are right. So the door is called 'door' (Or anything you like) They just have to match in the editor and your script file.
i mean the script for the agripa is not working the script for the key and door is okey but the agripa's script wont work

if you want i will send you my map its 60kb

and yes the names are matching
Pages: 1 2