Page 1 of 1

destroying a crate

Posted: Thu Nov 16, 2017 7:51 pm
by Ememjr
how would you go about destroying a crate, that must be killed by a mage lighting burst, should be non attackable by melee

right now the crate is an object, i am thinking possibly in spawn script detcting being attacked, but when i try to cast lighing burst on the crate it says there is no eligible target for this spell

Re: destroying a crate

Posted: Thu Nov 16, 2017 10:29 pm
by Jabantiz
The spell is probably set to enemies so the client will not let you cast on an object, the crate would need to be changed to an NPC most likely. As for restricting melee that isn't possible, you could set it as not attackable until on the quest then change the flags only for that client, to make sure they cast the spell on it instead of using melee you could add a spawn script and use casted_on to see if they used the right spell and advance the quest that way if some one does go up to it with melee they won't get credit.

Re: destroying a crate

Posted: Fri Nov 17, 2017 4:48 am
by Ememjr
ok so here is the actual script

Crates are guarded by a single
goblin supply runner each; as soon as
you destroy the crate with your
Lightning Bolt, the goblin guarding it
attacks you, so be prepared.

so ill create the supply runner and crate next to each other(crate as an npc)
can supply runner be non aggro until crate detroyed then become allive and attack when crate destroyed.
in the spawn script
? will set a varible when casted on is called to track the spell used.
2. when death is called i will check, the variblle set above from casted on
3. that will tell me whther or not the crate was killed by lightning burst
4. if it was then the runner next to it will aggro the player, and and once dead will update quest

things to remember,
set spawn access will need to be turned on for the crates
do not update quest only if killed by lightning burst

Re: destroying a crate

Posted: Fri Nov 17, 2017 3:30 pm
by Jabantiz
You could have the goblin attack by using Attack() lua function, if you actually need the goblin to get the red outline around there name for a KoS faction you should be able to change its faction with SpawnSet() to get that, but I would still use Attack() with it to get the goblin attacking right away.