I have some stuff I'd like help with
#1
Posted 18 July 2010 - 09:52 PM
First question: I recently upgraded to the absolute newest build for windows. In the list of added features I noticed a SetSideWarp and a SetTileWarp. Sounds to me like that means I can control warps with scripting. Am I right and how do they work? (I checked zscript.txt but couldn't find them)
Next set of questions: While skimming zscript.txt for my previous question, I noticed DrawCircle, which loosed a stream of ideas. If I were to make a ffc script that drew a black rectangle over the entire screen, then made a transparent circle on the same layer around link, would that work like the dark rooms in LttP?
For the level one candle, you can only use the candle once per screen. I want to change it's graphic when you use it. Can I detect if it's been used on a screen and change it's graphic with script?
Obviously I'm working on the dark section of my quest, lol.
#2
Posted 18 July 2010 - 11:18 PM
#3
Posted 18 July 2010 - 11:41 PM
Edited by Eragon615, 18 July 2010 - 11:41 PM.
#4
Posted 19 July 2010 - 05:03 AM
Next set of questions: While skimming zscript.txt for my previous question, I noticed DrawCircle, which loosed a stream of ideas. If I were to make a ffc script that drew a black rectangle over the entire screen, then made a transparent circle on the same layer around link, would that work like the dark rooms in LttP?
No.
I know it should be easy to do but it isn't. Here's how I would do it:
Step 1; Draw(*rip*) an inverted circle in the tile pages.
Step 2; Draw it centered on Link using Screen->DrawTile();
Step 3; Draw 4 black rectangles around the edges using Screen->Rect();
#5
Posted 19 July 2010 - 09:01 AM
#6
Posted 20 July 2010 - 08:24 PM
#7
Posted 21 July 2010 - 12:28 AM
#8
Posted 21 July 2010 - 12:56 AM
#9
Posted 21 July 2010 - 01:01 AM
Here it is: http://www.purezc.co...showtopic=44846
PS: I never said I didn't like it, I just said I would have used triangles instead.
Edited by Gleeok, 21 July 2010 - 01:02 AM.
#10
Posted 21 July 2010 - 01:33 PM
DrawRectangle - DrawCircle.
Haha. Okay, only my candle graphic question. I actually wanna re-script my two candles anyway. I'll leave more details when I get to my computer and off my phone.
#11
Posted 21 July 2010 - 01:46 PM
#12
Posted 21 July 2010 - 02:06 PM
#13
Posted 21 July 2010 - 02:08 PM
Gleeok'd tell you better than myself, but I think those sort of things are done better on a more situation-specific level and using triangles rather than scanlines, which I don't know how to do.
#14
Posted 21 July 2010 - 02:50 PM
What I meant was if I used DrawRectangle to make a rectangle around Link then subtracted a DrawCircle on top of him I'd get a black rectangle with a hole in it. Or a large circle with a smaller circle subtracted to make a cresent moon shape. But anyway, it's irrelevant.
Now, about those examples of what I'm trying to do, here's some example situations.:
1) Link walks into a dark room and only has a small circle that he bearly fits inside of for visibility.
2)Same room but Link has the candle in his possession. The circle of visibility is much larger. Same for the lantern (candle 2).
3) Link uses the candle. I want to change from a fireball moving forward lowly to a quick flash of flame. I can manage that on my own. During the half second or so the screen is illuminated. After use, the candle's GFX is changed to a candle that is unlit, until he changes screens where the candle is re-lit. If special FFCs are burned, they light up and illuminate the screen. If the candle has been used and is unlit, the circle of light should return to the smaller size.
4) The lantern should behave like the red candle. Same custom fire behaivor of a quick flash instead of a huge fireball, but reusable and stays lit.
I think I know how to work most of this, but if anyone would like to help, I'm still very slow at scripting, and my grammar is terrible. Plus many of you probably know shortcuts to help. Please offer those as well. Please and thank you.
#15
Posted 21 July 2010 - 03:17 PM
{
Screen->Rectangle(l,bx1,by1,bx2,cy-r,c,1,0,0,0,true,o);
Screen->Rectangle(l,bx1,cy+r,bx2,by2,c,1,0,0,0,true,o);
int usedy = y-r;
for(int i=-90;i>-270;i-=0.5)
{
int cy = y+r*Sin(i);
if(usedy == Floor(cy)) continue;
Screen->Line(l,0,cy,x+r*Cos(i),cy,c,1,0,0,0,o);
Screen->Line(l,256,cy,x+r*Cos(i+180),cy,c,1,0,0,0,o);
usedy = Floor(cy);
}
}
I didn't put bounds checking for if you put the circle not inside the rectangle or strange things like that, so don't do those things because they just won't work at all.
The best way to make a moon would be to draw one on the tilesheet, then use the scaling parameters of drawtile to blow it up to the right size.
The first two would just be inverted circle with the radius different each time, that'd be really easy.
OK well all of those things are possible (and not too hard).
Yeah, you want to make it a completely custom item and ditch ZC's candle interface, it's a bit crappy anyway.
You're after something like the flame lantern from TMC right?
If you post up how you're planning on making it work I can help you along.
The only thing I would say is that when Link scrolls between screens, whatever you do (currently) everything is going to look crap. Try drawing an inverted circle over Link with a radius of about 32px with global slot two and then swapping screens; it looks horrendous.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users