26.10.2016, 23:03
Quote:
Yeah but the problem with mapandreas is that it only returns the highest Z position in the ground, you can't go trough tunnels and buildings etc, that's a thing that can be done easily in pawn but anyways I would like to see something like that done in the plugin, people wouldn't have to do too much effort to have perfect zombies and followers arround the map. I don't know if you understood me but, imagine that there's a player inside the tunnel, with the basic mapandreas findz you would reach the Z coord in the top of the tunnel, so if you activate the parameter "use_mapandreas" the npc would go to the top of it instead of getting inside the tunnel. But there comes the logic, I could just not use mapandreas and let the zombie go straight from his coords to target's coords, but lets figure out that it's a steep tunnel, so the NPC will start to flying a bit upper from the ground because that the player Z_Coord is increasing, with colandreas we could just get the current zombie z coord, and raycast a line from a bit upper to deep down him, the result coord would be the collision point with the ground that would make him keep his path on the floor not flying, I'm developing my own zombies system based on this and dropping player nodes by his path, I think that we have tools that we have never had before to do these kind of things be perfect like that.
|
Doing it purely with colandreas might be too slow though if you use many NPCs. Finding the path through a simple course might take several thousand collision checks. Just checking a variable in an array that often doesnt even scratch the performance limit, but several thousand raycasts for each NPCs might be too much, even though ColAndreas is really fast. A hybrid mode might work, simply speaking using mapandreas above the ground and colandreas below. Using a pure ColAndreas pathfinder would probably require a much more careful programmed NPC AI to sustain the same amount of NPCs.
Quote:
In FCNPC 1.4.0 you can load npcmodes to memory too with FCNPC_LoadPlayingPlayback. Or if you just use FCNPC_StartPlayingPlayback then your recorded file writes to the memory and played only after fully load.
P.S. Maybe in the future, I can fully escape from memory hacking in FCNPC and realize everything with RPC calls. So, after it, FCNPC will be possible to not update after every SA-MP release (except in cases of updating RPC values, or in some other rare cases). |
Im not meaning to say memory hacking is bad btw. As long as theres someone updating it for new samp versions its absolutely fine. Got to keep in mind that even samp itself is based on memory hacking.