OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: Ryu on 03 Jan 2004, 05:04:44
-
Can anyone tell how to use "not alive (id)"
It works for units I place on map but not on buildings already on map.
Thanks
-
I think you cannot check the houses already on map but may be by using somthing to check nearestobject or nearestbuilding commands??
Untested it so take a look ;)
-
I want it to check if a bridge has been destroyed. I saw it somewhere but....
-
!alive object id
That should do it.
-
Use
?(getdammage object *****):
To find out what damage a bridge section has suffered
Damage to an object ranges from "0" no damage to "1" Fully damaged
The example below looks at all the object numbers of the bridge sections for the Nogova bridge
If any section receives any damage it repairs all sections
If you have created bridge sections using an addon, then give each bridge section a name, so the scriopt lines would look like the following
?(getdammage XXXX):
where "XXXX" is the name you gave the object
Modify the script which you can run from the Init.sqs using the line
[] exec "Bridgerepair.sqs"
;Bridgerepair.sqs
#Start
~5
?(getdammage object 167669 > 0.1):goto "Repair"
?(getdammage object 167792 > 0.1):goto "Repair"
?(getdammage object 167793 > 0.1):goto "Repair"
?(getdammage object 167794 > 0.1):goto "Repair"
?(getdammage object 167795 > 0.1):goto "Repair"
?(getdammage object 167797 > 0.1):goto "Repair"
goto "START"
#Repair
~1
object 167669 setdammage 0
object 167792 setdammage 0
object 167793 setdammage 0
object 167794 setdammage 0
object 167795 setdammage 0
object 167797 setdammage 0
goto "START"
-
great respons guys, thanks