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 08-08-2001, 05:58 AM
Luigi223 Luigi223 is offline
Registered User
Join Date: Jul 2001
Posts: 192
Luigi223 is on a distinguished road
Angry only works for leader

why do some of the npcs i make only work for the leader of the level ... is there a way to make them work for everyone ?
__________________

ph33r me and my l33t jump rope!
Don't hate me cause i'm beutiful.
Reply With Quote
  #2  
Old 08-08-2001, 06:37 AM
LiquidIce00 LiquidIce00 is offline
RadioActive Monkeeh
LiquidIce00's Avatar
Join Date: Apr 2001
Location: dirty south
Posts: 2,112
LiquidIce00 is on a distinguished road
Send a message via ICQ to LiquidIce00 Send a message via AIM to LiquidIce00 Send a message via Yahoo to LiquidIce00
i know i hate that
sometimes timereverywhere helps with that
sometimes it doesnt.
__________________
LiquidIce *Owner* (UnholyNation)
-UN Website
http://www.unholynation.com
-UN Forum
http://forums.unholynation.com
-
-the thinker
-

-
onwall2 for nonp2p (i suck at onwall)
Reply With Quote
  #3  
Old 08-08-2001, 07:18 AM
BocoC BocoC is offline
Registered User
BocoC's Avatar
Join Date: Jun 2001
Location: Washington State, USA
Posts: 980
BocoC is on a distinguished road
Send a message via AIM to BocoC Send a message via Yahoo to BocoC
That is the downfall of non-npcserver scripting. Timereverywhere might help. Just code and code and code till you find a way to get around it.
__________________
-Boco

FLKJH$TRFG*$(&%>FMG >REN<>F ;.kjsd
Reply With Quote
  #4  
Old 08-08-2001, 07:26 AM
LiquidIce00 LiquidIce00 is offline
RadioActive Monkeeh
LiquidIce00's Avatar
Join Date: Apr 2001
Location: dirty south
Posts: 2,112
LiquidIce00 is on a distinguished road
Send a message via ICQ to LiquidIce00 Send a message via AIM to LiquidIce00 Send a message via Yahoo to LiquidIce00
sometimes nothing u can do about it
__________________
LiquidIce *Owner* (UnholyNation)
-UN Website
http://www.unholynation.com
-UN Forum
http://forums.unholynation.com
-
-the thinker
-

-
onwall2 for nonp2p (i suck at onwall)
Reply With Quote
  #5  
Old 08-08-2001, 08:09 AM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm has a spectacular aura about
if(playerenters) timeout=0.05; sets the only instance of timeout for the NPC for the first player who enters. Every subsequent player enters, and it does nothing because the timeout's already in use.
Timereverywhere makes a new timer for that player when it's called. If you don't have timereverywhere before your timeouts, it'll set the NPC's public timeout instead of the NPC's private timeout.
so:
if(playerenters||timeout){
shootball;
timereverywhere;
timeout=2;
}
will shoot a ball at the leader every 2 seconds.
if(playerenters||timeout){
shootball;
timereverywhere;
timeout=2;
}
will shoot a ball at everyone in the level every 2 seconds.
if(playerenters||timeout){
x=(x+1)%62;
timereverywhere;
timeout=0.05;
}
will move the NPC right one tile for EVERY PLAYER IN THE LEVEL.
if(playerenters||timeout){
x=(x+1)%62;
timeout=0.05;
}
will keep it at a constant speed.
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233
Reply With Quote
  #6  
Old 08-08-2001, 09:43 AM
LiquidIce00 LiquidIce00 is offline
RadioActive Monkeeh
LiquidIce00's Avatar
Join Date: Apr 2001
Location: dirty south
Posts: 2,112
LiquidIce00 is on a distinguished road
Send a message via ICQ to LiquidIce00 Send a message via AIM to LiquidIce00 Send a message via Yahoo to LiquidIce00
u messed up with the first and second code. they the same.
__________________
LiquidIce *Owner* (UnholyNation)
-UN Website
http://www.unholynation.com
-UN Forum
http://forums.unholynation.com
-
-the thinker
-

-
onwall2 for nonp2p (i suck at onwall)
Reply With Quote
  #7  
Old 08-08-2001, 11:57 AM
Luigi223 Luigi223 is offline
Registered User
Join Date: Jul 2001
Posts: 192
Luigi223 is on a distinguished road
i tryed making a stairs u auto walk up ... it has stuff like


playerx=43;
playery=32;
sleep0.5;
playery=32.5;


and so forth


but when i got it uploaded it only works for the first person in the level and it messes up .... whould timereverywhere work with that ?
__________________

ph33r me and my l33t jump rope!
Don't hate me cause i'm beutiful.
Reply With Quote
  #8  
Old 08-08-2001, 02:16 PM
Guest
Posts: n/a
Quote:
Originally posted by Luigi223
i tryed making a stairs u auto walk up ... it has stuff like


playerx=43;
playery=32;
sleep0.5;
playery=32.5;


and so forth


but when i got it uploaded it only works for the first person in the level and it messes up .... whould timereverywhere work with that ?
For the auto walking up the stairs i will try something like

NPC Code:

if (playertouchsme) {
set moveplayer;
timeout=.05;
}
if (timeout&&moveplayer) {
if (!playery>=30) {
playery-=.5;
setani walk,;
}else {
unset moveplayer;
}
timeout=.05;
}

Reply With Quote
  #9  
Old 08-09-2001, 01:33 AM
LiquidIce00 LiquidIce00 is offline
RadioActive Monkeeh
LiquidIce00's Avatar
Join Date: Apr 2001
Location: dirty south
Posts: 2,112
LiquidIce00 is on a distinguished road
Send a message via ICQ to LiquidIce00 Send a message via AIM to LiquidIce00 Send a message via Yahoo to LiquidIce00
no ice pick that would only work for the leader
__________________
LiquidIce *Owner* (UnholyNation)
-UN Website
http://www.unholynation.com
-UN Forum
http://forums.unholynation.com
-
-the thinker
-

-
onwall2 for nonp2p (i suck at onwall)
Reply With Quote
  #10  
Old 08-09-2001, 01:36 AM
Luigi223 Luigi223 is offline
Registered User
Join Date: Jul 2001
Posts: 192
Luigi223 is on a distinguished road
so what do i do
__________________

ph33r me and my l33t jump rope!
Don't hate me cause i'm beutiful.
Reply With Quote
  #11  
Old 08-09-2001, 01:47 AM
LiquidIce00 LiquidIce00 is offline
RadioActive Monkeeh
LiquidIce00's Avatar
Join Date: Apr 2001
Location: dirty south
Posts: 2,112
LiquidIce00 is on a distinguished road
Send a message via ICQ to LiquidIce00 Send a message via AIM to LiquidIce00 Send a message via Yahoo to LiquidIce00
what i said in the beggining
__________________
LiquidIce *Owner* (UnholyNation)
-UN Website
http://www.unholynation.com
-UN Forum
http://forums.unholynation.com
-
-the thinker
-

-
onwall2 for nonp2p (i suck at onwall)
Reply With Quote
  #12  
Old 08-09-2001, 09:25 AM
Guest
Posts: n/a
umm try this:

NPC Code:

if(playertouchsme) {
this.stairs = 1;
if(playery = y to stop at) {
this.stairs = 2;
}
}

if(this.stairs = 1) {
playery-= 0.02;
setani walk,;
timeout = 0.05;
}
if(this.stairs = 2) {
playery = playery;
playerx = playerx;
}



that should work if any player touches it.
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:10 PM.


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