Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-24-2002, 06:43 AM
Kadar Kadar is offline
Registered User
Join Date: Jan 2002
Posts: 636
Kadar is on a distinguished road
timereverywhere

Could someone tell me what it does.. i dont really get it...
Also kaimetsu if u read this i need to pm u one of my scripts that for some reason does not work when 2 players are in the room..
__________________
Reply With Quote
  #2  
Old 01-24-2002, 06:46 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
It basically makes it so that timeout works globeally instead of just for the leader. is usless in P2P codes.
__________________

subliminal message: 1+1=3
Reply With Quote
  #3  
Old 01-24-2002, 06:50 AM
Kadar Kadar is offline
Registered User
Join Date: Jan 2002
Posts: 636
Kadar is on a distinguished road
Ok i made a couple things you know like when u start prov and it has those bars that u can choose your gender and stuff..
i made one of those but its not working when 2 players are in the room.. should i add timereverywhere.. this is nonp2p
__________________
Reply With Quote
  #4  
Old 01-24-2002, 06:52 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
I ferget all my experience with p2p, butum... try it?
methinks you should also use this variables, since they are local to the client.
__________________

subliminal message: 1+1=3
Reply With Quote
  #5  
Old 01-24-2002, 06:54 AM
Kadar Kadar is offline
Registered User
Join Date: Jan 2002
Posts: 636
Kadar is on a distinguished road
if (playerenters){
timereverywhere;
}
??
i dont know where to put it
__________________
Reply With Quote
  #6  
Old 01-24-2002, 06:55 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
as long as it is called its fine.
__________________

subliminal message: 1+1=3
Reply With Quote
  #7  
Old 01-24-2002, 07:57 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
if u do
NPC Code:

timeout=3;
if (playerenters||timeout) {
shootball;
}


only the first person (leader) in the level will be shot at. 2nd person wont
if u do
NPC Code:

timereverywhere;
timeout=3;
if (playerenters||timeout) {
shootball;
}


it will run the timeout for each person in lvl ;X
__________________
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
  #8  
Old 01-24-2002, 08:20 AM
Kadar Kadar is offline
Registered User
Join Date: Jan 2002
Posts: 636
Kadar is on a distinguished road
Quote:
Originally posted by LiquidIce00
if u do
NPC Code:

timeout=3;
if (playerenters||timeout) {
shootball;
}


only the first person (leader) in the level will be shot at. 2nd person wont
if u do
NPC Code:

timereverywhere;
timeout=3;
if (playerenters||timeout) {
shootball;
}


it will run the timeout for each person in lvl ;X
Thank you so much.
__________________
Reply With Quote
  #9  
Old 01-24-2002, 09:41 AM
lordhelmut lordhelmut is offline
Registered User
lordhelmut's Avatar
Join Date: Aug 2001
Posts: 710
lordhelmut is on a distinguished road
Send a message via ICQ to lordhelmut Send a message via AIM to lordhelmut Send a message via Yahoo to lordhelmut
i just found out about the command. I was trying to make it in events that when i said Disable weapons were disabled then i say enable and it enables. It wasnt working but then i found that command and was happy =D
Reply With Quote
  #10  
Old 01-25-2002, 07:46 AM
royce royce is offline
Banned
royce's Avatar
Join Date: Sep 2001
Location: Yakitinzen, China
Posts: 2,271
royce is on a distinguished road
Send a message via AIM to royce
Quote:
Originally posted by Kadar


Thank you so much.

Mainly what happens is that the first person that enters the level will be affected by npc's if it uses player manipulation but when timereverywhere is coded it constantly is checking the level for players and events. When it is done without the command the second player or the second consecutive player in the room gets everything loaded from the first player.
Reply With Quote
  #11  
Old 01-25-2002, 07:55 AM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
Quote:
Originally posted by royce



Mainly what happens is that the first person that enters the level will be affected by npc's if it uses player manipulation but when timereverywhere is coded it constantly is checking the level for players and events. When it is done without the command the second player or the second consecutive player in the room gets everything loaded from the first player.
put my name in your sig
Reply With Quote
  #12  
Old 01-25-2002, 08:24 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
Ok. This is what is going on (If I remember correctly what Stefan said).

In a non-p2p server (Non NPC Server), the first person in the level runs all the timeouts in NPCs. So, all timeouts are run on the level-leader's computer. But, when you call the timereverywhere; command, what it does is creates an instance of the NPC on everybody's computer. Now, what this does is kinda like Clientside on NPC Server. Since every player has his own copy of the NPC, any changes to the NPC are only seen on the player's computer. So, basically, if I remember right during my non-NPC Server scripting days:
NPC Code:

if (playerenters) {
timeout=0.05;
}
if (timeout) {
if (this.go==0) {
x+=0.5;
} else {
x-=0.5;
}
if (x<1) this.go=0;
if (x>63) this.go=1;
timeout=0.05;
}


and
NPC Code:

if (playerenters) {
timereverywhere;
timeout=0.05;
}
if (timeout) {
if (this.go==0) {
x+=0.5;
} else {
x-=0.5;
}
if (x<1) this.go=0;
if (x>63) this.go=1;
timeout=0.05;
}


Now, the code makes an NPC move back and forth across the screen. In the first code, the first person in the level (leader) handles the timeout. Every person in the level will see the NPC move. In the second code, each person in the level receives their own copy of the NPC and runs their own timeout. Each person will see only their copy of the NPC, not anybody elses. So, do people understand?


(I am 90% sure I am correct about this. I haven't used free server scripting in a while. If I am wrong, please correct me!)
__________________
-Boco

FLKJH$TRFG*$(&%>FMG >REN<>F ;.kjsd
Reply With Quote
  #13  
Old 01-25-2002, 08:37 AM
royce royce is offline
Banned
royce's Avatar
Join Date: Sep 2001
Location: Yakitinzen, China
Posts: 2,271
royce is on a distinguished road
Send a message via AIM to royce
[QUOTE]Originally posted by BocoC
[B]Ok. This is what is going on (If I remember correctly what Stefan said).

In a non-p2p server (Non NPC Server), the first person in the level runs all the timeouts in NPCs. So, all timeouts are run on the level-leader's computer. But, when you call the timereverywhere; command, what it does is creates an instance of the NPC on everybody's computer. [QUOTE]


I thought that the second player or the player that enters recieves its npc crap from the first person (non-p2p). But the first person is still leader if the second player is in the room and teh second player recieves all 'in-level' attributes. What I mean by 'in-level' like variables and stuff that would only exist in that one level, not player attributes that are saved and stored.

Last edited by royce; 01-25-2002 at 08:49 AM..
Reply With Quote
  #14  
Old 01-26-2002, 03:51 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
Ok...I know I started a post asking almost the same question somewhere
Reply With Quote
  #15  
Old 01-26-2002, 05:15 PM
Echos Echos is offline
Banned
Join Date: Jan 2002
Location: Somewhere in Georgia for l33t schoolings
Posts: 1,286
Echos is on a distinguished road
Send a message via ICQ to Echos Send a message via AIM to Echos Send a message via Yahoo to Echos
Re: timereverywhere

Quote:
Originally posted by Kadar
Could someone tell me what it does.. i dont really get it...
Also kaimetsu if u read this i need to pm u one of my scripts that for some reason does not work when 2 players are in the room..
[Kaimetsu]

What, you think I'm just some universal resource that fixes scripts on demand or something?

[/Kaimetsu]
Reply With Quote
  #16  
Old 01-27-2002, 01:22 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
~AlphaFlame~

Kadar, if Kaimetsu won't help I'd be willing to try.

And Kaimetsu... that comes as part of being one of the best scripters of graal.
__________________


If the post says ~AlphaFlame~, that's who's posting. If not, it's Entravial (owner)
Reply With Quote
  #17  
Old 01-27-2002, 02:00 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
Re: Re: timereverywhere

Quote:
Originally posted by Echos


[Kaimetsu]

What, you think I'm just some universal resource that fixes scripts on demand or something?

[/Kaimetsu]
Heh. That has happened to me too.
__________________
-Boco

FLKJH$TRFG*$(&%>FMG >REN<>F ;.kjsd
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 06:55 PM.


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