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-22-2008, 12:36 AM
Rapidwolve24 Rapidwolve24 is offline
North*
Join Date: Oct 2007
Location: Massachusetts
Posts: 178
Rapidwolve24 is on a distinguished road
Send a message via AIM to Rapidwolve24 Send a message via MSN to Rapidwolve24
Heart Moniter

I want to script a dynamic EKG (with showpoly) to show the status of a players help, but the thing is I don't know how to begin, is there some sort of algorithim I have to follow?

http://forums.graalonline.com/forums...ad.php?t=77980
^ If you don't know what an EKG is
Reply With Quote
  #2  
Old 01-22-2008, 03:16 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Well if you just made it spike randomly (controlled random- every 2 or 3 seconds, etc) and the same for the amount of spike, you could make an array of points to plot. Doesn't seem to hard, but of course it probably would be.
__________________
Reply With Quote
  #3  
Old 01-22-2008, 04:12 AM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
On the server I used to own someone who worked for me scripted just what you're talking about.
Unfortunately I have no idea how to do that.
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #4  
Old 01-22-2008, 08:45 AM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Lol, that animation in the other post reminded me of a flash EKG machine I made.
http://www.olwest.net/Tig/md5live.html

I imagine you could just define some points in an array if you need to and then use a for loop to display the polygons from point to point as defined by the array; cbkbud is on the right track. You could probably just as easily figure out an algorithm for it, but right now I just don't feel like figuring it out, sorry.
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #5  
Old 01-22-2008, 05:48 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
basicly you could do something like:

PHP Code:
function onCreated() {
  
this.dsize 10;
  
this.data 0;
  
this.mode 1;
}
public function 
onAddData(temp.data) {
  if (
this.mode == 1) {
    
this.data.insert(0temp.data);
    if (
this.data.size() == this.dsize+1){
      
this.data.delete(this.dsize-1);
    }
  }else if (
this.mode == 2) {
    
this.data.add(temp.data);
    if (
this.data.size() == this.dsize+1) {
      
this.data.delete(0);
    }
  }
}
public function 
onGetData()
  return 
this.data;
public function 
onGetDataAtIndex(index)
  return 
this.data[index]; 
So, use onAddData() to feed the array, depending on the mode the way it's read (mode 1 = read from left to right (index 0 and up), mode 2 = read right to left (last index to index 0))

Could be made easier tho, but, an EKG with player's health.. Doesn't sound.. 'logical' with graal as combo
__________________
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 04:22 AM.


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