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-25-2003, 06:54 AM
Knuckles Knuckles is offline
Registered User
Join Date: Sep 2002
Location: New York
Posts: 580
Knuckles is on a distinguished road
Send a message via AIM to Knuckles
Clock thing :O

woo woo, I was bored in school :-/.
NPC Code:

// NPC made by Knuckles
//#CLIENTSIDE
if (created || timeout) {
if(this.clock == 0) {
for(i=0; i<=12; i++) {
showtext 3+i,sin(pi-(pi*2)/12*i)*8+30,cos(pi-(pi*2)/12*i)*8+29.4,verdana,b,.;
changeimgzoom 3+i,.6;
}
this.clock = 1;
}
setfocus 30,30;
showpoly 1,{30,30,sin(pi-(pi*2)/60*this.sec)*7+30,cos(pi-(pi*2)/60*this.sec)*7+30}; // Second hand
changeimgcolors 1,.5,0,0,.9;
showpoly 2,{30,30,sin(pi-(pi*2)/60*this.min)*5+30,cos(pi-(pi*2)/60*this.min)*5+30}; // Minute hand
changeimgcolors 2,0,.9,0,.9;
showpoly 3,{30,30,sin(pi-(pi*2)/12*this.hour)*3+30,cos(pi-(pi*2)/12*this.hour)*3+30}; // Hour hand
changeimgcolors 3,0,0,.5,.9;

this.sec = (this.sec+1)%60;
if(this.sec == 59) this.min = (this.min+1)%60;
if(this.min == 59) this.hour = (this.hour+1)%12;
timeout = 0.05;
}



Just change the timeout to one, to make it in actual seconds.
Attached Thumbnails
Click image for larger version

Name:	clock.png
Views:	194
Size:	7.5 KB
ID:	25667  
__________________
Knuckles
"They say 60% of the time, it works everytime!"
Reply With Quote
  #2  
Old 09-25-2003, 07:14 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Would be nicer if there were fewer trigonometry calls, but I guess rotation matrices are a little demanding for most people.

I've always liked working clocks in games. It's attention to detail, y'know? I like windows that can be opened, I like lamps that can be operated, I like barrels in which the player can hide. It all adds to the immersive nature of the world, and promotes emergent gameplay.
__________________
Reply With Quote
  #3  
Old 09-25-2003, 07:17 AM
TribulationStaff TribulationStaff is offline
Registered User
Join Date: Jul 2003
Location: Pennsylvania
Posts: 368
TribulationStaff is on a distinguished road
Send a message via AIM to TribulationStaff
Don't even get me started on matricies. If I never have to find the special fundemental matrix of 3x3 first order linear differential system with repeated roots again, it will be too soon.
__________________


Help me keep scripting
Reply With Quote
  #4  
Old 09-25-2003, 01:27 PM
CheeToS2 CheeToS2 is offline
That Guy
CheeToS2's Avatar
Join Date: Dec 2001
Location: Seattle, WA
Posts: 2,528
CheeToS2 will become famous soon enough
Send a message via AIM to CheeToS2
Quote:
Originally posted by Kaimetsu
I like barrels in which the player can hide.
another good reason to be able to hide a player's nickname
__________________

Reply With Quote
  #5  
Old 09-25-2003, 01:30 PM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally posted by CheeToS2
another good reason to be able to hide a player's nickname
Agreed, but can't we do that with enablefeatures already?
__________________
Reply With Quote
  #6  
Old 09-25-2003, 05:48 PM
TribulationStaff TribulationStaff is offline
Registered User
Join Date: Jul 2003
Location: Pennsylvania
Posts: 368
TribulationStaff is on a distinguished road
Send a message via AIM to TribulationStaff
But the problem with that is that its on for all the players you see or off for all the players you see that way. Enablefeatures won't let you hide just Joe's nick and show the nicks of Sara, Bill, and Daryl.
__________________


Help me keep scripting
Reply With Quote
  #7  
Old 09-25-2003, 09:46 PM
CheeToS2 CheeToS2 is offline
That Guy
CheeToS2's Avatar
Join Date: Dec 2001
Location: Seattle, WA
Posts: 2,528
CheeToS2 will become famous soon enough
Send a message via AIM to CheeToS2
Quote:
Originally posted by Kaimetsu


Agreed, but can't we do that with enablefeatures already?
That hides ALL players nicknames from the player it is executed on, I am talking about a command used on one player's account to hide ONLY his/her nickname from other players (nobody mention the tab character that does it, it is a ridiculous method to use in a script).
__________________

Reply With Quote
  #8  
Old 09-26-2003, 05:49 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
So just rescript the display of nicknames.
__________________
Reply With Quote
  #9  
Old 09-26-2003, 10:08 PM
GoZelda GoZelda is offline
Mister 1,000,000
GoZelda's Avatar
Join Date: Jan 2003
Location: Brussels, capital of Europe.
Posts: 5,396
GoZelda will become famous soon enough
Send a message via AIM to GoZelda Send a message via MSN to GoZelda
Quote:
Originally posted by Kaimetsu
Would be nicer if there were fewer trigonometry calls, but I guess rotation matrices are a little demanding for most people.

I've always liked working clocks in games. It's attention to detail, y'know? I like windows that can be opened, I like lamps that can be operated, I like barrels in which the player can hide. It all adds to the immersive nature of the world, and promotes emergent gameplay.
Or high grass you can hide in. Yeah, if you have that sorta stuff games are just more fun. It's fun to discover those, for example.
__________________

Quote:
Originally Posted by Lance
stefan is satan
I am the best.
[URL removed]Music or aural pollution?
Reply With Quote
  #10  
Old 09-26-2003, 10:20 PM
konidias konidias is offline
Old Bee
konidias's Avatar
Join Date: Jul 2001
Location: Orlando, FL
Posts: 7,222
konidias will become famous soon enough
Send a message via AIM to konidias
Quote:
Originally posted by Kaimetsu
Would be nicer if there were fewer trigonometry calls, but I guess rotation matrices are a little demanding for most people.

I've always liked working clocks in games. It's attention to detail, y'know? I like windows that can be opened, I like lamps that can be operated, I like barrels in which the player can hide. It all adds to the immersive nature of the world, and promotes emergent gameplay.
All of that is in Oasis... most of it is working already. The wall clock ticks and the hands move according to the time. Windows can be open, even the curtains can be opened and closed.
__________________

Put this image in your sig if you support Bomy Island! (g2k1 revision)
play bomberman while you wait!


Reply With Quote
  #11  
Old 09-27-2003, 08:28 AM
Dach Dach is offline
call me Chad, it's cooler
Dach's Avatar
Join Date: Aug 2002
Posts: 1,899
Dach is on a distinguished road
Quote:
Originally posted by konidias


All of that is in Oasis... most of it is working already. The wall clock ticks and the hands move according to the time. Windows can be open, even the curtains can be opened and closed.
teasers make the Chad go crazy!
__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
Reply With Quote
  #12  
Old 09-27-2003, 08:43 AM
Soul-Blade Soul-Blade is offline
US Marine
Soul-Blade's Avatar
Join Date: Jul 2001
Location: Coeur d'Alene, ID
Posts: 945
Soul-Blade is an unknown quantity at this point
Send a message via AIM to Soul-Blade
Everything can be rescripted, and I have done it. A custom clientside chat system can be easily scripted with a client-defined chat filter, among other features unique to each client.

A nick system would use the same theory and would be rather simple to create. Don't see why people can't just do that.
Reply With Quote
  #13  
Old 09-27-2003, 09:21 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally posted by Soul-Blade
Everything can be rescripted, and I have done it
With a little help along the way :-p
__________________
Reply With Quote
  #14  
Old 10-02-2003, 01:20 AM
Knuckles Knuckles is offline
Registered User
Join Date: Sep 2002
Location: New York
Posts: 580
Knuckles is on a distinguished road
Send a message via AIM to Knuckles
Quote:
Originally posted by Soul-Blade
Everything can be rescripted, and I have done it.
Rescript my mom to be cooler please... k thanks.
__________________
Knuckles
"They say 60% of the time, it works everytime!"
Reply With Quote
  #15  
Old 10-04-2003, 03:50 AM
konidias konidias is offline
Old Bee
konidias's Avatar
Join Date: Jul 2001
Location: Orlando, FL
Posts: 7,222
konidias will become famous soon enough
Send a message via AIM to konidias
Oasis uses mouseover tooltips to show the name of something. So you can just put your mouse over a player and it displays their name in a tooltip. That's one way of doing it. It's simple to do "hidden" names, you just disable a flag on the player that checks whether that object/person has a name.

So if the person is hiding in a barrel, and you mouseover it, you see nothing.
__________________

Put this image in your sig if you support Bomy Island! (g2k1 revision)
play bomberman while you wait!


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 04:43 PM.


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