Ignoring blocking tiles?
1 Attachment(s)
PHP Code:
http://forums.graalonline.com/forums...1&d=1502032978 My best method would be to draw the castle tiles on another layer, put non-blocking tiles underneath, and then use setshape to block the player when the water is drained. I'm just wondering if there is a better way. |
Quote:
|
Quote:
|
I can think of a few approaches you could use to accomplish it, but no matter what you'd have to be creative and create a hack of a solution. From having 2 sets of the wall tiles, the second on swimmable tile indices on the tileset, to making the walls npcs. There is no way to do legit layers on graal without some sort of scripted solution or visual trickery. But I could pull it off while maintaining the illusion of layers yeah. Sometimes when something seems impossible with the scripting engine, you have to remember there are also scripted ganis you can do a lot with.
It would be possible to use a special tileset where the underwater wall tiles would be swimmable tiles, and then have a script triggered by a level variable to update the board every time it switches. The problem with that however is that there are not many swimmable tiles on the tileset. Perhaps you can use setshape2 to make it detect as water tiles. There are easier ways to do it like warp the player to a different level, or just make the underwater wall tiles drawunderplayer images, or to not even show the walls underwater. As far as changing it so that you can walk over blocking tiles, setshape2 does that. You can save the array for setshape2 into a variable and reload it using something like setshape2(x,y,this.array), making it so you could save 2 arrays, one for before the change and one for after. |
Maybe attachPlayerToObj()? Could attach the player then change their gani to swim. I'm not sure if you can change the size of the npc while the player is attached though.
|
Quote:
Also... I'm using showpoly to create the effect, but I don't know how to manipulate showpoly into making it look like the water is rising or falling other than inputting the coordinates manually and that is not feasible at all. What I think needs to happen is that I stick to simple 4 sided shapes and assign each set of points to an array, find where I want to move to, subtract to find the distance, then somehow move the coordinates to my final location. But that last step is over my head. In all honesty I am having trouble just getting off the ground with this and would appreciate some help. |
I created the desired fill effect, but I hit another snag. I want to break the loop when 'this.current' is equal to 'this.final', but with how the math is done 'this.current' is always going to be off by a few fractions of a decimal. How can I get around this without messing with how fluid the animation is?
PHP Code:
|
I have a hacked solution for now where the script runs on a timer for the amount of time it takes to fill the area, but I hope someone can post a more elegant solution. The goal is that the user only has to change coordinates for the target area.
Now I need to move onto trying to get attachplayertoobj to work. [EDIT] I ran into a bug / problem. Depending on the size of the window the showpoly disappears when the player moves around. Any way to fix this? |
All times are GMT +2. The time now is 07:33 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.