Little detail

Started by MEGAMIND, Dec 02, 2024, 02:03 PM

Previous topic - Next topic

MEGAMIND

@habi2 what is default.map?

How did u made it ?

Kind of hardcoded as i was wondering it might be containing over all vc coords.. can u provide a detail topic on it?

Can we make our own default.map?

Is it really even needed? cuz my npc walks fine even without it!

can we extract data from this default.map file?

What are the more possiblities with it..?

vitovc

...::: vice city :::...
Useful things for vcmp: Relative position and finding an angle (in 3d), 3d line (like laser)

habi2

vito is right.(also topic correct)

I made it using RayTrace from sky downwards.

From that topic, using functions Save you can edit and make small changes.

Npc walks fine with walking animation. But you need update position also regularly, otherwise it will not be synced with player(who comes later).
But if without animation how will you get z-cordinate exactly?

Quotecan we extract data from this default.map file?
yes.

What more possiblity? I found that it do not work under roofs. So you can update map files for z co-ordinates so it is correct. You can create explosions.

Spawn a vehicle, Create a checkpoint. May be more.

MEGAMIND

ah i made it like giving it few vectors made the walk animation and the npc moves in between them randonmly sawpn randomly too so thats why im not requiring the default.map file but @habi2 i also noticed that on few paths or areas the npc starts floating in air like its having diffuclty in walking.. why is that soo? also to resolve this issue i added default.map thinking it may fix the issue but it didnt.. so thats what im looking for that it should walk normaly instead of doing this


habi2

#4
I have a question. How you are making npc walk? Are you updating npc's position besides player.SetAnim ? If so, then it floats in air because the updating of position is not correct. Unfortunately, it requires lot of testing to find out the exact walk position to be updated every n milliseconds. I think that is the case.
And perhaps, it also depends in how many ms interval you are setting the animation.

MEGAMIND

Quote from: habi2 on Dec 03, 2024, 01:57 PMI have a question. How you are making npc walk? Are you updating npc's position besides player.SetAnim ? If so, then it floats in air because the updating of position is not correct. Unfortunately, it requires lot of testing to find out the exact walk position to be updated every n milliseconds. I think that is the case.
And perhaps, it also depends in how many ms interval you are setting the animation.
i was just using a vector's .z that made it walk normal in an area.. but other then that area it started to float or bounce.. so i decided to what ever vectors were there if the npc reaches that certain are the vectors .z gets updated to that area.. but yet again if i take the npc with me on a drive and make it walk then it floats or bounces again..

so what i thought was using vc default files like ipls or some other fiels that has vectors then i put themin array and then accordingly the npc moves the area gets looped according to npc pos and then it should work but it took alot of time....

eventauly in the end i went back to ur npc cop script found that u were using some sort of function u made that time

FindZFor2DCoord

and used it like newpos.z=FindZFor2DCoord(newpos.x, newpos.y)+1.0425; my all of that maths went all in vain due to this one line , lol it sorted it out all at once but then it said that im not using default map init and file so added that as well and it worked fine now

Thanks for the struggles @habi2

on little question: +1.0425; this works fine for all areas or is this specific for something? like sand, ocean, vegetation, or main land?