Editors Depot - Mission Editing and Scripting > ArmA - Editing/Scripting Multiplayer

Medic Spawn / Revivescript

(1/1)

Speeder:
As I couldn't find a working mp script I'm trying to make my own.
My problem here is that when the player get's healed, his new animation isn't passed over the network, so every other player on the server will just see a dead body on his back floating around on the ground when the player is walking around after being revieved.

The problem is at #heal as far as I can tell.

I've tried messing around with the first line local player etc. but still no luck. I'm so lost atm.


--- Code: ---;?!(local player):exit
~1
_unit = _this select 0
#start
_deadbody = player

@!(alive player)
hint FORMAT["%1 DEAD",name _unit]
_weapon = PrimaryWeapon player
_allWeapons   = weapons player
_allMagazines = magazines player


;---------------------------
@(alive player)
cutText ["", "BLACK IN",2]
;titleRsc ["MedicRED", "PLAIN"]

deleteVehicle _deadbody
_unit = Player
RemoveAllWeapons Player
player allowDammage false
[_unit] allowGetIn false
player setCaptive true
player Setdamage 0.8

HINT "YOUR DOWN\nGet the Medic!!"
_unit groupchat "Medic!!! Get the Medic!!"
_unit switchmove "AdthPercMstpSnonWnonDnon_3"

;---------------------------
#checkdead
? ((getpos player select 2) < -3) : goto "move"
~0.5
?(damage player)<0.2:goto "heal"
?!(alive player):goto "start"
?Vehicle player!= player:player Setdamage 1
goto "checkdead"

;---------------------------
#heal
~5
HINT "Healed"
player setCaptive false
player allowDammage true
player switchmove "AmovPpneMstpSrasWrflDnon"
hint FORMAT["%1 is healed",name _unit]
;---------------------------
goto "start"
;---------------------------


#move
player setpos (getmarkerpos "emergency_respawn")
goto "checkdead"
--- End code ---

Mr.Peanut:
Try this.

Navigation

[0] Message Index

Go to full version