Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   What the hell... (https://forums.graalonline.com/forums/showthread.php?t=11059)

Aknts 09-03-2001 08:41 AM

What the hell...
 
What is wrong with this?
It wont hide the img
if (playertouchsme) {toweapons Fish}
if (playerchats) {
if (strequals(#c,Fish)) {
this.fon==1;
setplayerprop #c,;
showimg 69,systemf.gif,playerx-1.75,playery-1.5;
showimg 80,@Arial@bc@#s(fishpounds),playerx+1.5,playery-.75;
changeimgcolors 80,0,0,0,0;
changeimgvis 80,1;
changeimgvis 69,1;
if (keydown(4)&&this.fon==1) {
hideimg 69;
hideimg 80;
this.fon=0;
}

}}

Aknts 09-03-2001 08:59 AM

Please Help

Lyndzey 09-03-2001 09:24 AM

I think you need to add if(created){this.fon=0;}

Enigma_GP6 09-03-2001 09:43 AM

Well, I think there must be something wrong, other wise it would hide, wouldn't it? of course you could try Lindsey's idea, but then again, I dont trust women, this is why:
Quote:

"WHEN PIGS FLY!"-True Love
They never flew, she said they would, and it never happened and I'll just throw this in for kicks:
Quote:

"Here lies the body of Johnathan Blake, He stapped on the gas, instead of the brake"-Tombstone in New Jersey
-Rebel95

Lyndzey 09-03-2001 10:36 AM

The reason it didnt work is this.fon was never set to 0 like it was supposed to.

entravial 09-03-2001 01:39 PM

Uhh... Try this... I'll explain the problem at the bottom...

NPC Code:

if (playertouchsme) {toweapons Fish}
if (playerchats) {
if (strequals(#c,Fish)) {
this.fon==1;
setplayerprop #c,;
showimg 69,systemf.gif,playerx-1.75,playery-1.5;
showimg 80,@Arial@bc@#s(fishpounds),playerx+1.5,playery-.75;
changeimgcolors 80,0,0,0,0;
changeimgvis 80,1;
changeimgvis 69,1;
}
timeout =.05;
}
if (timeout && keydown(4)&&this.fon==1) {
hideimg 69;
hideimg 80;
this.fon=0;
}



The problem was that the keydown wasn't getting through, and this.fon wasn't getting set to 0 :p
Just in case you don't understand playerchats...

Playerchats is activated as soon as the players hits enter in the text box, and only for a split second.

Hope that helped :-P

Aknts 09-03-2001 10:13 PM

Quote:

Originally posted by entravial
Uhh... Try this... I'll explain the problem at the bottom...

NPC Code:

if (playertouchsme) {toweapons Fish}
if (playerchats) {
if (strequals(#c,Fish)) {
this.fon==1;
setplayerprop #c,;
showimg 69,systemf.gif,playerx-1.75,playery-1.5;
showimg 80,@Arial@bc@#s(fishpounds),playerx+1.5,playery-.75;
changeimgcolors 80,0,0,0,0;
changeimgvis 80,1;
changeimgvis 69,1;
}
timeout =.05;
}
if (timeout && keydown(4)&&this.fon==1) {
hideimg 69;
hideimg 80;
this.fon=0;
}



The problem was that the keydown wasn't getting through, and this.fon wasn't getting set to 0 :p
Just in case you don't understand playerchats...

Playerchats is activated as soon as the players hits enter in the text box, and only for a split second.

Hope that helped :-P


Still won't work... :\

entravial 09-04-2001 04:19 AM

*notices something horribly simple that he screwed up on and pukes*

Remind me not to visit this board only at 2 a.m....

Change

NPC Code:
if (timeout && keydown(4)&&this.fon==1) { 
hideimg 69;
hideimg 80;
this.fon=0;
}



to

NPC Code:

if (timeout&&this.fon==1) {
if (keydown(4)){
hideimg 69;
hideimg 80;
this.fon=0; }
timeout=.05;
}


Enigma_GP6 09-04-2001 09:09 AM

English please? I only know a few this variables, but could someone give me a list of 'em so I can read this crap? I wont call it crap if I get help....

-Rebel95


All times are GMT +2. The time now is 02:08 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.