Function SetActorHealth and GetActorHealth - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Function SetActorHealth and GetActorHealth (
/showthread.php?tid=572524)
SetActorHealth and GetActorHealth -
Admigo - 29.04.2015
Kalcor: Is it possible to make a function like SetActorHealth and GetActorHealth? Otherwise fix the parachute/fire extinguisher bug please because players will be able to kill the Actors.
Admigo
Re: Function SetActorHealth and GetActorHealth -
Mauzen - 29.04.2015
As far as I understood the new actors they are very minimalistic and mostly client-sided. Messing around with their health would mean that additional stuff has to be synced, hits have to be detected, etc, which rather turns them into normal NPCs. I dont think that the idea behind actors is to have normal NPCs and almost-NPCs
Re: Function SetActorHealth and GetActorHealth -
Admigo - 29.04.2015
Quote:
Originally Posted by Mauzen
As far as I understood the new actors they are very minimalistic and mostly client-sided. Messing around with their health would mean that additional stuff has to be synced, hits have to be detected, etc, which rather turns them into normal NPCs. I dont think that the idea behind actors is to have normal NPCs and almost-NPCs
|
I understand, but there is a way players can kill the actors by hitting them with a fire extinguisher/parachute.
This should get fixed otherwise players will abuse this.
Post #1900!
Re: Function SetActorHealth and GetActorHealth -
Pottus - 29.04.2015
You can do this already the only issue is how health gain/loss is determined.
Re: Function SetActorHealth and GetActorHealth -
Meta - 29.04.2015
If there is a callback for them getting hit, you can just count their helth yourself in a float.
Re: Function SetActorHealth and GetActorHealth -
n0minal - 29.04.2015
I think we should be abble to attach them objects, we can attach objects into other objects, into players, into vehicles, but not in actors?
Re: Function SetActorHealth and GetActorHealth -
Abagail - 29.04.2015
Personally just add a GetPlayerTargetActor function and allow us control over their health. That for a good scripter is way more than enough.
Re: Function SetActorHealth and GetActorHealth -
MP2 - 29.04.2015
Quote:
Originally Posted by Abagail
Personally just add a GetPlayerTargetActor function and allow us control over their health. That for a good scripter is way more than enough.
|
https://sampwiki.blast.hk/wiki/GetPlayerCameraTargetActor
Re: Function SetActorHealth and GetActorHealth - justice96 - 30.04.2015
Quote:
Originally Posted by Abagail
Personally just add a GetPlayerTargetActor function and allow us control over their health. That for a good scripter is way more than enough.
|
Completely, I agree with this!