ziggi / FCNPC

FCNPC - Fully Controllable NPC
Apache License 2.0
138 stars 31 forks source link

NPC launching itself into the air when using FCNPC_MOVE_MODE_COLANDREAS #163

Closed jtylr closed 5 years ago

jtylr commented 5 years ago

Realise this is a v2.0 feature and so may not be ready yet, just wanted to check I wasn't doing anything stupid.

When I use

FCNPC_GoToPlayer(npcid, playerid, FCNPC_MOVE_TYPE_AUTO, FCNPC_MOVE_SPEED_AUTO, FCNPC_MOVE_MODE_COLANDREAS);

The NPC seems to remain at the same X/Y pos but jumps up into the air a fair distance. Running the function again will make them climb higher.

I don't have the same issue when substituting FCNPC_MOVE_MODE_COLANDREAS with FCNPC_MOVE_MODE_MAPANDREAS. (However, I lose collision detection)

To my knowledge, I've got ColAndreas initialised just fine, I'm just not sure if this is an issue with the current in-development branch v2.0 or something obvious I'm missing.

Cheers in advance.

Sialor commented 5 years ago

Check your scriptfiles\colandreas\ColAndreas.cadb. If it is not there, then create it using ColAndreasWizard.exe

jtylr commented 5 years ago

Hi @Sialor - Can confirm that the file is there, cheers for the suggestion though.

ziggi commented 5 years ago

I forgot about what you should run this in OnGameModeInit:

FCNPC_UseMoveMode(FCNPC_MOVE_MODE_MAPANDREAS);
FCNPC_UseMoveMode(FCNPC_MOVE_MODE_COLANDREAS);
Sialor commented 5 years ago

Thank

jtylr commented 5 years ago

Cheers @ziggi - Looks promising