Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Clock thing :O (https://forums.graalonline.com/forums/showthread.php?t=48230)

Knuckles 09-25-2003 06:54 AM

Clock thing :O
 
1 Attachment(s)
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.

Kaimetsu 09-25-2003 07:14 AM

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.

TribulationStaff 09-25-2003 07:17 AM

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.

CheeToS2 09-25-2003 01:27 PM

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 :(

Kaimetsu 09-25-2003 01:30 PM

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?

TribulationStaff 09-25-2003 05:48 PM

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.

CheeToS2 09-25-2003 09:46 PM

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).

Kaimetsu 09-26-2003 05:49 AM

So just rescript the display of nicknames.

GoZelda 09-26-2003 10:08 PM

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.

konidias 09-26-2003 10:20 PM

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.

Dach 09-27-2003 08:28 AM

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!

Soul-Blade 09-27-2003 08:43 AM

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.

Kaimetsu 09-27-2003 09:21 AM

Quote:

Originally posted by Soul-Blade
Everything can be rescripted, and I have done it
With a little help along the way :-p

Knuckles 10-02-2003 01:20 AM

Quote:

Originally posted by Soul-Blade
Everything can be rescripted, and I have done it.
Rescript my mom to be cooler please... k thanks.

konidias 10-04-2003 03:50 AM

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. :)

Dach 10-04-2003 06:47 AM

Quote:

Originally posted by 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. :)

Meh, I'm not too fond of the mouse-over names, I don't like having to touch my mouse very often, plus I'm lazy and don't like pointing at someone just to see who they are ;)

wonderboysp2p 10-05-2003 02:00 AM

this is the kinda stuff that makes me wish i payed attention to formulas in math class...

Knuckles 10-05-2003 02:23 AM

Quote:

Originally posted by 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. :)

Frolic used to have this... and you would be able to click on NPC's in order to talk to them, or trade or whatever.

wonderboysp2p 10-05-2003 08:43 PM

Quote:

Originally posted by Knuckles

Frolic used to have this... and you would be able to click on NPC's in order to talk to them, or trade or whatever.

howd we get so far off topic?


All times are GMT +2. The time now is 09:05 PM.

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