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 07-01-2008, 11:45 PM
Frankie Frankie is offline
xChugxLifex
Frankie's Avatar
Join Date: Feb 2008
Location: New York
Posts: 1,610
Frankie is a jewel in the roughFrankie is a jewel in the rough
Send a message via AIM to Frankie Send a message via MSN to Frankie
no idea how to do this

I've seen a lot of maze events where your screen is black, but you have the little circle around your character in which you can see. I want to get this effect, but have no idea how.

This is probably considered asking for scripts, but meh, I don't have a clue.
__________________
*Sum41Freeeeek
*Frankie
Reply With Quote
  #2  
Old 07-02-2008, 12:11 AM
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
Well, you could make a huge ass image :]

Just remember to compress it tho
__________________
Reply With Quote
  #3  
Old 07-02-2008, 12:21 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
You script polygons. It's actually fairly simple
You script a polygon circle around the player, then 'inverse' it by scripting in a polygon(in the same array!) rectangle the size of the screen.
Reply With Quote
  #4  
Old 07-02-2008, 12:42 AM
Frankie Frankie is offline
xChugxLifex
Frankie's Avatar
Join Date: Feb 2008
Location: New York
Posts: 1,610
Frankie is a jewel in the roughFrankie is a jewel in the rough
Send a message via AIM to Frankie Send a message via MSN to Frankie
I've never really touched the showpoly function (assuming that's what is to be used here?) except for 1 time and I couldn't figure out how to do it z.z
__________________
*Sum41Freeeeek
*Frankie
Reply With Quote
  #5  
Old 07-02-2008, 01:27 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
PHP Code:
showpoly(index, {x1y1x2y2x3y3x4y4etc}); 
I guess I should probably explain that a bit better.

PHP Code:
showpoly(index, {startxstartywidthxwidthyheightxheightystartxstarty}); 
In theory, that would create a perfect rectangle.

So, lets say we want to draw a poly across the upper half of the screen:
PHP Code:
showpoly(200, {00screenwidth0screenwidthscreenheight 320screenheight 32}); 
The first two: 0, 0 are declaring the poly should start at 0, 0 of the screen
Second two: screenwidth, 0 are saying that the next point of the poly should be at the edge of the players horizontal screen, and 0 (at the top of the screen). At this point we have a white line that goes across the very top of the entire screen.
Third two: screenwidth, screenheight / 2 - 32 are declaring that the next drawing point should be at the right edge of the screen at the bottom right of half of the screen. Now we have a triangle, so we'll add
Fourth two: 0, screenheight / 2 - 32 which tells the next line to draw to the far left of the screen, and half way down.

It doesn't require a fifth one because it automatically closes it back up by connecting the last one to the starting point.

There's also a showpoly2() which has a format like this:

PHP Code:
showpoly2(index, {x1y1z1x2y2z2x3y3z3x4y4z4etc}); 
If you want an actual circle around the screen it would probably be easier for you to just use an image and stretch it across the screen.

For example, you could use the image below and possibly do something like:
PHP Code:
with (findimg(200)) {
  
image "example.gif";
  
x0;
  
stretchx screenwidth;
  
stretchy screenheight 32;

Attached Images
 
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #6  
Old 07-02-2008, 01:38 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
The problem with an image is that customizing is pretty much thrown out the window. Not to mention stretching it would mean varying degrees of visibility, depending on how large the screen is.
Reply With Quote
  #7  
Old 07-02-2008, 01:44 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
Quote:
Originally Posted by DustyPorViva View Post
mean varying degrees of visibility
Oh good point, didn't even think of that. Well if it's absolutely necessary to do a circle you could do what Dusty suggested, it's just a bit complicated.
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #8  
Old 07-02-2008, 01:55 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Well I suppose it is possible to do with an image, by resizing it... but in the end he'd still have to script polygons around the image. I think that's more complicated than scripting a circle.
Reply With Quote
  #9  
Old 07-02-2008, 02:04 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
Quote:
Originally Posted by DustyPorViva View Post
Well I suppose it is possible to do with an image, by resizing it... but in the end he'd still have to script polygons around the image. I think that's more complicated than scripting a circle.
Probably, yeah.
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #10  
Old 07-02-2008, 05:12 PM
Galdor Galdor is offline
░▒▓██▓▒░
Galdor's Avatar
Join Date: Feb 2004
Posts: 2,434
Galdor has a reputation beyond reputeGaldor has a reputation beyond reputeGaldor has a reputation beyond reputeGaldor has a reputation beyond reputeGaldor has a reputation beyond reputeGaldor has a reputation beyond reputeGaldor has a reputation beyond reputeGaldor has a reputation beyond reputeGaldor has a reputation beyond repute
you add a lot of black light effects (not just randomly places out tho) that fades away the closer you get.
__________________
Links
Draenin's Villains
Draenin's Quests

My Albums
Quote:
Originally Posted by Unixmad
This forums is going worst each day.
Reply With Quote
  #11  
Old 07-02-2008, 11:22 PM
projectigi projectigi is offline
Registered User
Join Date: Jan 2004
Posts: 403
projectigi is an unknown quantity at this point
uh cant you just seteffect() the screen and show a layer 3 "light"? O_o
__________________
Reply With Quote
  #12  
Old 07-02-2008, 11:24 PM
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
Quote:
Originally Posted by projectigi View Post
uh cant you just seteffect() the screen and show a layer 3 "light"? O_o
That doesn't really give the same effect.
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #13  
Old 07-02-2008, 11:32 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Ya, when you do something like that, the light doesn't 'erase' the black. So if you have pure black, you won't actually see anything but a light.
Reply With Quote
  #14  
Old 07-04-2008, 12:37 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
I just opened light4.png or w/e in paint and inverted it. Then I took that inverted image, stuck it in the middle of the screen and drew a black polygon around it.

Also, make the polygon depend on the image's size in case the image hasn't loaded or for whatever reason. (Use getimgwidth(), etc)
__________________
Do it with a DON!
Reply With Quote
  #15  
Old 07-04-2008, 04:48 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
One thing to be careful about: If the player goes into capture mode (ALT + 6 or whatever) this disappears with the right options selected.
__________________
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 10:01 AM.


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