1"use strict";(self.webpackChunkmy_website=self.webpackChunkmy_website||[]).push([[9788],{28453:(e,n,s)=>{s.d(n,{R:()=>i,x:()=>o});var r=s(96540);const t={},a=r.createContext(t);function i(e){const n=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:i(e.components),r.createElement(a.Provider,{value:n},e.children)}},42106:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/T_HandleTraceHit-f3668caa10d62398862609a22a533d39.png"},43573:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/T_UnregisterAndClearTask-4f94b9389b6c3302114964ab1b00ef25.png"},60913:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>l,contentTitle:()=>o,default:()=>h,frontMatter:()=>i,metadata:()=>r,toc:()=>c});const r=JSON.parse('{"id":"Easy-Trace-Trail-System/ManagingTraceTrailTasks","title":"Managing Trace-Trail Tasks","description":"Once you have created your trail tasks you have events On Trace Hit, On Trace Task Cleared. With these methods you can affect your game world. It is generally a good idea to hold your Task Reference in a variable. So you can clear the task or call some functions when necessary.","source":"@site/docs/Easy-Trace-Trail-System/ManagingTraceTrailTasks.md","sourceDirName":"Easy-Trace-Trail-System","slug":"/Easy-Trace-Trail-System/ManagingTraceTrailTasks","permalink":"/docs/Easy-Trace-Trail-System/ManagingTraceTrailTasks","draft":false,"unlisted":false,"tags":[],"version":"current","sidebarPosition":4,"frontMatter":{"sidebar_position":4},"sidebar":"tutorialSidebar","previous":{"title":"Creating Hit Trails","permalink":"/docs/Easy-Trace-Trail-System/CreatingHitTrails"},"next":{"title":"Final Notes","permalink":"/docs/Easy-Trace-Trail-System/FinalNotes"}}');var t=s(74848),a=s(28453);const i={sidebar_position:4},o="Managing Trace-Trail Tasks",l={},c=[{value:"Delegates",id:"delegates",level:2},{value:"On Trace Hit",id:"on-trace-hit",level:3},{value:"On Trace Task Cleared",id:"on-trace-task-cleared",level:3},{value:"Functions",id:"functions",level:2},{value:"Perform Trace",id:"perform-trace",level:3}];function d(e){const n={admonition:"admonition",br:"br",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",li:"li",mdxAdmonitionTitle:"mdxAdmonitionTitle",p:"p",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"managing-trace-trail-tasks",children:"Managing Trace-Trail Tasks"})}),"\n",(0,t.jsxs)(n.p,{children:["Once you have created your trail tasks you have events ",(0,t.jsx)(n.em,{children:"On Trace Hit"}),", ",(0,t.jsx)(n.em,{children:"On Trace Task Cleared"}),". With these methods you can affect your game world. It is generally a good idea to hold your ",(0,t.jsx)(n.em,{children:"Task Reference"})," in a variable. So you can clear the task or call some functions when necessary."]}),"\n",(0,t.jsx)(n.h2,{id:"delegates",children:"Delegates"}),"\n",(0,t.jsx)(n.p,{children:"This delegates are fired whenever something important happens on the task."}),"\n",(0,t.jsx)(n.h3,{id:"on-trace-hit",children:"On Trace Hit"}),"\n",(0,t.jsxs)(n.p,{children:["Whenever the trace hits or overlaps, you can get your ",(0,t.jsx)(n.em,{children:"hit results"})," like you have used an ",(0,t.jsx)(n.em,{children:"Overlap Shape By Channel"}),"."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"HandleOnTraceHit",src:s(42106).A+"",width:"2248",height:"1132"})}),"\n",(0,t.jsxs)(n.admonition,{type:"note",children:[(0,t.jsx)(n.mdxAdmonitionTitle,{children:(0,t.jsx)(n.strong,{children:"When Does On Trace Hit Fire?"})}),(0,t.jsx)(n.p,{children:"The delegate fires whenever any trace shape detects a valid collision with an actor on the specified trace channel."}),(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Multiple Hits Per Tick:"}),(0,t.jsx)(n.br,{}),"\n","The event can fire multiple times during a single trace update if different socket sections hit different actors simultaneously."]}),(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Single Actor Per Tick Rule:"}),(0,t.jsx)(n.br,{}),"\n","Each actor can only trigger the event once per trace tick, even if multiple weapon sections hit the same actor. If you value the priority of sections, use ",(0,t.jsx)(n.em,{children:"Result Priority Order"})," On the ",(0,t.jsx)(n.em,{children:"Task Settings"}),"."]}),(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Repeat Hit Behavior:"})}),(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Only Trace Actor Once = TRUE:"})," Actor is added to ignore list after first hit and will never trigger the event again during this task's lifetime"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Only Trace Actor Once = FALSE:"})," The same actor can trigger the event again in future trace ticks"]}),"\n"]}),(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Example Scenario:"}),(0,t.jsx)(n.br,{}),"\n","Your sword hits 3 enemies in one swing \u2192 Event fires 3 times in the same tick, once for each enemy."]}),(0,t.jsxs)(n.p,{children:["This part is a bit hard to explain but once you use it I am sure that you will find the behaviour you are looking for. ",(0,t.jsx)(n.strong,{children:"If not please reach us!"})]})]}),"\n",(0,t.jsx)(n.h3,{id:"on-trace-task-cleared",children:"On Trace Task Cleared"}),"\n",(0,t.jsxs)(n.p,{children:["Called whenever a trace task gets cleared. This can happen if you manually destroy the task using: ",(0,t.jsx)(n.em,{children:"Unregister and Clear Trace Task"})," or the game world gets destroyed."]}),"\n",(0,t.jsxs)(n.admonition,{type:"note",children:[(0,t.jsx)(n.mdxAdmonitionTitle,{}),(0,t.jsxs)(n.p,{children:["Do not use the ",(0,t.jsx)(n.em,{children:"Clear"})," function on the task. This method is not safe to call to just finish the trailing. Use the ",(0,t.jsx)(n.em,{children:"Unregister and Clear Trace Task"})," on the ",(0,t.jsx)(n.em,{children:"Trace Trailer Task Manager"}),". You should always use that subsystem to manage your tasks."]}),(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"UnregisterAndClearTask",src:s(43573).A+"",width:"1560",height:"896"})})]}),"\n",(0,t.jsx)(n.h2,{id:"functions",children:"Functions"}),"\n",(0,t.jsx)(n.h3,{id:"perform-trace",children:"Perform Trace"}),"\n",(0,t.jsx)(n.p,{children:"This method allows you to manually trigger a trace outside of the normal timer-based system."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Normal Behavior:"}),(0,t.jsx)(n.br,{}),"\n","The system automatically performs traces at intervals based on your ",(0,t.jsx)(n.em,{children:"Trace FPS"})," setting (e.g., 30 FPS = trace every 0.033 seconds)."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Manual Control:"}),(0,t.jsx)(n.br,{}),"\n","Use this method when you need precise timing control for critical moments in your animations or gameplay:"]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Example Use Cases:"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Animation Key Frames:"})," Force a trace at the exact moment of your apex point of your animation."]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Performance Note:"}),(0,t.jsx)(n.br,{}),"\n","This is safe to call multiple times and works alongside the automatic timer system. Extra manual traces won't interfere with the scheduled ones. The system will use the extra call as it's previous tracing point."]})]})}function h(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.