Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-03-2001, 08:41 AM
Aknts Aknts is offline
Level Designer
Aknts's Avatar
Join Date: Apr 2001
Location: USofA
Posts: 3,340
Aknts will become famous soon enough
Send a message via AIM to Aknts
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;
}

}}
__________________
Reply With Quote
  #2  
Old 09-03-2001, 08:59 AM
Aknts Aknts is offline
Level Designer
Aknts's Avatar
Join Date: Apr 2001
Location: USofA
Posts: 3,340
Aknts will become famous soon enough
Send a message via AIM to Aknts
Please Help
__________________
Reply With Quote
  #3  
Old 09-03-2001, 09:24 AM
Lyndzey Lyndzey is offline
Woman
Lyndzey's Avatar
Join Date: Aug 2001
Posts: 2,875
Lyndzey is a jewel in the roughLyndzey is a jewel in the rough
I think you need to add if(created){this.fon=0;}
Reply With Quote
  #4  
Old 09-03-2001, 09:43 AM
Enigma_GP6 Enigma_GP6 is offline
Banned
Join Date: Jul 2001
Location: Who?
Posts: 261
Enigma_GP6 is on a distinguished road
Send a message via ICQ to Enigma_GP6 Send a message via AIM to Enigma_GP6
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
Reply With Quote
  #5  
Old 09-03-2001, 10:36 AM
Lyndzey Lyndzey is offline
Woman
Lyndzey's Avatar
Join Date: Aug 2001
Posts: 2,875
Lyndzey is a jewel in the roughLyndzey is a jewel in the rough
The reason it didnt work is this.fon was never set to 0 like it was supposed to.
Reply With Quote
  #6  
Old 09-03-2001, 01:39 PM
entravial entravial is offline
Registered User
entravial's Avatar
Join Date: Mar 2001
Posts: 825
entravial is on a distinguished road
Send a message via ICQ to entravial Send a message via AIM to entravial Send a message via Yahoo to 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
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
__________________


If the post says ~AlphaFlame~, that's who's posting. If not, it's Entravial (owner)
Reply With Quote
  #7  
Old 09-03-2001, 10:13 PM
Aknts Aknts is offline
Level Designer
Aknts's Avatar
Join Date: Apr 2001
Location: USofA
Posts: 3,340
Aknts will become famous soon enough
Send a message via AIM to Aknts
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
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...
__________________
Reply With Quote
  #8  
Old 09-04-2001, 04:19 AM
entravial entravial is offline
Registered User
entravial's Avatar
Join Date: Mar 2001
Posts: 825
entravial is on a distinguished road
Send a message via ICQ to entravial Send a message via AIM to entravial Send a message via Yahoo to entravial
*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;
}

__________________


If the post says ~AlphaFlame~, that's who's posting. If not, it's Entravial (owner)
Reply With Quote
  #9  
Old 09-04-2001, 09:09 AM
Enigma_GP6 Enigma_GP6 is offline
Banned
Join Date: Jul 2001
Location: Who?
Posts: 261
Enigma_GP6 is on a distinguished road
Send a message via ICQ to Enigma_GP6 Send a message via AIM to Enigma_GP6
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
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 05:48 AM.


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