lazarus321
Member
- Joined
- May 8, 2017
- Messages
- 209
- Reaction score
- 20
Can anyone explain to me why this spell works only if the player uses it and does not work if the summon uses it?
Basically it does a check and who is your master and asks him to say his name.
Basically it does a check and who is your master and asks him to say his name.
C#:
function onCastSpell(creature, var)
local targets = {}
local player = Player(creature)
local playerPos = creature:getPosition()
local spectators = Game.getSpectators(playerPos, false, false, 4, 4, 4, 4)
for i = 1, #spectators do
local spectator = spectators[i]
spectator:say(spectator:getMaster():getName(), TALKTYPE_SAY)
end
end
Last edited: