OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: acepilotray on 31 Aug 2005, 08:36:50

Title: some qustions
Post by: acepilotray on 31 Aug 2005, 08:36:50
I need a script that makes units fire at the sky, a script that allows a unit to join a group at a waypoint,a script that allows the pilot of a vheical die at a trigger.

Thanks all
Title: Re:some qustions
Post by: THobson on 31 Aug 2005, 09:11:01
I don't think you need scripts for any of those.  Look at:

1. doFire & fire commands

2. The Join & Join and Lead waypoints, also look at the join command.

3.  (driver vehiclename) setDammage 1

Look here:
http://www.ofpec.com/editors/comref.php

Title: Re:some qustions
Post by: acepilotray on 31 Aug 2005, 09:24:13
I'm making a misson where civilions are lead to a fire wall but when they get there my troops wont open fire on the group so I'm trying to get them to move there then add 1 enemy unit to the group ,making the whole group a enemy.
Title: Re:some qustions
Post by: C0LDSt33L on 31 Aug 2005, 10:23:21
Try adding the enemy solider to the group (he must be the leader I think) at the start of the mission and having "deletevehicle this" in his init line. This will make him disappear. You can then use "this setcaptive true" in the civies init lines to keep the cilivians from danger until you want them fired upon where you'd probably setcaptive to false on all the cililians in the group. This part could be done in a simple script or using something like

Code: [Select]
CivGrp = group this; "_x setcaptive false" foreach units CivGrp
I don't know how correct that is but it's something like that.
Title: Re:some qustions
Post by: 456820 on 31 Aug 2005, 21:34:34
add an enemy soldier to the civis group make him leader where it says
condition of precense i think change it to false that will make him invisible basically then use this setcaptive true and this setcaptive false like C0LDSt33L suggested

also
Quote
CivGrp = group this; "_x setcaptive false" foreach units CivGrp
could turn into
Code: [Select]
"_x setcaptive false" foreach units group this
i think thats right i get confised with group this or this group i dunno but try that
hope any of that helps
Title: Re:some qustions
Post by: Triggerhappy on 31 Aug 2005, 22:10:07
i'm fairly sure that secaptive false is all you need for civvies, cause i believe i have used that before and they got killed
Title: Re:some qustions
Post by: Tyger on 01 Sep 2005, 02:32:36
to fire at the sky:

unit fire ["Weapon","Muzzle","Magazine"]

i.e. loon1 fire ["M16","M16Muzzle","M16"]
Title: Re:some qustions
Post by: 456820 on 01 Sep 2005, 11:53:53
Quote
i'm fairly sure that secaptive false is all you need for civvies, cause i believe i have used that before and they got killed
Civs are allies to everyone unless they are in an enemy units group or resistance is friendly to no one i think that one might not work but i think civs are friendly to resistance not sure though
Title: Re:some qustions
Post by: THobson on 01 Sep 2005, 15:15:01
In my experince everyone is friendly to normal civis - but normal civis are only friendly to the people that resistance is friendly to.  Give them a gun and watch what they do.  If resistance is friendly to west then the civis will shoot east soldiers, but (if I remember correctly) the east soldiers will not shoot back.