Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Proper Keydown? (https://forums.graalonline.com/forums/showthread.php?t=23497)

ownerofbabylon 02-10-2002 03:16 PM

Proper Keydown?
 
How is the best way to keep testing for a player to touch a NPC and hit A?

if(playertouchsme&&keydown(5)){
message hi;
}

makes it so u have to hold A and run at the NPC. Im just trying to figure out some way so a player can already be touching a NPC and hit a and it works.

Loriel did it on his mini game on londeroth but I really have no clue how. Any ideas?

joseyisleet 02-10-2002 03:17 PM

-=Josey=-
I'd use something like:
if (created){
timeout=.05;
}
if (timeout){
if (playertouchsme&&keydown(0)){
message o.0;
}
timeout=.05;
}

Faheria_GP2 02-10-2002 03:20 PM

events dont work well within events

yes, if (playertouchsme && keydown(5)) would be a good way to do it

ownerofbabylon 02-10-2002 03:50 PM

Quote:

Originally posted by Faheria_GP2
events dont work well within events

yes, if (playertouchsme && keydown(5)) would be a good way to do it

then u have to hold a and run at it.

Kai, i didnt ever understand the way you explained =/ sorry

nyghtGT 02-10-2002 04:00 PM

Quote:

Originally posted by ownerofbabylon


then u have to hold a and run at it.

Kai, i didnt ever understand the way you explained =/ sorry

like maybe you could draw a litte box around the NPC itself, then have it so:
NPC Code:

NPC Code:

if (created) {
timeout=0.5;
}
if (timeout) {
if (playerx in {#,#} && playery in {#,#,#} && keydown(6)) {
message li3k, omG! k?;
} else {
message li3k !omG, k?;
timeout=0.5;
}
}




i have no honest idea if that would work but give it a shot ...

TDO2000 02-10-2002 06:23 PM

um as Londeroth Admin I can tell u that this is not something like this... we use a script in our system NPC that triggers in front of the player when u press a so this Minigame NPC just gets a triggeraction...

TDK_RC6 02-10-2002 09:18 PM

Quote:

Originally posted by Kaimetsu
We've discussed this before :-/
lol

lordhelmut 02-10-2002 09:57 PM

Quote:

Originally posted by TDO2000
um as Londeroth Admin I can tell u that this is not something like this... we use a script in our system NPC that triggers in front of the player when u press a so this Minigame NPC just gets a triggeraction...
I was told Trigger Action isnt allowed on free servers =(

Slaktmaster 02-10-2002 10:02 PM

Quote:

Originally posted by lordhelmut


I was told Trigger Action isnt allowed on free servers =(

That's bull****, it is allowed.

Androk2k1 02-10-2002 11:16 PM

is trigger action allowed? I thought it wasn't...

lordhelmut 02-11-2002 04:50 AM

Androk is the one who said it wasnt, he had me worried.

TDK_RC6 02-11-2002 06:31 AM

Quote:

Originally posted by Androk2k1
is trigger action allowed? I thought it wasn't...
i do believe it is


All times are GMT +2. The time now is 07:14 AM.

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