I took a look at the map, and it definitely seems to be a data editor bug that I don't know how to handle yet. If I were Zy I might be able to do a bit better in fixing it but I have no idea how the item charges work. I delayed the click by .1 seconds so that I could try dropping items. Whenever I had the bugged item in my inventory, it would bug every other item I picked up. When I was able to drop it, every item I picked up after was just fine.
FatCat, there is a workaround I know of, but its kind of silly, and not in the spirit of this library.
Create an invisible dummy unit with an inventory ability with a drop range the size of the map. Then, whenever you would use "Create item at point", use "Create item in inventory" of the dummy unit instead, set the charges there, and issue an order to drop the last created item at the point you want.
If you want, I can modify the test map to include some new functions to do this.
A glitch I ran into turned up something interesting.
I had a trigger that issued an order on every item in my inventory. I thought it would harmlessly ignore the instant use items, and I knew it wouldn't affect no-use items. But, to my surprise, when it came to the instant-use item, my unit walked over to the point I was targeting, and then used the item. Here was the trigger I was using:
Unit - Order (Triggering unit) to (Order Use Item Targeting Point( Use Item Targeted, (Item carried by (Triggering unit) in Seed Index), (Triggering ability target point))) (Replace Existing Orders)
What really baffles me, though, is that trigger was called every .5 seconds, and it should have replaced the order each time, but my unit happily walked over, taking several seconds, and avoiding using several items. I'm guessing it should be fairy safe to use Use Item Targeting Point to activate Instant use items, as long as you target the position of the unit that holds the item.
Could one of you two please try modifying the Use Item Instant trigger? Replace the line:
General - Return (cmd targeting item)
with
General - Return (Smart Command targeting item)
Tell me if that fixes anything.
Edit: It will still ask you to give a command in the trigger, because I didn't have you overhaul the entire function. It doesn't reference the command you give it anymore, so pick anything.
Just wanted to point out that the library seems to work alright, but the map is missing i = i-1 on the stack function, causing an infinite loop. Might confuse a few people trying to figure out what the map does.
I'm not familiar with how certain galaxy functions translate to GUI, so this library is incomplete. You're going to have to fix it up. I think I commented in every function that wouldn't work, I'm not sure. Its late, and I'm tired.
I also did a bit of second-guessing you on certain details, mainly choosing to use Unit Type for type instead of String.
I'm also not sure what 'fixed' is, so I think I always used an integer instead, I may have used a real or two.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I took a look at the map, and it definitely seems to be a data editor bug that I don't know how to handle yet. If I were Zy I might be able to do a bit better in fixing it but I have no idea how the item charges work. I delayed the click by .1 seconds so that I could try dropping items. Whenever I had the bugged item in my inventory, it would bug every other item I picked up. When I was able to drop it, every item I picked up after was just fine.
FatCat, there is a workaround I know of, but its kind of silly, and not in the spirit of this library. Create an invisible dummy unit with an inventory ability with a drop range the size of the map. Then, whenever you would use "Create item at point", use "Create item in inventory" of the dummy unit instead, set the charges there, and issue an order to drop the last created item at the point you want.
If you want, I can modify the test map to include some new functions to do this.
Could you post a map so I could take a look at it? My first guess is that its an editor issue that the library can't fix.
@BasharTeg: Go
A glitch I ran into turned up something interesting.
I had a trigger that issued an order on every item in my inventory. I thought it would harmlessly ignore the instant use items, and I knew it wouldn't affect no-use items. But, to my surprise, when it came to the instant-use item, my unit walked over to the point I was targeting, and then used the item. Here was the trigger I was using:
Unit - Order (Triggering unit) to (Order Use Item Targeting Point( Use Item Targeted, (Item carried by (Triggering unit) in Seed Index), (Triggering ability target point))) (Replace Existing Orders)
What really baffles me, though, is that trigger was called every .5 seconds, and it should have replaced the order each time, but my unit happily walked over, taking several seconds, and avoiding using several items. I'm guessing it should be fairy safe to use Use Item Targeting Point to activate Instant use items, as long as you target the position of the unit that holds the item.
@BasharTeg: Go
Could one of you two please try modifying the Use Item Instant trigger? Replace the line:
General - Return (cmd targeting item)
with
General - Return (Smart Command targeting item)
Tell me if that fixes anything.
Edit: It will still ask you to give a command in the trigger, because I didn't have you overhaul the entire function. It doesn't reference the command you give it anymore, so pick anything.
Just wanted to point out that the library seems to work alright, but the map is missing i = i-1 on the stack function, causing an infinite loop. Might confuse a few people trying to figure out what the map does.
I'm not familiar with how certain galaxy functions translate to GUI, so this library is incomplete. You're going to have to fix it up. I think I commented in every function that wouldn't work, I'm not sure. Its late, and I'm tired. I also did a bit of second-guessing you on certain details, mainly choosing to use Unit Type for type instead of String. I'm also not sure what 'fixed' is, so I think I always used an integer instead, I may have used a real or two.