Lizard
Member
Posts: 174
Threads: 23
Joined: Jul 2012
Reputation:
5
|
Cant use my item on an area [SOLVED]
I have scripted for alittle while and I've done this script several times
Normally when you want to use an item on a area, door or what ever you wanna use it on it's icon brightens up
But someway, when I want to use my glass_container on an area nothing happens, the container icon dosen't even light up when im seleting the container and pointing it at the area.
Any one of you know why this happens.
Just to set things straight I'll leav my script so you can see that the scripts is up
void OnEnter()
{
PlayMusic("", true, 1, 1, 1, false);
PlaySoundAtEntity("OilSplash", "16_oil_drip.ogg", "OilSplashArea", 0, false);
AddUseItemCallback("", "glass_container_1", "GetOilArea", "GettingOil", true);
}
///////////////////
//BEGIN GettingOil
void GettingOil(string &in asItem, string &in asEntity)
{
GiveItem("glass_container_oil", "Puzzle", "GlassContainerOil", "glass_container_oil.tga", 1);
RemoveItem("glass_container_1");
}
//END GettingOil
///////////////////
And yes the names in the script and in the editor are the same
CURRENT PROJECT:
A Fathers Secret == Just started
(This post was last modified: 05-31-2014, 12:31 PM by Lizard.)
|
|
05-31-2014, 12:15 PM |
|
DnALANGE
Banned
Posts: 1,549
Threads: 73
Joined: Jan 2012
|
RE: Cant use my item on an area
Try this.
go to your Getoilarea in your editor.
ans activate the item interaction.
hope this helps.
(This post was last modified: 05-31-2014, 12:25 PM by DnALANGE.)
|
|
05-31-2014, 12:23 PM |
|
PutraenusAlivius
Posting Freak
Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation:
119
|
RE: Cant use my item on an area
I'm not sure, but I think putting it in OnEnter is incorrect. Try put it at OnStart.
"Veni, vidi, vici."
"I came, I saw, I conquered."
|
|
05-31-2014, 12:24 PM |
|
Lizard
Member
Posts: 174
Threads: 23
Joined: Jul 2012
Reputation:
5
|
RE: Cant use my item on an area [SOLVED]
(05-31-2014, 12:23 PM)DnALANGE Wrote: Try this.
go to your Getoilarea in your editor.
ans activate the item interaction.
hope this helps.
Thanks
I just came back from a long pause, so totaly forgot about the ItemInteraction in the Area settings
Damn I'll do many facepalms before im done this story
CURRENT PROJECT:
A Fathers Secret == Just started
(This post was last modified: 05-31-2014, 12:30 PM by Lizard.)
|
|
05-31-2014, 12:30 PM |
|
DnALANGE
Banned
Posts: 1,549
Threads: 73
Joined: Jan 2012
|
RE: Cant use my item on an area
Np, good luck with your story.
for any other questions, were here.
ps, can you add solved in your tread, so ppl wont spend time in a solved tread.
Thanks
|
|
05-31-2014, 12:33 PM |
|
Lizard
Member
Posts: 174
Threads: 23
Joined: Jul 2012
Reputation:
5
|
RE: Cant use my item on an area [SOLVED]
always does
CURRENT PROJECT:
A Fathers Secret == Just started
|
|
05-31-2014, 12:34 PM |
|
|