Okay I've run what you gave me and it works, though it looks a bit odd when you're flooding in long skinny sections. Also how would you handle two intersecting flows of water? I am demoing in an L shaped room and want to flood both sections. Here is a demo of what I am talking about.
https://www.youtube.com/watch?v=cj6dqNfGnMw
I'm assuming it was luck that they came together at the same time.
Could this be done with one source of water instead of adding multiple?
71
on: August 15, 2017, 10:01:42 PM
|
||
Started by maximus_asinus - Last post by maximus_asinus | ||
72
on: August 15, 2017, 06:12:23 PM
|
||
Started by maximus_asinus - Last post by Thor | ||
After testing your script visually it only works for square shapes. How would I go about doing other shapes? Like a rectangle? Maybe I am not understanding this script, but it seems very limited. All this code does is handle the drawing of the polygon based on the water-filled area compared with the total flood-able area, but it can and does work for rectangular areas too, rectangles just require specific math to increment the filled area as the filled width and height would not increment evenly. When raising the water I increment the areas like so: Code: [Select] temp.w = this.waterWidth - (this.boundaryWidth * 2); (Boundary width would be the walled area on the outermost tiles of a fill area, where I have the water raise more slowly) |
73
on: August 15, 2017, 05:01:11 PM
|
||
Started by maximus_asinus - Last post by maximus_asinus | ||
After testing your script visually it only works for square shapes. How would I go about doing other shapes? Like a rectangle? Maybe I am not understanding this script, but it seems very limited.
|
74
on: August 13, 2017, 08:10:57 PM
|
||
Started by maximus_asinus - Last post by maximus_asinus | ||
Also thanks for replying. I have no scripting experience outside GS1, and it is very frustrating coming against hurdles when there is nobody else willing to help out. It isn't likely I will solve this on my own.
|
75
on: August 13, 2017, 07:36:06 PM
|
||
Started by maximus_asinus - Last post by maximus_asinus | ||
I should have been clear that what I posted was the formula I based the water movement on. This is my original script.
Code: [Select] //#CLIENTSIDE |
76
on: August 13, 2017, 04:57:54 AM
|
||
Started by maximus_asinus - Last post by Thor | ||
I'm not sure what it is you're trying to accomplish here, as surely the water should rise irrespective of the player's position, unless this is inside a gani script?
What I do is store a tile width and height of the fill area, as well as a filled width and height, and calculate the showpoly x/y/position like so: Code: [Select] function updatePoly() { |
77
on: August 10, 2017, 02:59:48 PM
|
||
Started by maximus_asinus - Last post by maximus_asinus | ||
Maybe you can help me. I am not sure how you moved the showpoly, but I am using the following (tweaked a bit, this is an example).
Code: [Select] toPlayerX = playerx - x; This has the showpoly moving in a very fluid manner. The problem is it never reaches the exact target coordinates (always off by a few hundredths of a decimal point). This causes some very weird visual glitches where the showpoly will 'bounce' between two coordinates. If I could control the increments (to 0.05 for example) that it moved that would solve my problem, but I don't really understand the math enough to do this. Can you help me out? |
78
on: August 09, 2017, 01:21:48 PM
|
||
Started by maximus_asinus - Last post by Thor | ||
A combination of showpoly and setshape2.
|
79
on: August 08, 2017, 10:33:08 AM
|
||
Started by maximus_asinus - Last post by maximus_asinus | ||
I'm trying to replicate the rising water from Link to the Past. How did you accomplish this Thor? Was it a combination of showpoly and changing the zoom (is that even possible?). Or did you create an image and stretch it?
|
80
on: August 04, 2017, 05:02:10 PM
|
||
Started by maximus_asinus - Last post by maximus_asinus | ||
Late reply but someone sent me the editor, plus I got access to a Dev server to practice GS2.
|