Pyro
November 17, 2009, 7:16pm
1
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.
Pyro
November 17, 2009, 7:26pm
3
and all of a sudden it starts to work…
Stowen
November 18, 2009, 4:11am
4
where exactly do you place that file in the file brower? Does it belong in npcprops folder?
Pyro
November 18, 2009, 5:42am
5
I just have it in world because the level withthe box in it is in the world folder.
Nalin
November 18, 2009, 12:08pm
6
By default, place .txt files in the world directory. If you want to place them elsewhere, you must modify your foldersconfig.txt file.
wsensor
November 18, 2009, 2:04pm
7
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…)
Stowen
November 18, 2009, 5:40pm
8
Here use this:
if (created) {
setimg block.png;
}
if (palyerchats) {
if (strequals(#a,)) {
if (actionrightmouse) {
destroy;
}
}
}
Dontar
November 18, 2009, 6:26pm
9
wouldnt actionrightmouse also work at PLACING the blocks too? also, you have Pyro’s typo in ther Stowen
Pyro
November 18, 2009, 7:43pm
10
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.
urza
November 18, 2009, 8:14pm
12
therefore you check strequals(#c ,blah) and strequals(#a ,blah) within the triggeraction from rightclicking.
Spooon
November 18, 2009, 10:03pm
13
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