Space Cadet
Member-
Content Count
72 -
Joined
-
Last visited
Never -
Medals
Everything posted by Space Cadet
-
Waypoint condition scripting
Space Cadet replied to nutbar's topic in OFP : MISSION EDITING & SCRIPTING
Oh, you can also use the LOCKWP command to prevent movement until its needed. Unit1 LockWP True - will stop the unit moving to its next waypoint Unit1 LockWP False - will tell the unit to continue with its waypoints -
Waypoint condition scripting
Space Cadet replied to nutbar's topic in OFP : MISSION EDITING & SCRIPTING
Groups will move to a waypoint, and then not move to the next until the expression in the condition field of the first waypoint is true. eg two waypoints waypoint 1 condition Not(Alive EastOfficer) waypoint 2 condition TRUE the group will move to waypoint 1 and stay until a unit called EastOfficer is dead, they will then move to waypoint2. A chain of waypoint can only have one "active" waypoint and the next waypoint in the chain can't be "active" until. 1) the group are within the radius of the waypoint AND 2) the expression in the condition field of the waypoint results in TRUE. If you dont want a unit to move at the start of a mission, the first waypoint should be placed directly over the starting position of the group leader, and change the Condition field to a variable eg "Phase2" then when you want the group to move just add the line Phase2 = true in the trigger, script waypoint or whatever you use to call in the group. With vehicles you could try starting the unit off with no fuel, and then set its fuel to 1 when you want the vehicle to start moving. Â This is useful for helicoptors as they will take off at the start of the mission and hover over the first waypoint untill it is no longer active (Edited by Space Cadet at 1:32 pm on Nov. 16, 2001) -
how do i make units move to wp
Space Cadet replied to Rob's topic in OFP : MISSION EDITING & SCRIPTING
Have you tried the "STOP" or the "LOCKWP" commands? unitname STOP True - forces a unit to stop whatever its doing. unitname STOP False - tells the unit to continue what is was doing. unitname LOCKWP True - blocks the unit from moving to its next waypoint unitname LOCKWP False - enables the units next waypoint again. -
WestUnit KnowsAbout EastUnit will return a number between 0 and 4 depending on how much WestUnit Knows about EastUnit. 0 if he dosn't know about EastUnit 4 if he knows exactly where EastUnit is and what he is
-
To create a trigger that will activate when a specific unit is not alive, try the following:- create a trigger, don't worry about any of the fields in the top half of the trigger setup, they won't be used.  In the CONDITION field, enter  NOT(ALIVE Tank1), this will fire when tank1 is dead. you can then create the reinforcements and give them a sequence of waytpoints, but put the first waypoint very close to where they start the mission, and synchronise this waypoint with the trigger you created above. The reinforcements will now move to the first waypoint and wait there until the trigger fires ie the tank is dead. If you have more than one vehicle in your convoy, just change the CONDITION field of the trigger to show NOT(ALIVE Tank1) AND NOT(ALIVE Tank2) AND NOT(ALIVE Tank3) (Edited by Space Cadet at 12:24 pm on Nov. 14, 2001)
-
Synchronising is a method of forcing two actions to occur simultaniously (one will wait for the other). For example, if you have two groups of guys attacking a village, both AI controlled, you could give each unit a waypoint just outside the village, and then synchronise them both. This would force the unit that arrived there first to wait for the second unit before continuing with its waypoints, usefull for ensuring a coordinatde attack. You can aslo synchronise Triggers and waypoints, this will force the group to wait at the synchronised waypoint until the trigger has fired, activating the next waypoint in the chain. There are obviously many more uses for synchronising, but thats a rough outline.
-
Anyone got any ideas how i could setup a trigger that fires if a specific eastern unit (eg an officer) detects the west? I know about grouping triggers and units, but this only lets you check if East detects a specific unit, not the other way around - or am I overlooking something?
-
If the soldier is called aP:- To plant the bomb aP Fire ["Put","Pipebomb"] Then to detonate aP Action ["Touchoff"]
-
Intro Sequence focus on player
Space Cadet replied to AlfHiggins's topic in OFP : MISSION EDITING & SCRIPTING
1) as Damage Inc suggested, use not (playername in choppername) eg Not(aP in Heli1) 2) You set a camera name when you create the camera manually, rather than from the effects button on a trigger. _cam = "camera" camcreate [0,0,0] creates a camera called _cam If you don't know much about camera scripting i'd have a look at a few tutorials, it gives you much more control with cameras. (Edited by Space Cadet at 3:49 am on Nov. 10, 2001) -
HEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEELP!!!!!!
Space Cadet replied to Aculaud's topic in OFP : MISSION EDITING & SCRIPTING
Try giving the helicoptors no fuel at the start of the mission, and then, when you call in the helicoptors (by a trigger or waypoint or script) add the code:- Heli1 setfuel 1 this will then fuel up the chopper so it can move. -
Intro Sequence focus on player
Space Cadet replied to AlfHiggins's topic in OFP : MISSION EDITING & SCRIPTING
CameraName camsettarget HelicoptorName points the camera at the helicoptor CameraName camsettarget Soldiername will change the camera to point at the soldier in the camera script, wait until the soldier has got out of the helicoptor (Use Damage Inc's command) and then use the command above to point the camera at the soldier. -
You could try something like this (this is untested, so probably full of errors :biggrin: ) _Unit = _this select 0 _Counter  = 0 BombCount  = 0 ;check if the unit has any bombs #CHECK ?(_Unit hasWeapon "PipeBomb" ) :Goto “REMOVE†goto “End†;remove a bomb and add one to bombcount #REMOVE _this removeweapon “PipeBomb†BombCount = BombCount + 1 goto “CHECK†;Add bombs again and exit script #END ?(_Counter = BombCount):goto “EXIT†_this addweapon “PipeBomb†_Counter = _Counter + 1 goto “END†#EXIT Exit what I'm trying to do is use see if the unit has any bombs, and if he does add one to BombCount, then remove a bomb.  Loop this until he has no more bombs, then BombCount will equal the number of bombs he had. I the add the apprapriate number of bombs back into his inventry. Like I said it is untested so you will probably need to tweak it. (Edited by Space Cadet at 6:56 pm on Nov. 9, 2001)
-
Get a soldier to neal down
Space Cadet replied to Space Cadet's topic in OFP : MISSION EDITING & SCRIPTING
Cheers, I'll give it a try. -
How can I set an AI unit to neal down? I know all about unitName SetUnitPos "DOWN"/"UP"/"AUTO" but this is either standup or lie down, I want him to be nealing. Is there another command with setunitpos that forces the unit to neal?
-
the ammo command dosn't work because it is used to return the number of rounds currently loaded in a weapon. For a M16 it will return between 0 and 30 For a law either 0 or 1 etc as a pipebomb is not a weapon in this sense, it will always be zero, as a pipebomb has no ammo loaded. Hmm, guess I'm, not being very useful, telling you why it dosn't work, but i'm not sure how to do this myself. Sorry
-
or just set the units behaviour to CARELESS, he wont react to anything then, cos he hasn't got a care in the world!! Until he gets shot. If you use this method he wont have his gun in his hand though.
-
A FREE LAMBORGHINI DIABLO SV TO WHOEVER ANSWERS THIS!!!!!!
Space Cadet replied to Aculaud's topic in OFP : MISSION EDITING & SCRIPTING
where's me Diablo then? Oh let me guess, its in the post!! -
A FREE LAMBORGHINI DIABLO SV TO WHOEVER ANSWERS THIS!!!!!!
Space Cadet replied to Aculaud's topic in OFP : MISSION EDITING & SCRIPTING
in the blokes init field type:- This moveincargo heli1 assuming the helicoptor is called heli1. -
anyone know the action command to make an AI unit pick up weapons and ammo from an ammo crate? Or a charicter animation I can use with the playmove command, that makes the unit look like they are picking something up from the floor? I have a mission where you have to rescue some captive soldiers, and when you do they run over to an ammo crate, and pick up weapons. At the moment I use a script to give them weapons, but they just appear in their hands - which looks a bit stupid. Cheers
-
Yeah, I've tried that method with a script that checks the unit health, and if he's damaged it heals him. But you just see the bloke get shot, fall down dead, then get back up again (looks even stranger when he sits on a grenade!!), and if you are that soldier the mission still ends when your damage is 0.
-
Superb , I've been looking for a response on this for weeks. Any help would be very much appreciated.
-
I usually place an invisible H in the place i want to move to, call it H1 and then use:- myguy setpos (getpos H1)