Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Kuhwestyon! (https://forums.graalonline.com/forums/showthread.php?t=43992)

Kinatt 04-03-2003 06:27 PM

Kuhwestyon!
 
ok like u know how hp bars n stuff like are in like straight like lines is it possible to have like a circle and it like goes around like until it gets empty like.. um... in Super Mario 64 in a sense.. but more specefic instead of those little buttons.. like O but it gets empty by like going to 1/4 a circle.. and stuff.. like the center point and a line is pointing ou tand like stuff and it can be empty at 0 hp and stuff and at 50% it is a half circle n stuff.. like at 75%hp its like.. . YEA a pie graph it looks like a pie graph! yea.. and stuff. does anyone know what im tlaking about if you need me to draw a picture I will but I was wondering if thats possible..

Kinatt 04-03-2003 06:49 PM

1 Attachment(s)
ok, heres pic

Jeff 04-03-2003 07:56 PM

Yoda Stories HP thing?


You'll be wanting to use some trig.

Onijustin_P2P 04-03-2003 07:57 PM

you only work with 4 Hp ?
mm... what if a player gets more then 4 Hp ?
i rather draw 2 images over eachother
1 thats is an empty image of an HP bar.
and 1 that shows the red HP stuff...
then use changeimgpart.
;)
*sorry for my bad english im dutch XD*

Dude6252000 04-03-2003 08:36 PM

Quote:

Originally posted by Onijustin_P2P
you only work with 4 Hp ?
mm... what if a player gets more then 4 Hp ?

I think he was dealing with percentages. If Kinatt wants to make something with that, he'll have to somehow finagle to get a circle-ish thing, and somehow changeimgpart it out, or, something. Don't listen to me, I'm a terrible scripter ;o

Onijustin_P2P 04-03-2003 08:39 PM

you cant make a circle draw in a diagnol line with changeimgpart,
unless u want extreme lag......

Kinatt 04-03-2003 08:43 PM

no, not 4hp.. percentage. :)

Dude6252000 04-03-2003 08:46 PM

Quote:

Originally posted by Kinatt
no, not 4hp.. percentage. :)
Yeah, that's what i said ;O I think we need to call in Kai. See, normally I know how these things would work, but I can never script them. This one I can't figure out how it works.

Jeff 04-03-2003 09:01 PM

Like I said.


It's a simple issue of trigonometry and showpoly.

osrs 04-03-2003 10:28 PM

Quote:

Originally posted by Jeff
Like I said.


It's a simple issue of trigonometry and showpoly.

You're right,but there are many ways to make that too.

Jeff 04-03-2003 11:18 PM

Quote:

Originally posted by osrs


You're right,but there are many ways to make that too.


What, clumsy and inaccurate PNGs?

Dach 04-04-2003 02:07 AM

Quote:

Originally posted by Jeff
Like I said.


It's a simple issue of trigonometry and showpoly.

Yeah, but the simplicity of the script depends heavily on how detailed you want it to be. You could have a simple line circle with 100 segments, or you could have a bunch of polygons in a circle with differentiating colors depicting life levels.

Goboom 04-04-2003 06:59 PM

Quote:

Originally posted by Kaimetsu
You'll never be able to do it perfectly. Perhaps the best way would be to use a series of vertical strips (or horizontal, depending on the initial orientation) and then change their height to suit the required angle. Some trigonometry would be involved, but it would produce a perfect representation. Or, yes, you could use showpoly. However, that wouldn't be simple. Can we pass arrays to showpoly?
I was trying that (passing arrays) and I couldnt get it to work right, it kind of did but didn't.

HoudiniMan 04-04-2003 07:56 PM

1 Attachment(s)
Clever idea kai, but it didn't seem like anybody quite understood so i drew a little picture of what i intrepreted it as. It'd be done with greater detail of course but i wanted to show the lines.

Dach 04-04-2003 09:21 PM

The easiest thing to do would be to make a sprite sheet of all the percentages that you would use, then change the index of the sprite according to the players' hearts. You could put alot of detail into the image displayed then, but it would end up being a pretty big file...

adam 04-05-2003 09:08 AM

1 Attachment(s)
I believe the easiest way would be to use arrays and showpoly. *becouse i've already done that with arrays and showpoly.

It doesn't take long if you understand showpoly and some trig.

LilNiglet 04-05-2003 06:44 PM

Quote:

Originally posted by adam
I believe the easiest way would be to use arrays and showpoly. *becouse i've already done that with arrays and showpoly.

It doesn't take long if you understand showpoly and some trig.

that equals instant lag on older computers.

adam 04-05-2003 08:26 PM

Quote:

Originally posted by LilNiglet

that equals instant lag on older computers.

It won't lag.

Reasons:

#1 The number of poly's is user adjustable, or will be.
#2 It only draws when there's a change.
#3 It only calculates the positions once.

Falados 04-07-2003 12:49 AM

Quote:

Originally posted by adam

It won't lag.

Reasons:

#1 The number of poly's is user adjustable, or will be.
at the cost of quality
#2 It only draws when there's a change.
dont matter, graal still has to draw them more than once
#3 It only calculates the positions once.
I fail to see how this would create lag? Unless ofcourse you mean each and every segment.

Ethic_Sern 04-07-2003 01:30 AM

Just use the 100% and the 0% and use changeimgvis =p ... jezzz common sence

adam 04-07-2003 05:03 AM

Quote:

Originally posted by Ethic_Sern
Just use the 100% and the 0% and use changeimgvis =p ... jezzz common sence
What are you talking about?

adam 04-07-2003 05:08 AM

Quote:

Originally posted by Falados
I fail to see how this would create lag? Unless ofcourse you mean each and every segment.

I mean it calculates the positions of every corner of every triangle. Since that part only needs to be done once until you change the detail. So the drawing is just from stored variables. Yes at a loss of quality, but i'ts not our fault people can't handle 30 triangles to get a *decent circle.

Yeah, I guess your right about the graal having to keep drawing them part. :( Doesn't really matter how many times the script draws them. Graal draws them constantly anyway.

Kinatt 04-07-2003 06:13 AM

well my kuwestyon was answered. So I happy now :)

adam 04-07-2003 06:28 PM

Quote:

Originally posted by Kinatt
well my kuwestyon was answered. So I happy now :)
lol, I had no idea you intended that to mean "Question".

GoZelda 04-11-2003 05:44 PM

Quote:

Originally posted by Onijustin_P2P
you only work with 4 Hp ?
mm... what if a player gets more then 4 Hp ?
i rather draw 2 images over eachother
1 thats is an empty image of an HP bar.
and 1 that shows the red HP stuff...
then use changeimgpart.
;)
*sorry for my bad english im dutch XD*

I'm dutch too!
or is it to?


All times are GMT +2. The time now is 08:28 AM.

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