Seems awkward to post about this here unless it's specific to Classic.
I posted a reply at http://forums.graalonline.com/forums/showthread.php?p=1741824#post1741824
- March 29, 2024, 08:28:52 AM
- Welcome, Guest
News:
some big news are coming camed.
61
on: August 18, 2017, 01:30:31 PM
|
||
Started by maximus_asinus - Last post by Thor | ||
62
on: August 17, 2017, 10:36:43 PM
|
||
Started by maximus_asinus - Last post by maximus_asinus | ||
Quick update:
I went back and tried public function again after reading a post by fp4 and got something that ALMOST works. CLASS A Code: [Select] //#CLIENTSIDE CLASS B Code: [Select] //#CLIENTSIDE The problem is only the last NPC to join Class B will receive the update. If I could get around that I would be all set. |
63
on: August 17, 2017, 06:28:46 PM
|
||
Started by maximus_asinus - Last post by maximus_asinus | ||
Maybe you can answer me. This my post from the other forums:
Quote is it possible for two classes to communicate? I can do a hack solution like a check in a looping timeout but I feel like this can be done with a trigger, and I don't want to use triggeraction if I have 20 different blocks. Want to make something that will allow me to just drag-and-drop these for the most part. |
64
on: August 15, 2017, 11:20:16 PM
|
||
Started by maximus_asinus - Last post by maximus_asinus | ||
Also can you explain how attachplayertoobj works online?
Offline if I use attachplayertoobj it acts as if the player is on a layer above the tileset and ignores blocking tiles. In combination with setshape2 I can make blocking tiles swimmable. Code: [Select] if (created) { With the same script (updated to GS2 obviously) the tiles are still swimmable but it doesn't put me on that separate layer. Code: [Select] //#CLIENTSIDE And again, thanks for your patience. I am learning a lot from what you've shown me so far. I appreciate the help. |
65
on: August 15, 2017, 10:01:42 PM
|
||
Started by maximus_asinus - Last post by maximus_asinus | ||
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? |
66
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) |
67
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.
|
68
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.
|
69
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 |
70
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() { |