Lizard
Member
Posts: 174
Threads: 23
Joined: Jul 2012
Reputation:
5
|
Can't use my acid on web
Hi guys.
I've used AddUseItemCallback many times before, with no errors, but this time it just wont work, and i can't really see why.
I keep getting "Cannot use item this way"
Im hoping that you guys would help me a little
void OnEnter()
{
AddUseItemCallback("", "glass_container_1", "acid_container_1", "giveacid", true);
AddUseItemCallback("", "glass_container_mix_done", "web_1", "burnweb", true);
}
void giveacid(string &in asItem, string &in asEntity)
{
RemoveItem("glass_container_1");
GiveItem("", "glass_container_mix_done", "glasscontainermixdone", "glass_container_mix_done.tga", 1);
}
void burnweb(string &in asItem, string &in asEntity)
{
SetPropHealth("web_1", 0);
}
I've also checked for name errors
I've also tryed, to change name of the container used in the burnweb function "glass_container_mix_done" to "glass_container_mix_done_1"
CURRENT PROJECT:
A Fathers Secret == Just started
(This post was last modified: 10-04-2012, 03:08 PM by Lizard.)
|
|
10-04-2012, 12:09 PM |
|
Ongka
Member
Posts: 225
Threads: 3
Joined: Nov 2010
Reputation:
20
|
RE: Can't use my acid on web
Try using SetPropActiveAndFade("web_1", false, 3); instead of SetPropHealth.
This will make it "dissolve".
|
|
10-04-2012, 12:32 PM |
|
Lizard
Member
Posts: 174
Threads: 23
Joined: Jul 2012
Reputation:
5
|
RE: Can't use my acid on web
(10-04-2012, 12:32 PM)Ongka Wrote: Try using SetPropActiveAndFade("web_1", false, 3); instead of SetPropHealth.
This will make it "dissolve". thanks i might consider that
But my problems is when try to use my acid on the web its says "Cannot use this item this way!"
CURRENT PROJECT:
A Fathers Secret == Just started
|
|
10-04-2012, 12:41 PM |
|
Ongka
Member
Posts: 225
Threads: 3
Joined: Nov 2010
Reputation:
20
|
RE: Can't use my acid on web
Create an area instead and place it on the web. You have to tick the box which says "ItemInteraction" and use the item on the script area. This should work fine.
|
|
10-04-2012, 01:14 PM |
|
Lizard
Member
Posts: 174
Threads: 23
Joined: Jul 2012
Reputation:
5
|
RE: Can't use my acid on web
(10-04-2012, 01:14 PM)Ongka Wrote: Create an area instead and place it on the web. You have to tick the box which says "ItemInteraction" and use the item on the script area. This should work fine. Is still say "Cannot use this item this way"
This is what i have now:
void OnEnter()
{
AddUseItemCallback("", "glass_container_1", "acid_container_1", "giveacid", true);
AddUseItemCallback("", "glass_container_mix_done1", "ScriptArea_1", "burnweb", true);
}
void giveacid(string &in asItem, string &in asEntity)
{
RemoveItem("glass_container_1");
GiveItem("", "glass_container_mix_done1", "glasscontainermixdone", "glass_container_mix_done.tga", 1);
}
void burnweb(string &in asItem, string &in asEntity)
{
SetPropActiveAndFade("web_1", false, 3);
}
picture of web and area:
[attachment=3411]
CURRENT PROJECT:
A Fathers Secret == Just started
(This post was last modified: 10-04-2012, 01:40 PM by Lizard.)
|
|
10-04-2012, 01:40 PM |
|
The chaser
Posting Freak
Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation:
113
|
RE: Can't use my acid on web
Try using it with the web itself. Every single entity can be interacted by a puzzle item. So, as acid appears in the screen, why not using the acid on the web directly? This may solve the problem.
Try doing easy things. If they don't work, use hard. Yep, that's it.
THE OTHERWORLD (WIP)
Aculy iz dolan.
|
|
10-04-2012, 01:49 PM |
|
Lizard
Member
Posts: 174
Threads: 23
Joined: Jul 2012
Reputation:
5
|
RE: Can't use my acid on web
(10-04-2012, 01:49 PM)The chaser Wrote: Try using it with the web itself. Every single entity can be interacted by a puzzle item. So, as acid appears in the screen, why not using the acid on the web directly? This may solve the problem.
Try doing easy things. If they don't work, use hard. Yep, that's it. Using it on the web directly was the first thing i did
CURRENT PROJECT:
A Fathers Secret == Just started
|
|
10-04-2012, 01:51 PM |
|
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
|
RE: Can't use my acid on web
It doesn't work because you didn't give the item a name.
|
|
10-04-2012, 02:03 PM |
|
Lizard
Member
Posts: 174
Threads: 23
Joined: Jul 2012
Reputation:
5
|
RE: Can't use my acid on web
(10-04-2012, 02:03 PM)Your Computer Wrote: It doesn't work because you didn't give the item a name.
GiveItem( "", "glass_container_mix_done", "glasscontainermixdone", "glass_container_mix_done.tga", 1);
i guess its the first bracket you were talking about?
I just tryed to enter the name and add it so it goes whit the script, but still not make it work
(10-04-2012, 02:10 PM)ZereboO Wrote: (10-04-2012, 02:03 PM)Your Computer Wrote: It doesn't work because you didn't give the item a name.
GiveItem("", "glass_container_mix_done", "glasscontainermixdone", "glass_container_mix_done.tga", 1);
i guess its the first bracket you were talking about?
I just tryed to enter a name and add it so it goes whit the script, but still dosen't work
CURRENT PROJECT:
A Fathers Secret == Just started
(This post was last modified: 10-04-2012, 02:11 PM by Lizard.)
|
|
10-04-2012, 02:10 PM |
|
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
|
RE: Can't use my acid on web
What name did you give it?
|
|
10-04-2012, 02:15 PM |
|
|