Entih
Junior Member
Posts: 47
Threads: 4
Joined: Sep 2010
Reputation:
0
|
RE: Problem with placing item script
An area which is item interactive will still only highlight with an item which has an active use callback for it, I have noticed, which is why I suggested the callback might have gone awry.
Lets try a bunch of stuff, to see if any works.
First, try giving the use item callback a name, rather than leaving that string blank. Just something like "CheeseCallback" or whatever. It should not matter, but working with other games, I have seen stupid little things cause big issues.
Second, be sure that the area is unobscured by other things or areas. Another probable non-issue, but I have seen the engine get confused on interact callbacks and such when areas are involved.
I made a quick addendum to my own map testing items and using items on areas, and I got it working rather well, so not quite sure where the problem is here...
|
|
10-06-2010, 01:10 AM |
|
Neurological
Member
Posts: 71
Threads: 11
Joined: Sep 2010
Reputation:
1
|
RE: Problem with placing item script
(10-06-2010, 01:10 AM)Entih Wrote: An area which is item interactive will still only highlight with an item which has an active use callback for it, I have noticed, which is why I suggested the callback might have gone awry.
Lets try a bunch of stuff, to see if any works.
First, try giving the use item callback a name, rather than leaving that string blank. Just something like "CheeseCallback" or whatever. It should not matter, but working with other games, I have seen stupid little things cause big issues.
Second, be sure that the area is unobscured by other things or areas. Another probable non-issue, but I have seen the engine get confused on interact callbacks and such when areas are involved.
I made a quick addendum to my own map testing items and using items on areas, and I got it working rather well, so not quite sure where the problem is here...
Still nothing, I'm really clueless. Another thing I forgot, the item I want to use is made out from a combination in the inventory of other two items. But the problem is still that won't let me interact with the area, I tried almost everything.
|
|
10-06-2010, 02:54 AM |
|
Entih
Junior Member
Posts: 47
Threads: 4
Joined: Sep 2010
Reputation:
0
|
RE: Problem with placing item script
Alright, now inventory item combining is something I tried, but the combine would always fail miserably (callback would do nothing but would not fail), so not sure I can help that far. Though here it goes.
So the combine callback triggers a give item function where the player is given the item, yes? What does your GiveItem call look like?
Alternatively, if all else fails, try to place the item you want to use directly into the map with the proper settings, and see if it works being picked up. If it does and you cannot figure this out, have an excuse for the player to combine it together in the map rather than in inventory.
|
|
10-06-2010, 02:59 AM |
|
Neurological
Member
Posts: 71
Threads: 11
Joined: Sep 2010
Reputation:
1
|
RE: Problem with placing item script
(10-06-2010, 02:59 AM)Entih Wrote: Alright, now inventory item combining is something I tried, but the combine would always fail miserably (callback would do nothing but would not fail), so not sure I can help that far. Though here it goes.
So the combine callback triggers a give item function where the player is given the item, yes? What does your GiveItem call look like?
Alternatively, if all else fails, try to place the item you want to use directly into the map with the proper settings, and see if it works being picked up. If it does and you cannot figure this out, have an excuse for the player to combine it together in the map rather than in inventory.
Already tried to put the item directly on the map, added also a callback on the item bu nothing. Thats how it looks the combine item script I use in inventory.hps:
void CombineCheeseAndPoison(string &in asItemA, string &in asItemB)
{
PlayGuiSound("15_make_hammer", 1.0f);
RemoveItem(asItemA); RemoveItem(asItemB);
GiveItem("neurocheese_poison", "Puzzle", "NeuroCheesePoisonItem", "neuro_cheesepoison.tga", 0);
}
On GiveItem I tried also using this:
GiveItem("neurocheese_poison_"+i, "Puzzle", "NeuroCheesePoisonItem", "neuro_cheesepoison.tga", 0);
But nothing. I will try another thing, instead of an area I'll try to use another entity to interact with, maybe it works.
|
|
10-06-2010, 03:11 AM |
|
Entih
Junior Member
Posts: 47
Threads: 4
Joined: Sep 2010
Reputation:
0
|
RE: Problem with placing item script
Hmm... hold a sec. The item use callback references 'neurocheese_poison_1', but you seem to be giving 'neurocheese_poison'. Is that intentional, or are there multiple of them?
If the names don't match, the use callback wont work.
|
|
10-06-2010, 03:14 AM |
|
Neurological
Member
Posts: 71
Threads: 11
Joined: Sep 2010
Reputation:
1
|
RE: Problem with placing item script
(10-06-2010, 03:14 AM)Entih Wrote: Hmm... hold a sec. The item use callback references 'neurocheese_poison_1', but you seem to be giving 'neurocheese_poison'. Is that intentional, or are there multiple of them?
If the names don't match, the use callback wont work.
I changed it also to make the names match, but still nothing.
|
|
10-06-2010, 03:26 AM |
|
Entih
Junior Member
Posts: 47
Threads: 4
Joined: Sep 2010
Reputation:
0
|
RE: Problem with placing item script
That honestly exhausted all my ideas.
If you would like, I could try and take a look at it for you, but that would require packing it up and sending it to me somehow. Without seeing it for myself, though, I can't think of any other solutions.
|
|
10-06-2010, 03:32 AM |
|
Neurological
Member
Posts: 71
Threads: 11
Joined: Sep 2010
Reputation:
1
|
RE: Problem with placing item script
(10-06-2010, 03:32 AM)Entih Wrote: That honestly exhausted all my ideas.
If you would like, I could try and take a look at it for you, but that would require packing it up and sending it to me somehow. Without seeing it for myself, though, I can't think of any other solutions.
If for you is not a waste of time, I don't want to take your time for maybe such a little thing.
|
|
10-06-2010, 11:45 AM |
|
Entih
Junior Member
Posts: 47
Threads: 4
Joined: Sep 2010
Reputation:
0
|
RE: Problem with placing item script
I don't mind taking a look if you don't mind me looking. You can just PM me with a download or something like that if you want me to check it out, and I can prod around and see if I can find the issue.
With how much script I have written for my own map, I feel problem solving has become a bit of a hobby of mine.
|
|
10-06-2010, 10:23 PM |
|
|