I'm trying to build a charge attack that would activate on the release of a button, however, it seems that there isn't a microscript that would allow me to use ammon on a button release, thus, I tried building a system of modifiers to work around that problem (by using the button NOT pressed microscript) but I hit another wall, such a set of modifiers would require me to use a modifier on the item, so the ammo doesn't keep getting used while holding the button, yet, it seems there is no such a thing as a modifier for the inventory item.
So I ask for help: @zep, is there a way to work around this issue or a possible update to help?
Hey Kling
It's a bit tricky -- here's the simplest solution I could find:
You can use the 'AUTO' property in the inventory item for this. Instead of using the inventory item when a button is pressed, it is used on request. So if you create a USE_ITEM trigger with such an inventory item, it should be inside another modifier that is only true when you want to inventory item to be used.
Here I've used the PREV field in the activation controller for the 'charge' modifier in robot's root folder. This means that it will only activate when the trigger is true AND the 'pressed' modifier is active. The result is that when you release the button, 'charge' will activate and 'pressed' will deactivate in the same frame.
it crashes mine too, however I can play it normaly on the browser.
Soooo cooool !!!!
yeah, played it in the browser...
Thx Kling
Please keep us posted when you get this working :)
well... The level crashes when I try to shoot or collect the objects or click on the music item 186 and I still can't quite understand how the auto property works.
how can I reproduce it if i can't test it?
My bad -- the sound in that cart was using features not yet available in 0.3.4. I stripped out the custom sound so you can try it with 0.3.3:
When AUTO is set on an inventory item, it is automatically used whenever a trigger asks if it is being used. So it's the same as if one of the button checkboxes is set (inside the inventory item definition), if the player constantly held down that button.
One gotcha which I need to improve via the designer interface: make sure the item is wielded! Use the WIELD ON COLLECT option.
thanks zep, I managed to reproduce it and adapt it in various forms
[Please log in to post a comment]