![]() |
Projectile Hit Detection
1 Attachment(s)
When a projectile is fired (using shoot) and hits a wall on the serverside it calls this function in the Control-NPC
HTML Code:
function onActionProjectile(x, y, shootparams) {Check the screenshot- the bullet hit the tree (fire starts on impact of hitting the tree on the serverside) but the bullet is still flying past. |
Does the tree have the same setshape both clientside and serverside? I think I remember issues with this when setshape was used both serverside and clientside with different values.
|
I was under the impression that server-side hit detection is irrelevant to what the client actually sees since the client is basically simulating the shot on their screen, so if the blocking isn't the same on the client-side you'd see scenarios like that.
|
Quote:
|
It not just happens on objects, it also happens on players too.
No real fix then? :[ |
Quote:
|
Oh I see- darn
thanks |
Would be nice if there was a command to make players blocking/not blocking for projectiles. As it is now, scripting your own projectile system is mandatory if you want to have non-blocking players on clientside.
|
Quote:
|
Quote:
|
Having the same issue.
My fireball sets crops on fire then continues to pass. http://www.wr3ckless.net/uploads/files/samehere.png |
Quote:
|
Yes, and it has the exact same setshape on the client and serverside.
|
Quote:
|
I'm not actually on my computer at the moment, I'm in these forums on my iPhone.
In fact I'm not even home lol.. |
Quote:
|
PHP Code:
|
It should be setshape(1, 32, 32). Not sure if that will fix it, but besides that everything looks fine. Does it block on clientside when you try to walk through it?
|
No it does not block on the clientside.
It's wheat lol.. Just out of curiosity; what does the first paramater of setshape do? |
Quote:
There are no other shapes defined afaik. |
Quote:
|
So what does doing setshape(0 achieve o_O?
|
Quote:
|
Quote:
|
cbk changing that didn't fix the issue.
Is there any other way that you think you could make the fireball go through each NPC and set it on fire and continue passing; setting anything in it's path on fire? |
Quote:
And if they're not blocking clientside, that's your problem. |
darn
|
setshape first parameter:
0 - disable 1 - rectangle 2 - tile based (requires setshape2()) Update: I've updated the description on wiki.graal.net for setshape and setshape2. |
If possible it would be useful to be able to set shapes in the same way as polygon displays.
|
Quote:
That would be pretty cool. |
| All times are GMT +2. The time now is 11:41 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.