Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Im here once again and once again need help ! (Amnesia Custom Story)
BesTCracK Offline
Member

Posts: 60
Threads: 14
Joined: Nov 2011
Reputation: 0
#1
Im here once again and once again need help ! (Amnesia Custom Story)

Hello everyone ! My custom story ( Just chapter 1 ) is almost finished but need your help once again. Well I want to know how to do script if I want to do mixure ( or mixture Im not sure Big Grin ) of three potions like I put one in the burner then the other one to it and it will make other one potion and script like this ... I really need help with this and second thing I need help with is how I have to set player look at because I do the script and the player doesnt look at the thing even the whole script is ok I mean that it plays sound etc etc but player doesnt look at the thing ( In this case its helmet ) well and third is how can I name level doors like If i look at them and I want to interact with them it will show something like "Storage" and when I click on it it will say something like "Locked and I need to find key" Well thats all I really need help with it ... Thanks !
12-04-2011, 09:27 AM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#2
RE: Im here once again and once again need help ! (Amnesia Custom Story)

Ok.

For the mixture problem, you would have to do this:

Go into level editor and make a potion and set it where you want it to appear; then deactive it. Then, you are going to use

Quote: AddUseItemCallback("", "item", "used on what entity", "syntax name", true);

and then make it so the potion is active and you will be able to pick it up. If you wanted 2 potions to make the other potion, than do this:

Quote:SetLocalVarInt("potionvar", 0); and this:
AddUseItemCallback("", "potion1", "used on what entity", "potion_func1", true);
AddUseItemCallback("", "potion2", "used on what entity", "potion_func2", true);
in the void OnStart block.

Than put this anywhere other than the void onStart block:


Quote:void potion_func1(string &in asItem, string &in asEntity)
{
AddLocalVarInt("potionvar", 1);
RemoveItem("potion1");
}


void potion_func2(string &in asItem, string &in asEntity)
{
AddLocalVarInt("potionvar", 1);
RemoveItem("potion2");
func_on();
}

void func_on()

{
if (GetLocalVarInt("potionvar") == 2)
{
SetEntityActive("potion3", true);
}
}

And for the playerlookat tutorial, I made one myself here :

http://www.frictionalgames.com/forum/thread-10973.html


Hope that helps


(This post was last modified: 12-04-2011, 10:42 AM by flamez3.)
12-04-2011, 10:41 AM
Find
BesTCracK Offline
Member

Posts: 60
Threads: 14
Joined: Nov 2011
Reputation: 0
#3
RE: Im here once again and once again need help ! (Amnesia Custom Story)

Oh thanks but Im now a bit nervous because a problem occured when I start the custom story ( I already had an error but this is very different error ) and I am really lost so if you can look at it please I would be really happy : http://www.frictionalgames.com/forum/thread-11656.html
12-04-2011, 01:30 PM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#4
RE: Im here once again and once again need help ! (Amnesia Custom Story)

Sorry, dont know whats wrong with that. :/

12-04-2011, 01:55 PM
Find
BesTCracK Offline
Member

Posts: 60
Threads: 14
Joined: Nov 2011
Reputation: 0
#5
RE: Im here once again and once again need help ! (Amnesia Custom Story)

Ehm okay thanks it works but if i want the potion i created by mixing the two potions i want the created potion mix with one more potion how i have to do it ?? Pls help ! Smile
12-07-2011, 03:00 PM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#6
RE: Im here once again and once again need help ! (Amnesia Custom Story)

(12-07-2011, 03:00 PM)BesTCracK Wrote: Ehm okay thanks it works but if i want the potion i created by mixing the two potions i want the created potion mix with one more potion how i have to do it ?? Pls help ! Smile
I think you just confused me. I'm thinking you want to make the potion that was made by the two potions originally make another potion once another potion is used on it. Just do the same thing:

PHP Code: (Select All)
void OnStart()
{
AddUseItemCallback("""potion3""used on what entity""potion_func3"true);
}
void potion_func1(string &in asItemstring &in asEntity)
{
SetEntityActive("potion_4"true);
RemoveItem("potion3");



If that is not what you want, reply and tell me what you want in detail.

(This post was last modified: 12-07-2011, 03:07 PM by flamez3.)
12-07-2011, 03:07 PM
Find
BesTCracK Offline
Member

Posts: 60
Threads: 14
Joined: Nov 2011
Reputation: 0
#7
RE: Im here once again and once again need help ! (Amnesia Custom Story)

I will say it to you like this for example we have got Oil , Blood potion : Blood potion I put to a chemistry thing ( vial or something ) then to it Oil = result new potion ( for example its name is Unfinished Potion )
then the Unfinished Potion I want to mix with ( lets say with a potion I found somewhere else for example Uncompleted Acid ) I want to mix Unfinished Potion with Uncompleted Acid by putting them into a extaction oven and when I put them in it will make new potion ( for example Acid ) and I will pick the Acid .

For this I want to do the script I posted you the script here but the only thing that doesnt work is that the last potion ( Acid ) doesnt appear Sad

void potion_func1(string &in asItem, string &in asEntity)
{
AddLocalVarInt("potionvar", 1);
PlaySoundAtEntity("", "impact_glass_high.snt", "Player", 0, false);
RemoveItem("Blood");
}
void potion_func2(string &in asItem, string &in asEntity)
{
AddLocalVarInt("potionvar", 1);
PlaySoundAtEntity("", "impact_glass_high.snt", "Player", 0, false);
RemoveItem("Oilpp");
func_on();
}
void potion_func3(string &in asItem, string &in asEntity)
{
AddLocalVarInt("potionvar", 1);
PlaySoundAtEntity("", "impact_glass_high.snt", "Player", 0, false);
RemoveItem("Mixurepot");
}
void potion_func4(string &in asItem, string &in asEntity)
{
AddLocalVarInt("potionvar", 1);
PlaySoundAtEntity("", "impact_glass_high.snt", "Player", 0, false);
RemoveItem("UAcid");
}
void func_on()
{
if(GetLocalVarInt("potionvar") == 2)
{
SetEntityActive("Mixurepot", true);
}
if(GetLocalVarInt("potionvar") == 4)
{
SetEntityActive("Acid", true);
}
}
(This post was last modified: 12-08-2011, 03:32 PM by BesTCracK.)
12-08-2011, 03:32 PM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#8
RE: Im here once again and once again need help ! (Amnesia Custom Story)

(12-08-2011, 03:32 PM)BesTCracK Wrote: I will say it to you like this for example we have got Oil , Blood potion : Blood potion I put to a chemistry thing ( vial or something ) then to it Oil = result new potion ( for example its name is Unfinished Potion )
then the Unfinished Potion I want to mix with ( lets say with a potion I found somewhere else for example Uncompleted Acid ) I want to mix Unfinished Potion with Uncompleted Acid by putting them into a extaction oven and when I put them in it will make new potion ( for example Acid ) and I will pick the Acid .

For this I want to do the script I posted you the script here but the only thing that doesnt work is that the last potion ( Acid ) doesnt appear Sad

void potion_func1(string &in asItem, string &in asEntity)
{
AddLocalVarInt("potionvar", 1);
PlaySoundAtEntity("", "impact_glass_high.snt", "Player", 0, false);
RemoveItem("Blood");
}
void potion_func2(string &in asItem, string &in asEntity)
{
AddLocalVarInt("potionvar", 1);
PlaySoundAtEntity("", "impact_glass_high.snt", "Player", 0, false);
RemoveItem("Oilpp");
func_on();
}
void potion_func3(string &in asItem, string &in asEntity)
{
AddLocalVarInt("potionvar", 1);
PlaySoundAtEntity("", "impact_glass_high.snt", "Player", 0, false);
RemoveItem("Mixurepot");
}
void potion_func4(string &in asItem, string &in asEntity)
{
AddLocalVarInt("potionvar", 1);
PlaySoundAtEntity("", "impact_glass_high.snt", "Player", 0, false);
RemoveItem("UAcid");
}
void func_on()
{
if(GetLocalVarInt("potionvar") == 2)
{
SetEntityActive("Mixurepot", true);
}
if(GetLocalVarInt("potionvar") == 4)
{
SetEntityActive("Acid", true);
}
}
Did you add it in the level editor?

12-08-2011, 03:42 PM
Find
BesTCracK Offline
Member

Posts: 60
Threads: 14
Joined: Nov 2011
Reputation: 0
#9
RE: Im here once again and once again need help ! (Amnesia Custom Story)

Yes I added it but the Acid potion doesnt appear Sad
12-09-2011, 01:37 PM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#10
RE: Im here once again and once again need help ! (Amnesia Custom Story)


Quote:void potion_func1(string &in asItem, string &in asEntity)
{
AddLocalVarInt("potionvar", 1);
PlaySoundAtEntity("", "impact_glass_high.snt", "Player", 0, false);
RemoveItem("Blood");
func_on();
}

void potion_func2(string &in asItem, string &in asEntity)
{
AddLocalVarInt("potionvar", 1);
PlaySoundAtEntity("", "impact_glass_high.snt", "Player", 0, false);
RemoveItem("Oilpp");
func_on();
}
void potion_func3(string &in asItem, string &in asEntity)
{
AddLocalVarInt("potionvar", 1);
PlaySoundAtEntity("", "impact_glass_high.snt", "Player", 0, false);
RemoveItem("Mixurepot");
func_on();
}

void potion_func4(string &in asItem, string &in asEntity)
{
AddLocalVarInt("potionvar", 1);
func_on();
PlaySoundAtEntity("", "impact_glass_high.snt", "Player", 0, false);
RemoveItem("UAcid");
}
void func_on()
{
if(GetLocalVarInt("potionvar") == 2)
{
SetEntityActive("Mixurepot", true);
}
if(GetLocalVarInt("potionvar") == 4)
{
SetEntityActive("Acid", true);
}
}
Sorry, didn't add func_on(); into the other callbacks. If that doesn't work tell me and I'll tell you how to do it another way.

12-09-2011, 02:15 PM
Find




Users browsing this thread: 1 Guest(s)