Actor question
#1

I have created an actor he doesn't take damage which is okay. But the next thing is problem:
Iam punching it and he moves, not from his spot but he does this:




I want to keep him in position like this without "moving" body

CODE:
PHP код:
public OnGameModeInit()
{
    
CreateActor (294,2501.1829,-1657.0374,13.4034,155.4148); 
Do i need something to do with?:
PHP код:
SetActorFacingAngle 
Reply
#2

try freezing him maybe? "TogglePlayerControllable".
Reply
#3

Quote:
Originally Posted by iLearner
Посмотреть сообщение
try freezing him maybe? "TogglePlayerControllable".
TogglePlayerControllable works only with players.

@OP: Set a timer of 5 seconds to restore the actor in his original position.
Reply
#4

Quote:
Originally Posted by KinderClans
Посмотреть сообщение
TogglePlayerControllable works only with players.

@OP: Set a timer of 5 seconds to restore the actor in his original position.
Did you try that sir.
Reply
#5

TogglePlayerControllable funziona solo con i players perchй ha solo "playerid" come riferimento. Non c'и "actorid" in quel callback. Non c'и bisogno di provare, и cosi 🤔
Reply
#6

Quote:
Originally Posted by KinderClans
Посмотреть сообщение
TogglePlayerControllable works only with players.

@OP: Set a timer of 5 seconds to restore the actor in his original position.
Could you explain me more about the timer which restore the actors in original positions . I'm asking this because i would like to have more than 1 actor.

PHP код:
 SetTimerEx("Timer"500false"d"playerid);

Reply
#7

Quote:
Originally Posted by KinderClans
Посмотреть сообщение
@OP: Set a timer of 5 seconds to restore the actor in his original position.
Timer? Actually, lots of timers = lag. It is not a good solution for this issue.

Anyways,

Try with applying animation to actor.

Код:
New Actor;
Actor = CreateActor(294,2501.1829,-1657.0374,13.4034,155.4148);  
ApplyActorAnimation(Actor, "DEALER", "DEALER_IDLE", 4.1, 1, 0, 0, 0, 0);
Reply
#8

Quote:
Originally Posted by UFF
Посмотреть сообщение
Timer? Actually, lots of timers = lag. It is not a good solution for this issue.

Anyways,

Try with applying animation to actor.

Код:
New Actor;
Actor = CreateActor(294,2501.1829,-1657.0374,13.4034,155.4148);  
ApplyActorAnimation(Actor, "DEALER", "DEALER_IDLE", 4.1, 1, 0, 0, 0, 0);
Thanksss!!! Works like a charm
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)