![]() |
Triggeractions and x and y axis.
I've come across a small and tedious difficulty, and now I know why some of my projects had to be redone.
Problems: 1. Need better tutorials for triggeraction, I keep setting shape to clientside because I kept believing it needed a shape to react from, not to. (Not really a problem, only a difficulty in remembering and understanding) 2. I was told setshape was a replacement for showcharacter or vise versa except one was the default npc character look. Solution: Make show character work? 3. If an X or Y is set at an offset by less than .5 it breaks the trigger. Ex. 32.4 wouldn't work. 32.5 would work, 32.6 wouldn't work. Solution, fix it to make work ...? 4. If any X and Y placement is done clientside, it renders serverside void... Solution ...not sure. But it seems like anything my clientside has done via X and Y, it would have to trigger the final points serverside which seems stupid. |
Graal sends positional data as a byte for triggeractions. One byte is a value between 0-255.
Graal packs the positional data into a single byte per axis, so you have limited accuracy. 20.4 is rounded down to 20, and 20.6 is rounded up to 21. Both of those are outside of the non-inclusive 32x32 range that Graal seems to be testing against. |
So there is no way to fix this besides making them position in tiles?
|
I don't exactly understand what the problem is.
showcharacter() makes the npc have a blocking behaviour like the a player, which means a rectangle of (0.5,1,2,2) (starts at x+0.5, y+1 and is 2x2 tiles wide) triggeraction() is rounding the x and y values down to the next multiply of 0.5, which means 0.6 will become 0.5, 1.4 will become 1. |
Quote:
|
Quote:
PHP Code:
My fix was just to bring it back to .5 lol.. Unless someone else wants to try ^, I will try it in a week or so. (I'm not sure if I set both to it either) Thank you for the reply, I'll see if it works and test when I can. Quote:
If it works, which from the post I'm unsure, than that is great. I only tried it once, but maybe not correctly. This type of fix is not important... at all.. but could be useful if you want to showcharacter instead of setshape. (Yes, I understand there is no real difference, but I thought it was awkward setting shape of a character). Basically the problem was: this.x = 32.3; this.y = 32.3; under serverside or (clientside which didn't matter for triggers), it would not work due to it not being of multiples of .5; But like Hezzy mentioned, I've never tried the exact location by editing as text. I'll try that next. Showcharacter I just thought could be added to work like setshape for triggeraction, which isn't a problem. Thank you as well. The video I had already set up the triggeraction to work, I was only showing what did not work... clientside, serverside less than or greater than .5. I've never seen it mentioned in tutorials. |
When I read your posts I get the feeling you have no idea what you're talking about.
|
Quote:
Clientside - Doesn't work for serverside. Serverside - Doesn't work for anything not of .5's NPC Index - Doesn't work for anything not of .5's That is what I know. If it doesn't work, I assume there is a problem somewhere. Not sure how Graal was built, so I can't say I know what I'm talking about. Anyway, you guys are more than welcome to test it yourselves. Test 1 (Assumed it might work since on Clientside it was only one tile off. Meaning part of it was still one tile on for Serverside, and on the top-left corner half) Does not work. (This test was not tested last time) PHP Code:
PHP Code:
PHP Code:
PHP Code:
(This test was not tested last time) PHP Code:
Making it an NPC with its own ID is not part of the problem so it was not a test I was going to do. Not sure if NPC Characters that have interactions Clientside to Serverside should all be NPCs lol... The only reason I came up with this is because my NPC randomly stopped working when I had her look like she was sitting correctly, -.3 tiles on the Y axis. The first time I started over, and on the second time I realized what was causing it. |
Stop wasting your time, holy ****. What the Hell are you trying to accomplish? Stefan and I have both pointed out why your **** isn't working and the necessary solutions.
|
Stefan mentioned Showcharacter having a blocking behavior. This has nothing to do with improving in the future making it usable to trigger action. He also mentioned triggeraction rounds to the nearest multiple of .5. That was not a solution, nor an explanation of how it can be fixed, except to make things directly .5 which I've already been doing.
You told me to place the NPC at the origin of the NPC's spawn. Tried that by making the spawn less than a multiple of .5. (Both the actual NPC position, and under onCreated) Did not work. Creating a whole NPC IDing system does seems like a waste of time and unneeded for everyone to do should they want a moving character that reacts serverside. I've only asked for a future improvement that NPCs can use triggeraction outside of multiples of five. You may believe those solutions were necessary, and work, and I may think the area can still be improved. Lets agree to disagree with each other and I'll keep this open. |
Not sure what you're trying to accomplish, but typically triggering at a specific x/y is a bad idea and prone to error for many reasons (depends on what you're trying to do, though). I can't think of a time I've had to do that in years.
|
Quote:
I believe he is saying that graal is using the cord's from where the NPC was placed, not the x/y value after the adjustment. For example when setting a npc in a spot that needs adjusted .5 to look proper. Then the tigger is basing off the cords before you hit the play button not the updated cords.? I might be wrong understanding him tho.. |
Quote:
Keep in mind those are essentially different use cases; Devil wants to send a message serverside to a known NPC, whereas a pickaxe wants to hit any rocks that might be at a certain (x, y). |
Quote:
|
| All times are GMT +2. The time now is 01:32 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.