Staff block

im making a staff block and i am having one problem, deleting the block. this is what i have so far if you need to know:

This is whats on the level.

// NPC made by Pyro
if (created) {
}
if (playertouchsme) {
if (strequals(#a,Pyro))
toweapons StaffBlock;
}
if(weaponfired){
putnpc ,staff_block.txt,mousex,mousey;
}

And in staff_block.txt is:

if (created) { setimg block.png; } if (palyerchats) { if (strequals(#a,Pyro)) { if (strequals(#c,Destroy)) { destroy; } }

It just wont destroy when i say destroy.

if (palyerchats) {

playerchats, you have a typo.

and all of a sudden it starts to work…

where exactly do you place that file in the file brower? Does it belong in npcprops folder?

I just have it in world because the level withthe box in it is in the world folder.

By default, place .txt files in the world directory. If you want to place them elsewhere, you must modify your foldersconfig.txt file.

0.o this has always confused me a bit… In gs1 can you detect mouse clicks?

(why destroy all classblocks based on 1 word? I would rather it check for tag or account and them a right click to delete it lol…)

Here use this:

if (created) { setimg block.png; } if (palyerchats) { if (strequals(#a,)) { if (actionrightmouse) { destroy; } } }

wouldnt actionrightmouse also work at PLACING the blocks too? also, you have Pyro’s typo in ther Stowen

Because he just copied my script.

And I know about actionrightmouse I was just playing around with the npcs.

Also wouldn’t work since the triggeraction from rightclicking wouldn’t work within the palyer/playerchats and the strequals.

therefore you check strequals(#c,blah) and strequals(#a,blah) within the triggeraction from rightclicking.

actionrightmouse won’t work without an NPC to trigger. So if you are just clicking on a blank screen nothing will happen.

___Merged doublepost__________________

oh wtf Beholder already said it >:| fuck

ahh my bad!