Jump to content

[LE] Help me scripting gods 🙏


AlimAge

Recommended Posts

I wrote an OnHit script which I attached to the enemy. The script teleports the enemy to the place I need with the MoveTo command, however, after teleportation, the enemy ceases to be hostile
(previously I made it hostile via the StartCombat command in the dialog)
I tried to write StartCombat at the end of Event OnHit, but it says that StartCombat not a function or does not exist
Can you please tell me how to solve this situation?

Link to comment
Share on other sites

What does your script extend? If it extends Actor, you should be able to use just StartCombat(game.getPlayer())

 

If your script extends ReferenceAlias though, you would have to do something like GetActorReference().StartCombat(game.getPlayer())

 

Basically StartCombat must be used on an actor.

Link to comment
Share on other sites

What does your script extend? If it extends Actor, you should be able to use just StartCombat(game.getPlayer())

 

If your script extends ReferenceAlias though, you would have to do something like GetActorReference().StartCombat(game.getPlayer())

 

Basically StartCombat must be used on an actor.

Thank you. I really didn't notice that I didn't set Actor but ObjectReference . Also the information about ReferenceAlias ​​was helpful, I'll keep that in mind.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...