• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Conroling projectile speed

miens

Combos and Freedom
Joined
Nov 6, 2016
Messages
61
Reaction score
8
Hello

I wonder if there is any way to controll the speed of projectile when using for example hmm rune. If so how? And if no one knows if it can be done can you at least point me in the direction where I should look for it?
 
Thanks for this clue, at least now I know its doable :) I wrote a message to that topics creator but as I am not sure if he is still active nor if he will be willing to help me the topic remains open. Any help is still welcome.
 
For anyone interested in topic: Flatlander kindly responded to my messages and I have sorted this out. You have to download OTClient project, and change speed in missile.cpp file. If you want to make custom speed for every projectile you have to serialise it over network. In order to do that you need to download The Forgotten Server project and edit messages send to client then deal with those messages accordingly on client.
 
I hate that kind of jerry rig
Would be better to do in the client a event triggered by the arrival of the missile on the desired position. not such hard work
should be harder to make this missile follow a creature
but it could has negative effects if there are problems in networking

so... it must be server sided
but have no idea how to proceed xD
 
Last edited:
If you can set animation speed in lua, you can make a function what makes that the end of animation damage is done.
 
For anyone interested in topic: Flatlander kindly responded to my messages and I have sorted this out. You have to download OTClient project, and change speed in missile.cpp file. If you want to make custom speed for every projectile you have to serialise it over network. In order to do that you need to download The Forgotten Server project and edit messages send to client then deal with those messages accordingly on client.

I managed to do all of this, now my projectile spells and functions have a default projectile speed and I can also adjust the speed in their respective .lua file. And the projectile speed displays correctly in otclient. But there still a lot of issues with this, it won't do damage at the right time and slow projectiles will not actually follow targets.

will the projectile do damage at the right time?

The projectile will not do damage at the right time, if you take a regular spell like exori frigo for instance, the magic effect and damage is instant. There's nothing in the tfs source that says that damage should be applied after the projectile actually hits the target. (It just looks like it does that in regular tibia because the projectile speed is so fast). You can also test this by making otclient huge and you will see damage is applied instantly even


I think to get a proper system like this to actually work good you would have to add some projectile system in the source, right now all it only sends where the projectiles should come from, where it should come from and what animation it should have (i also added the projectile speed), and then the client takes that information to draw the projectile and what path it should take. The server itself has no idea where the projectile is so it cannot follow a creature or damage a creature after the projectile has hit the creature. I also think a system like this could be created in LUA.


This is just what I have seen from messing with otclient and looking in the tfs source so somebody please correct me if I am wrong. I will also tag @Flatlander and @Printer because it seems like they attempted to create similar systems. Collision System
 
Last edited:
Back
Top