![]() |
event metouchsplayer (backwards playertouchsme)
Having an event handler for objects touching players would make serverside damage handling infinitely better (esp. for baddies).
|
Or Stefan enabling the onCollision() function on 2D playerworlds would be great. =D
|
Quote:
|
okay, I SERIOUSLY SERIOUSLY want an event for when the NPC comes into contact on the sole behalf of it's own movement after instantiation. I want this VERY VERY much.
|
Quote:
|
Quote:
Okay, don't be an idiot, PLEASE. So, given: an NPC joined to a baddy class, and serverside HD. In order to do anything with as little lag as possible, you'd want to test for NPCs clientside on a 1/20 timeout, trigger the server in a weapon, which in turn triggers the event in the NPC. This would probably cause a substantial amount of lag (not to mention I'd get yelled at for it being insecure). If there were a direct method built into gscript, it would be much more efficient (hardcoding, easier access to classes). |
Um, I'm not sure I understand exactly where you're getting at, but NPC's do act upon collision with the player with an if (playertouchsme) {}. I've noticed that if you create an NPC and set it to move from point A to point B, and the player is standing somewhere inbetween the path, idle, then when the NPC goes through the player, the system reads it as if the player is touching the NPC, even though the player did not move at all.
|
Yeah. On the serverside, playertouchsme is triggered when the NPC moves to the player. And on the clientside, there is not that much of a problem with a 0.05 timeout loop with collision checking
|
But onCollision() would be awesome for both clientside and serverside. :D
|
Quote:
Quote:
|
Quote:
Really, the only way to do it would be with a timeout. ie. go to Kingdoms and tell me if the bomies there can attack you just as efficiently as the baddies in offline mode. Might add, I try not to suggest useless things. I try to suggest things that would either make sense to have built in. I generally don't have a problem creating complex things as long as I have all the tools to do it. The read-only var for npcs blocking is an example of that, and now my movement is done, and all of Classic's systems are ready for v2 disabling except for AP, Ratings, and a new rank system Quote:
|
Quote:
PHP Code:
|
Quote:
Sorry about that; but I distinctly remember playertouchsme on serverside acting different than on clientside. Good thing this thread is not in the scripting forum so I get away with bad advice :D |
Quote:
|
| All times are GMT +2. The time now is 04:06 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.