[solved] setasplayer

Started by Blano, Sun 25/08/2024 16:44:56

Previous topic - Next topic

Blano

Hello guys,

i'm trying to test my "player change" but i cannot see the error:


i want change player character everytime i click on another  npc is this feasible?
something like this:

Code: ags
 


function cKubik_AnyClick(Character *theCharacter, CursorMode mode)
{
cKubik.SetAsPlayer();
}



Thank you friends!

eri0o

I don't understand, are getting an error message? Can you tell what is it?

Blano

I'm trying to code a script that by clicking on character2, it becomes the player...
I set character2 to be clickable and set the script to anyclick (for now) and it doesn't seem to do anything, so the player is always character1

Snarky

This is generally because you haven't linked the function to the event (in the Character event pane).

Blano

i solved the issue:

i forgot to change mouse.mode hovering the character..

Thank you all guys

Khris

Did you click the character with the walk cursor? IIRC that's the only one that doesn't trigger "any click on"

SMF spam blocked by CleanTalk