hi i am trying to make my player's staff shoot magic projectiles. So far i have the advanced staff in the hierarchy seen in screenshot..
Also i tried dragging a Magic tracer vfx from "my content" (shown in screenshot) into properties (shown with red arrow) but it only does the animation stance but no projectile? please help?
Adding a VFX in custom properties does nothing but gives a reference to that VFX in your ability object.
You need to "Play()" the VFX using a script. You can find some examples in the Core docs:
https://docs.coregames.com/api/vfx/
So where does the script go? Also where does VFX go (is in my template)?
There are many possibilities. It is up to you.
You can put the script under the VFX in your hierarchy and refer to it as
local myVFX = script.parent
Or another example:
Put your VFX as a custom property in your script. And then in the script refer to it as:
local MY_VFX = script:GetCustomProperty("vfxName") -- vfxName being the name of the custom property you gave for your script.
I usually prefer this method when trying various VFXs. Here is an example from my current project:
local BURNING_VFX = script:GetCustomProperty("burningVFX")
local burningVFX = World.SpawnAsset(BURNING_VFX, {position = player:GetWorldPosition()}) -- spawn the VFX in the game world
burningVFX:AttachToPlayer(player, "root") -- attach it to the player's "root"
burningVFX.lifeSpan = 1 -- the VFX will disappear after 1 sec
burningVFX:Play() -- play it