Frictional Games Forum (read-only)

Full Version: Making a note and a key script
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
HI! I am going to build a custom story but I'm going to have a note in the start and a locked door with key.
OK heres my question.
Can i use the same lang paper script thing or do i need one for note and one for the key ?


THANKS !!!1!
http://www.wiki.frictionalgames.com


if that doesen't help theres plenty of tutorials on youtube too.
Quick answer.

Yes you can use the same.

But do as CrazyArts say and look at the links Wink
You'll understand it
I dont get it :S


void OnStart()
{

AddEntityCollideCallback("Player", "TeleportScript", "NailThatSucker", true, 1);
}


void NailThatSucker(string& asParent, string &in asChild, int alStates)
{
SetEntityActive("TeleportedNakedGuy", true);
AddPropForce("TeleportedNakedGuy", -20000, 0, 0, "world");
PlaySoundAtEntity("", "24_iron_maiden.snt", "TeleportedNakedGuy", 0, false);
}

Here's a teleporting naked guy script but then I want a other teleporting naked guy how should I do then?
Off topic: PLEASE dont make teleporting naked guys or you will get alot of haters :/ (unless you wont release it).
But to make another one just copy that and change the names and add the male corpse entity and the script area and it should work.
void OnStart()
{
AddEntityCollideCallback("Player", "TeleportScript", "NailThatSucker", true, 1);
AddEntityCollideCallback("Player", "TeleportScript_1", "NailThatSucker_1", true, 1);

}

void NailThatSucker_1(string& asParent, string &in asChild, int alStates)
{
SetEntityActive("TeleportedNakedGuy_2", true);
AddPropForce("TeleportedNakedGuy_2", -20000, 0, 0, "world");
PlaySoundAtEntity("", "24_iron_maiden.snt", "TeleportedNakedGuy_2", 0, false);
}

void NailThatSucker(string& asParent, string &in asChild, int alStates)
{
SetEntityActive("TeleportedNakedGuy", true);
AddPropForce("TeleportedNakedGuy", -20000, 0, 0, "world");
PlaySoundAtEntity("", "24_iron_maiden.snt", "TeleportedNakedGuy", 0, false);
}


Just change the name of the entities there are more than 1 of.

TeleportedNakedGuy_1, TeleportedNakedGuy_2, TeleportedNakedGuy_3 etc.
But seriously, i recommend not using this. Even though it's for Pewdiepie or your friends or anything else.. I guess we all (even pewdiepie) would like a change instead of all these naked guys.
(06-11-2012, 08:40 PM)beecake Wrote: [ -> ]void OnStart()
{
AddEntityCollideCallback("Player", "TeleportScript", "NailThatSucker", true, 1);
AddEntityCollideCallback("Player", "TeleportScript_1", "NailThatSucker_1", true, 1);

}

void NailThatSucker_1(string& asParent, string &in asChild, int alStates)
{
SetEntityActive("TeleportedNakedGuy_2", true);
AddPropForce("TeleportedNakedGuy_2", -20000, 0, 0, "world");
PlaySoundAtEntity("", "24_iron_maiden.snt", "TeleportedNakedGuy_2", 0, false);
}

void NailThatSucker(string& asParent, string &in asChild, int alStates)
{
SetEntityActive("TeleportedNakedGuy", true);
AddPropForce("TeleportedNakedGuy", -20000, 0, 0, "world");
PlaySoundAtEntity("", "24_iron_maiden.snt", "TeleportedNakedGuy", 0, false);
}


Just change the name of the entities there are more than 1 of.

TeleportedNakedGuy_1, TeleportedNakedGuy_2, TeleportedNakedGuy_3 etc.
But seriously, i recommend not using this. Even though it's for Pewdiepie or your friends or anything else.. I guess we all (even pewdiepie) would like a change instead of all these naked guys.
I sometimes make stories for my friends(never release them though)and they dont have amnesia.So atleast my friends arent tired of teleporting naked guys Big Grin
Just comming up FATAL ERROR

custom_stories/my map/custom_stories/my map/maps/my map.hps'!
main(20,1) :ERR :A function with the same name and parameters already exist
main(26,1) :ERR :A function with the same name and parameters already exist

main(33,1) :ERR :A function with the same name and parameters already exist

well now its working doesnt get FATAL ERROR but I only see the one ive done first and the second one i dont see nothing happens with him

I dont get FATAL ERROR any longer but i only see the Teleporting naked guy i did first and the second one its dont happens anything with him