1. How do I destroy items that have been sitting on the floor for too long? i have tried adding a timed Life Behavior, but they also destroy items in the inventory.
2. is it possible to disable abilities when a unit is in combat? I've have a behavior that is disabled when the unit is out of combat, but I don't see a Count disabled Behaviors for requirements.
1.Cant you supress the timed life behaviour when picked up via requirements or validators? Maybe you could remove the timer on pickup like the mineral pallet and reapply it when dropped?
2.There is a validator called Caster In Combat
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
This is kinda related but not to the initial point, but if you want to validate an ability i.e. nothing happens and the player isnt charged the cost of the ability when the button is pushed unless X conditions are met, thats really easy. All you have to do is put the validator on the effect thats in the abilities effect- effect field, the very first effect it creates basically, and if that validator fails the ability will not be cast and the player or unit will not be charged for the attempted use of said ability.
However the last time I checked this does not work for items, they will still charge the player for use, however the effect will not be created because it failed the validator. I am in the process now of creating an item that does something similar, and after reading this what I think I am going to do is rig the item to create itself when used, and be un-droppable, and just have the floating item that the player see's on the ground be a dummy for show that creates an item on caster unit when either clicked or walked near, I'm pretty sure I am going to use a click response behavior because I want there to be a period of acquirement before the unit actually gains the item.
So, the click response will order the source to use ability X (which creates the item in the players inventory) X ability will have a cast time of say 5 seconds. So the first player to click it gets it.
If the item is used ( and this can easily be mentioned in the TT ) have it create one of the dummies with the click response where the caster stands.
Of course now all I need is the timed life on the dummy item.
I personally for the item I am making, going to use a spawner unit, which is just a unit using literally any model in the game that suits your fancy that has a behavior on it that periodically does a small search that disables the timed life on the item it spawns, and another behavior that periodically spawns the item.
Now on the item created you need a similar behavior that disables the spawning one, the period durations on these dont need to be terribly long especially if the period between items being created by the spawner is longer than 5 seconds or so.
This will handle it all through data, the only drawback is that you cant do anything else will the item but create one of itself. Well you could but to explain how to configure a switch to detect if its target is a unit, or a point and thus create 2 different effects accordingly would be a wall of text, and this is already kinda big.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
1. How do I destroy items that have been sitting on the floor for too long? i have tried adding a timed Life Behavior, but they also destroy items in the inventory.
2. is it possible to disable abilities when a unit is in combat? I've have a behavior that is disabled when the unit is out of combat, but I don't see a Count disabled Behaviors for requirements.
1.Cant you supress the timed life behaviour when picked up via requirements or validators? Maybe you could remove the timer on pickup like the mineral pallet and reapply it when dropped?
2.There is a validator called Caster In Combat
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
I think abilities don't use validators? I can't seem to find it, only requirements.
Also how do i do the first one?
use the buff but remove it when the item is picked up using triggers??
@TheTAZsc: Go
thank you, I've added two triggers for Drop and Pick up.
Actually some ability types do have a field for validators.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
Ok so the triggers aren't working for purchased Items that go straight into the inventory. How do I fix this?
Bump...
This is kinda related but not to the initial point, but if you want to validate an ability i.e. nothing happens and the player isnt charged the cost of the ability when the button is pushed unless X conditions are met, thats really easy. All you have to do is put the validator on the effect thats in the abilities effect- effect field, the very first effect it creates basically, and if that validator fails the ability will not be cast and the player or unit will not be charged for the attempted use of said ability.
However the last time I checked this does not work for items, they will still charge the player for use, however the effect will not be created because it failed the validator. I am in the process now of creating an item that does something similar, and after reading this what I think I am going to do is rig the item to create itself when used, and be un-droppable, and just have the floating item that the player see's on the ground be a dummy for show that creates an item on caster unit when either clicked or walked near, I'm pretty sure I am going to use a click response behavior because I want there to be a period of acquirement before the unit actually gains the item.
So, the click response will order the source to use ability X (which creates the item in the players inventory) X ability will have a cast time of say 5 seconds. So the first player to click it gets it.
If the item is used ( and this can easily be mentioned in the TT ) have it create one of the dummies with the click response where the caster stands.
Of course now all I need is the timed life on the dummy item.
I personally for the item I am making, going to use a spawner unit, which is just a unit using literally any model in the game that suits your fancy that has a behavior on it that periodically does a small search that disables the timed life on the item it spawns, and another behavior that periodically spawns the item.
Now on the item created you need a similar behavior that disables the spawning one, the period durations on these dont need to be terribly long especially if the period between items being created by the spawner is longer than 5 seconds or so.
This will handle it all through data, the only drawback is that you cant do anything else will the item but create one of itself. Well you could but to explain how to configure a switch to detect if its target is a unit, or a point and thus create 2 different effects accordingly would be a wall of text, and this is already kinda big.