Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Code Gallery (https://forums.graalonline.com/forums/forumdisplay.php?f=179)
-   -   Online showpoly() Creator (https://forums.graalonline.com/forums/showthread.php?t=134264388)

Maelstrom002 08-28-2011 06:38 PM

Online showpoly() Creator
 
3 Attachment(s)
Hi everyone,

I got tired of grabbing x&y information off of editor to create some of the
more complex showpolys() I was making, and decided to toy around
and make something that could do it for me.

The script displays a single tile sized poly where your mouse is, and upon left click will place a poly representing the node you've created. As you continue placing nodes the showpoly that it will eventually print out will be displayed as you make it so you can see what the final product will result in.
When placing nodes it will also determine if the form is of an corner and adjust to the proper x&y coords, which is why I used two sets of values & arrays.

Once you right click it will end your ability to place nodes, and print out the array in the F2 Logs.

( The one thing I was unable to fix is that to finish off the poly nicely,
you'll need to place a node on the same spot as your first node, otherwise
it wont correct the corner because not enough nodes have been placed
for it to determine its an inside corner, however depending on the shape of the poly, you may not even run into this issue.

I also suggest starting from the top-left corner of your poly shape. )

Any feedback is appreciated!

Emera 08-28-2011 06:40 PM

rep+++
When I can of course.

fowlplay4 08-28-2011 06:45 PM

It does what it sets out to do but it's specific position. Might be beneficial to generate a showpoly based on your first coordinate (see example), support for pixels might also help too, and a way to set the rotationcenter wouldn't hurt.

PHP Code:

//#CLIENTSIDE
function onCreated() {
  
with (findimg(200)) {
    
30// Changing these would change the location of your polygon
    
30// while maintaining the same shape.
    
polygon = {
      
xy33// and so on...
    
}; 
  }



Maelstrom002 08-28-2011 06:48 PM

Ah yea, I didn't even think of that. I was using it for specific locations to put the showpoly over vs. just generating generic showpolys.

I'll play around with that idea and perhaps update what I've put out!

xAndrewx 08-28-2011 07:16 PM

How often do you use showpoly =o

Emera 08-28-2011 07:47 PM

Quote:

Originally Posted by xAndrewx (Post 1665856)
How often do you use showpoly =o

It bloody helped me that's for sure.

xAndrewx 08-28-2011 08:01 PM

What do you use it for- i've not had to use it yet =[

Maelstrom002 08-28-2011 08:07 PM

I've been using showpoly as roof tiles, vs creating images for each roof.

Cubical 08-28-2011 08:32 PM

http://forums.graalonline.com/forums...tshape2+editor easy way to make images if you're concerned about it taking forever to make a bunch of different images with tiles.

furry_mougle 09-09-2011 12:37 AM

why do people always use the term node in the wrong context

EDIT: nvm, I guess it was used somewhat correctly

Crow 09-09-2011 12:42 AM

Quote:

Originally Posted by furry_mougle (Post 1667504)
why do people always use the term node in the wrong context

They always do?

furry_mougle 09-09-2011 12:45 AM

Quote:

Originally Posted by Crow (Post 1667505)
They always do?

generalization, but it's just a little pet peeve of mine

"1. A point at which lines or pathways intersect or branch; a central or connecting point.
2. A piece of equipment, such as a PC or peripheral, attached to a network."

i can't find the definition that states a node is a packet of information

DustyPorViva 09-09-2011 12:59 AM

Quote:

Originally Posted by furry_mougle (Post 1667507)
i can't find the definition that states a node is a packet of information

The script above vaguely fits the definition you post. It's a point of data in a large connected set... though it's not a tree so it doesn't fit it perfectly. It fits it better than your labeling it as simply a "packet of information."

I'll also go ahead and say I saw your post before you edited in which you posted "What's a node?" Given that you posted the definition from a dictionary and now accusing people of using the term wrongly I'll go ahead and say you're not really in the position to argue it.

furry_mougle 09-09-2011 02:57 AM

Quote:

Originally Posted by DustyPorViva (Post 1667511)
The script above vaguely fits the definition you post. It's a point of data in a large connected set... though it's not a tree so it doesn't fit it perfectly. It fits it better than your labeling it as simply a "packet of information."

I'll also go ahead and say I saw your post before you edited in which you posted "What's a node?" Given that you posted the definition from a dictionary and now accusing people of using the term wrongly I'll go ahead and say you're not really in the position to argue it.

Cool, thanks! you learn something everyday!


All times are GMT +2. The time now is 11:20 AM.

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