Frictional Games Forum (read-only)

Full Version: Can't use my acid on web
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
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"
Try using SetPropActiveAndFade("web_1", false, 3); instead of SetPropHealth.
This will make it "dissolve".
(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 Smile

But my problems is when try to use my acid on the web its says "Cannot use this item this way!"
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)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]
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.
(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 Sad
It doesn't work because you didn't give the item a name.
(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
What name did you give it?
Pages: 1 2