Log In  

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?

P#19635 2016-04-07 13:25 ( Edited 2016-04-14 00:10)

:: zep

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.

Cart [#19649#] | 2016-04-08 | No License | Embed

P#19650 2016-04-08 14:22 ( Edited 2016-04-08 19:41)

This cartridge crashes my Win 7 Voxatron 3.4

P#19654 2016-04-08 20:11 ( Edited 2016-04-09 00:11)
:: Kling

it crashes mine too, however I can play it normaly on the browser.

P#19677 2016-04-10 07:56 ( Edited 2016-04-10 11:56)

Soooo cooool !!!!
yeah, played it in the browser...
Thx Kling
Please keep us posted when you get this working :)

P#19692 2016-04-10 18:18 ( Edited 2016-04-10 22:19)
:: Kling

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?

P#19772 2016-04-13 16:18 ( Edited 2016-04-13 20:18)
:: zep

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:

P#19776 2016-04-13 18:42 ( Edited 2016-04-13 22:42)
:: zep

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.

P#19777 2016-04-13 18:45 ( Edited 2016-04-13 22:45)
:: Kling

thanks zep, I managed to reproduce it and adapt it in various forms

P#19779 2016-04-13 20:10 ( Edited 2016-04-14 00:10)

[Please log in to post a comment]

About | Contact | Updates | Terms of Use
Follow Lexaloffle:        
Generated 2019-11-21 14:55 | 0.018s | 4194k | Q:37