![]() |
shoot2()
shoot2(x,y,z,angle,zangle,strength,gravity,options ,ani,aniparams);
Two additions: 1) built-in gravity parameter 2) an options parameter, much like the one used in move(). For starters, I just wanted one where you could define if the projectile looked for walls, but I figured if Stefan were to add this, an options would be the best way for possible expansion in the future without adding shoot3 and so on. Right now though, only thing I can think of is an option for wall detection(because as it is, emulating default arrows with shoot gives them wall detection, when default arrows do not have), but I'm sure there are eventually more options to define one day. |
I would like a way to change the speed of projectiles, especially because Stefan already said somewhere that he will add it at some point :p
|
Quote:
|
Ya, I forgot about speed :)
Perhaps add that in there, or maybe replace gravity with it. |
gravity XD when it the angle hitz 0 it splats on the ground lol
|
It'd be nice if there was a findprojectile() too.
|
Why bother with all this when you can just triggerclient and add bullets into a clientside array, move 'em manually via systems NPC?
|
Quote:
|
Hardly matters. It's not exactly CPU-rape.
|
Quote:
|
It's not any smoother on the player's client o.o
Both are moved clientside, both are independent from what other players see, and both are moved at 20 FPS. Except with this one you can actually grab the projectile and move it about as you will. |
Quote:
|
It only handles the projectiles in the same level, no different than what Graal does with default shoot() :D!
And that delay is no different than what you get with a regular shoot, if Graal was made correctly, that is. That's called latency, and most games deal with it :) When using shoot(): Client requests shoot() to server -> Server accepts and -> Packets are sent to clients in same level about the shoot. Triggerclient: Client sends a trigger to the server -> Server accepts and -> Sends trigger to client, and in the same step, bullets are spawned. On second thought, there might be an additional .05 delay if the bullets can't be spawned in the same step the trigger is received? But that's not hard to deal with. It's one frame for Christ's sake. |
Quote:
|
So why don't you manually add it into the player who shoots it's array and ignore the additional trigger? That's not hard!
I think callweapon works in GS2? There, easily done. |
Quote:
But why even bother with all that if we had a function like shoot2, I can't imagine how nice it would be just use it instead of scripted projectiles. |
Spawning classes is a waste of bandwidth, though. Triggerclient and systems NPC ftw.
|
Make it happen w/ V6 Stefan, make it happen.
|
This is mainly for emulating the default arrows with shoot()? Any ideas of handling the existing parameters differently to achieve that goal? What exactly is the problem?
(btw speed=strength) |
Quote:
|
Quote:
What I'm interested in is functionality to allow projectiles to ignore walls, and being able to change the speed of projectiles that use 0 strength + zangle. |
Bullets can easily be sync'd perfecly if they have a linear path of travel and the creation time is known. I've written bullet handling system npcs in the past that use the methods I talked about previously in this thread and by no means are they CPU-hogs, and I've used them in the past on the old, old clients with no performance detriment either. Surely you guys can do the same to satisfy your needs, no?
As if we'll see a client update anytime soon, anyway. Make do with what you have. |
Quote:
PHP Code:
|
Quote:
|
Quote:
|
Example of changing speed of shoot:
PHP Code:
Example of changing gravity of shoot: PHP Code:
|
Quote:
|
Quote:
|
Quote:
|
I've checked the shoot command because we want to possibly replace classic arrows with projectils on Classic iPhone. It seems we can already easily emulate them with the shoot command:
- if you want the projectile to pass walls: use speed=1, zero gravity - if you want them to hit walls but move horizontally like classic arrows: use speed=0 You can also configure npcs to let them pass projectiles (but block players) with the npc.isblockingprojectiles = true/false variable, its best to set it on both client- and server-side (because it's not synced). There is was problem with inactive npcs ignoring it on server-side but it's fixed in the latest npcserver. |
Quote:
It would be good if there was a way to assign a sensitivity to default projectiles. When I was using default projectiles on Classic I was instead using onActionProjectile2(), with a subsequent box intersect adjusted according to the movement angle of the projectile. This worked a lot better, but this is inefficient to be checking upon every projectile landing, and Clientside onActionProjectile2 wasn't consistent with Serverside onActionProjectile(temp.x, temp.y, etc);. Ofcourse it's excessive to have fully scripted projectiles, but then when you have your block checking storing the collision object, that actually reduced subsequent script time. |
@Stefan:
What if I want them to move and hit walls like classic arrows but make them fly faster? |
Quote:
|
Quote:
|
Quote:
|
There is a server option for letting all arrows stop at walls, only works on serverside of course.
|
| All times are GMT +2. The time now is 07:12 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.