[DiscordArchive] Is there a way to have the player cast a spell without checking for reagents, but still keeping the
[DiscordArchive] Is there a way to have the player cast a spell without checking for reagents, but still keeping the
Archived author: tomato • Posted: 2024-01-25T08:23:11.908000+00:00
Original source
Is there a way to have the player cast a spell without checking for reagents, but still keeping the cast time? Something like setting `triggered` to true without making the cast instant?
Archived author: Anchy • Posted: 2024-01-25T08:29:13.117000+00:00
Original source
you should be able to just use the CastSpell function which is part of Unit
Archived author: tomato • Posted: 2024-01-25T08:34:09.772000+00:00
Original source
hmm, calling `player:CastSpell(nil, 3561, false)` in a `PLAYER_EVENT_ON_COMMAND` handler results in the client refusing to cast due to missing a rune
Archived author: Anchy • Posted: 2024-01-25T08:43:01.398000+00:00
Original source
ah right, it's likely failing the CheckCast you are correct
Archived author: Anchy • Posted: 2024-01-25T08:43:47.449000+00:00
Original source
CheckCast is quite late into CastSpell chain so I'm not sure sorry
Archived author: Anchy • Posted: 2024-01-25T08:43:49.863000+00:00
Original source
maybe Foe knows
Archived author: tomato • Posted: 2024-01-25T08:43:50.090000+00:00
Original source
giving the player the required item right before calling `CastSpell` and then removing it right after *works*, but requires a `PLAYER_EVENT_ON_SPELL_CAST` handler that calls `spell:Cast(true)`, and still causes error text on the client, which is kinda eh (and feels super hacky)
Archived author: Anchy • Posted: 2024-01-25T08:45:00.983000+00:00
Original source
you could theoretically modify the spell conditions before it's actually cast and remove the requirement
Archived author: Anchy • Posted: 2024-01-25T08:45:01.707000+00:00
Original source
lol