最近在思考怎麼做毒沼澤的功能,發現引擎中內建PainCausingVolume還蠻符合自己需求的,我們可以在這個Volume上設定傷害數值,並且設定每隔幾秒才觸發事件。
不過由於我的測試專案高度集成GameplayAbilitySystem(GAS),因此會希望所有的角色的數值變化操作都透過系統中的GameplayEffect來執行。由於PainCausingVolume跟GAS系統並沒有相依關係,為了這個機制要另外刻一個Volume又感覺有點多餘。不過好加在GAS系統本身製作的彈性還蠻大的,因此是有方法可以把這種外部的傷害數值注入,後續的傷害計算跟數值的加減就可以延著原本系統設計的邏輯進行,不需要再製作另一套系統維護。

其實方法還蠻簡單的,主要就是要在我們的給PainCausingVolume用的GE中的Magnitude Calculation Type使用Set by Caller,並設定一個GamplayTag讓系統知道之後要拿傷害的時候就去找這個Tag拿就行了。下圖我的這個Tag是設定成:GameEffect.SetByCaller.IncomingDirectDamage。

然後在角色的AnyDamage Callback中,我們就可以做出這個GameplayEffect,使用AssignTagSetByCallerMagnitude把實際的數值指定給這個Tag,然後就可以把這個效果套用給角色產生傷害,如下圖:

zoritoler imol
I keep listening to the news lecture about getting boundless online grant applications so I have been looking around for the best site to get one. Could you tell me please, where could i find some?
Gelatin Trick Recipe
Thank you for the auspicious writeup. It in fact was a amusement account it. Look advanced to more brought agreeable from you! By the way, how could we keep up a correspondence?
situs slot gacor
F*ckin¦ awesome things here. I¦m very satisfied to look your post. Thanks a lot and i am looking forward to touch you. Will you please drop me a e-mail?
building company Naxxar
naturally like your web-site but you have to check the spelling on several of your posts. A number of them are rife with spelling problems and I find it very troublesome to tell the truth nevertheless I will certainly come back again.
nextogel
Would you be inquisitive about exchanging links?
nextogel
Hello my loved one! I wish to say that this article is awesome, nice written and come with approximately all significant infos. I’d like to look more posts like this .
Gelatin Trick for Weight Loss
This is really interesting, You are a very skilled blogger. I have joined your feed and look forward to seeking more of your excellent post. Also, I have shared your web site in my social networks!
honey trick for memory loss
I am glad to be one of several visitants on this outstanding website (:, thanks for posting.
togel 4d
Wow, marvelous weblog structure! How long have you ever been running a blog for? you made blogging glance easy. The overall look of your site is magnificent, as neatly as the content material!
fdertol mrtokev
Regards for helping out, good info. “Courage comes and goes. Hold on for the next supply.” by Vicki Baum.
slot gacor thailand
Hi, I think your website might be having browser compatibility issues. When I look at your blog in Firefox, it looks fine but when opening in Internet Explorer, it has some overlapping. I just wanted to give you a quick heads up! Other then that, terrific blog!
zabornatorilon
I not to mention my friends ended up digesting the excellent information and facts found on the blog and suddenly I got an awful suspicion I had not thanked the website owner for those secrets. All the guys ended up certainly glad to learn all of them and already have honestly been loving those things. Many thanks for really being really considerate and also for utilizing this kind of high-quality issues millions of individuals are really wanting to be informed on. My very own honest apologies for not saying thanks to sooner.