Code Monkey home page Code Monkey logo

Comments (4)

acxsasx avatar acxsasx commented on July 20, 2024

But it’s not the same effect. In situations where you only want the armor to increase when you take damage you don’t want it to increase every period of time. It’s the damage that’s triggering the effect. So this is a good example of where you’re waiting for some other event to trigger a game play affect.

from gasdocumentation.

acxsasx avatar acxsasx commented on July 20, 2024

Also this is a good place to discuss this on the discord app in unreal slackers. This area is more for code issues.

from gasdocumentation.

Zod20 avatar Zod20 commented on July 20, 2024

image

I was talking about the passive armor ability in the sample project. In the ability as you can see in the screenshot, a stack is added every X seconds. The GE armor class itself can do this type of stacking every X seconds with the 'period'. Also there are some other code within the ability that manually manages the stacks. These can be automated as well within the effect stack policy.

from gasdocumentation.

tranek avatar tranek commented on July 20, 2024

Hi and thanks for the suggestions.

Using a periodic stacking GE to add to the stacks is a valid approach. I believe that you will still need additional logic external to the GE to add/remove a new GameplayTag when max stacks has been reached that is on the GE's Ignore Ongoing Tag Requirements. I don't think that there's a built-in way for a periodic stacking GE to pause itself when max stacks has been reached. If you know of one, please let me know. This will be necessary to use the periodic's Periodic Inhibition Policy to reset the timer when the inhibition (Ignore Ongoing Tag Requirements) is removed. Otherwise the period timer will constantly be ticking and trying to apply a new stack at max. This could run into a scenario where you lose a stack but the timer could immediately finish granting a new stack which I did not want in this ability's design. This project was created in 4.22, before GE's had EGameplayEffectPeriodInhibitionRemovedPolicy which was added in 4.23 which is why I chose not to use a periodic GE at the time.

The benefit of your suggestion would be one less AbilityTask (the WaitDelay), but we would still need to listen for stack change to add and remove the new max stacks GameplayTag. I'm not worried about hitting the max limit of AbilityTasks (1000) in this project and the performance impact of the WaitDelay task is negligible.

I won't be changing the Sample Project since this isn't a necessary change, but it's a good suggestion and I may use it in future sample projects.

I already have a small section that briefly describes periodic effects. While it doesn't explicitly give many usage examples, the Sample Project does use them for things like health regen. I think eventually I'll expand upon them and maybe even break them into their own subsection, but that is not a high priority and I think this brief description is good enough for now.

Duration and Infinite GameplayEffects have the option of applying Periodic Effects that apply its Modifiers and Executions every X seconds as defined by its Period. Periodic Effects are treated as Instant GameplayEffects when it comes to changing the Attribute's BaseValue and Executing GameplayCues. These are useful for damage over time (DOT) type effects. Note: Periodic Effects cannot be predicted.

from gasdocumentation.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.