Jump to content
Sign in to follow this  
spartanhoplite

Moving Problem

Recommended Posts

hi i made a scenario that the americans are attacking a russian base and 3 BMPs and 3 groups are waiting at the beach to attack. How can i make the BMPs and the 3 groups attack if the force that the americans are attacking is down?

PLZ HELP!!!!!

---------- Post added at 03:11 PM ---------- Previous post was at 03:09 PM ----------

the map is desert island

Share this post


Link to post
Share on other sites

hi,

hi i made a scenario that the americans are attacking a russian base and 3 BMPs and 3 groups are waiting at the beach to attack. How can i make the BMPs and the 3 groups attack if the force that the americans are attacking is down?

PLZ HELP!!!!!

---------- Post added at 03:11 PM ---------- Previous post was at 03:09 PM ----------

the map is desert island

howto:

- place a trigger a bit bigger than your russian base area

- open this trigger and select east, not present

- put a waypoint MOVE on each reinforcement leaders (click over the unit)

- press f5 and drag a line between the trigger and each waypoint MOVE you placed previously

- now place a waypoint for each reinforcement group near the base (GUARD behaviour combat for the tanks and SENTRY behaviour aware speed full for infantry works very well)

What it means: If russians in base are dead or fleeing the trigger area then the reinforcement will come.

Here's a beginer tutorial from ofpec: http://www.ofpec.com/tutorials/index.php?action=show&id=14&page=4. I suggest you to read it.

I made a demo to show you how it works:

DEMO LINK

cya.

Nikiller.

Share this post


Link to post
Share on other sites
hi,

howto:

- place a trigger a bit bigger than your russian base area

- open this trigger and select east, not present

- put a waypoint MOVE on each reinforcement leaders (click over the unit)

- press f5 and drag a line between the trigger and each waypoint MOVE you placed previously

- now place a waypoint for each reinforcement group near the base (GUARD behaviour combat for the tanks and SENTRY behaviour aware speed full for infantry works very well)

What it means: If russians in base are dead or fleeing the trigger area then the reinforcement will come.

Here's a beginer tutorial from ofpec: http://www.ofpec.com/tutorials/index.php?action=show&id=14&page=4. I suggest you to read it.

I made a demo to show you how it works:

DEMO LINK

cya.

Nikiller.

It WORKED!!!

THANX NIKILLER

1 more question i placed a 5T TRUCK and i wanted filled with a squad how can i do it?

Share this post


Link to post
Share on other sites

hi,

It WORKED!!!

THANX NIKILLER

1 more question i placed a 5T TRUCK and i wanted filled with a squad how can i do it?

Glad it works. :)

If you want your truck filled with a squad you have several options:

- Type this line in the group leader init field: {_x moveInCargo truck1} forEach units group this. Don't forget to name your truck truck1. With this opiton group will be teleported in truck cargo at the mission start.

- Or you can use a GETIN waypoint. one click on the group leader, double click on the truck and then choose GETIN in the waypoint type box.

- Or you can use a script to make your squad getin the truck. Execute the script in the leader initfield or in a waypoint activation or trigger or whatever initlike script you prefer. Don't forget to give a name to your group, to name a group type NameOfYourGroup=group this in the leader init field.

;*****************************************
;Get In Vehicle Script by Nikiller v0.9b
;Make a get in group in a vehicle
;contact: nikillerofp@hotmail.fr
;[groupName,vehicleName] exec "getin_veh.sqs"
;example: [WestGrp1,truck1] exec "getin_veh.sqs"
;*****************************************

_grp = _this select 0
_veh = _this select 1

_units=Units _grp

{_x assignAsCargo _veh} forEach _units
{[_x] orderGetIn true} forEach _units

exit

to make your squad getout from the truck you also have several solutions:

- Use a waypoint GETOUT.

- Use a script like this:

;*****************************************
;Unassign Vehicle Script by Nikiller v0.9b
;Unassign a group in a vehicle
;contact: nikillerofp@hotmail.fr
;[groupName] exec "unassign_veh.sqs"
;*****************************************

_grp = _this select 0

_units=Units _grp

{unassignVehicle _x} forEach _units

exit

or use a script like this:

;*****************************************
;Getout Vehicle Script by Nikiller v0.9b
;Make a group get out from a vehicle
;contact: nikillerofp@hotmail.fr
;[groupName,vehicleName] exec getout.sqs
;example: [WestGrp1,truck1] exec "getout_veh.sqs"
;*****************************************

_grp = _this select 0
_veh = _this select 1
_units = units _grp
_i = 0
_j = count _units
_ac="GETOUT"

#nextone
(_units select _i) action [_ac,_veh]
unassignvehicle (_units select _i)
_i=_i+1
~0.5
?_j>_i:goto "nextone"

exit

I still suggest you to read the ofpec tutorial I sent you.

cya.

Nikiller.

Edited by Nikiller

Share this post


Link to post
Share on other sites

Sry for being causing a headache but only 1 last question.

I deployed a boat which is to rescue fallen pilots who are pilots lost their plane/helicopter.

The question is: How can i get the fallen pilots embark the boats if their plane/helicopter is down?

Thanx

Share this post


Link to post
Share on other sites
Sry for being causing a headache but only 1 last question.

I deployed a boat which is to rescue fallen pilots who are pilots lost their plane/helicopter.

The question is: How can i get the fallen pilots embark the boats if their plane/helicopter is down?

Thanx

- Create a trigger (size 0x0) and type in the condition field !(alive chopper1). Name your chopper chopper1

- Type in the trigger onactivation field [WestPilotGrp1] exec "getout_veh.sqs"; [WestPilotGrp1,Boat1] exec "getin_veh.sqs"

- type in the pilot init field WestPilotGrp1=group this and name it WestPilot1

First you must unassign the pilot from his previous chopper.

getout_veh.sqs

;*****************************************
;Unassign Vehicle Script by Nikiller v0.9b
;Unassign a group in a vehicle
;contact: nikillerofp@hotmail.fr
;[groupName] exec "getout_veh.sqs"
;*****************************************

_grp = _this select 0

_units=Units _grp

{unassignVehicle _x} forEach _units

exit

Now assign the pilots to the boat.

getin_veh.sqs

;*****************************************
;Get In Vehicle Script by Nikiller v0.9b
;Make a get in group in a vehicle
;contact: nikillerofp@hotmail.fr
;[groupName,vehicleName] exec "getin_veh.sqs"
;example: [WestPilot1,boat1] exec "getin_veh.sqs"
;*****************************************

_grp = _this select 0
_veh = _this select 1

_units=Units _grp

{_x assignAsCargo _veh} forEach _units
{[_x] orderGetIn true} forEach _units

exit

- Create a boat and name it boat1. Select waypoints (f4) and double click over the boat. In the waypoint condition type WestPilot1 in boat1. It means that the boat will only move if the pilot is in the boat.

I made a demo to show you how it works.

DEMO LINK

cya.

Nikiller.

Share this post


Link to post
Share on other sites

hi,

But what shall i do if the pilots were in the chopper

Thanx.

SRY 4 GIVIN U A headache

Ok I remade the demo with pilots in chopper but I met 2 problems:

- First problem is pilots die very often i.e if enemies fire on the chopper with machinegun. They die faster than the chopper itself. Moreover, if the chopper is shot by AA missile they die eveytimes. Then I had to use a script to make them invulnerable (fortunetly I allready wrote this script for another use).

- Second problem is by defalut, in ofp crews don't bail out from a vehicle if it is too damaged. So I had to write a script to make the crew bail out when the chopper is too damaged.

howto:

- Type in the pilot init field WestPilotGrp1=group this; this moveInDriver chopper1 name it WestPilot1

- Type in the gunnner init field this moveInGunner chopper1 and name it WestPilot2

- Name the chopper chopper1 and select flying in special option menu

- in the first boat waypoint condition type nik_boatGo

now the scripting part

init.sqs

chopper1 flyInHeight 100
[chopper1] exec "emergency_bailout.sqs"
[chopper1,WestPilotGrp1,boat1] exec "chopper_check.sqs"

nik_boatGo=false
[WestPilotGrp1,boat1] exec "getin_check.sqs"

{[_x] exec "invulnerable.sqs"} forEach [WestPilot1,WestPilot2]

exit

chopper_check.sqs

;*********************************************************
;Alive Check Script by Nikiller v0.9b
;Check if a unit is alive and execute a script if not
;contact: nikillerofp@hotmail.fr
;[groupName,vehicleName,boatName] exec "chopper_check.sqs"
;*********************************************************

_chop = _this select 0
_grp = _this select 1
_boat = _this select 2

if (local _chop) then {} else {goto "ende"}

_d=5

#check
~_d
if (alive _chop) then {goto "check"}

hint "pilot was shot down!"
[_grp,_boat] exec "getin_veh.sqs"

#ende

exit

getin_veh.sqs

;***************************************************
;Get In Vehicle Script by Nikiller v0.9b
;Make a get in group in a vehicle
;contact: nikillerofp@hotmail.fr
;[groupName,vehicleName] exec "getin_veh.sqs"
;example: [WestPilotGrp1,boat1] exec "getin_veh.sqs"
;***************************************************

_grp = _this select 0
_veh = _this select 1

_units=Units _grp

{_x assignAsCargo _veh} forEach _units
{[_x] orderGetIn true} forEach _units

exit

emergency_bailout.sqs

;****************************************************
;Bail out crew Script by Nikiller v0.9b
;If the vehicle is too damaged then the crew bail out
;contact: nikillerofp@hotmail.fr
;[vehicleName] exec "emergency_bailout.sqs"
;****************************************************

_v = _this select 0

if (local _v) then {} else {goto "ende"}

_c=crew _v
_ac="EJECT"
_i = 0
_j = count _c
_d=0.5

@ damage _v>=0.8

#n
(_c select _i) action [_ac,_v]
unassignVehicle (_c select _i)
_i=_i+1
~_d
?_j>_i: goto "n"

#ende

exit

getin_check.sqs

;*****************************************************
;Get In Check Script by Nikiller v0.9b
;Check if a group is in a vehicle
;contact: nikillerofp@hotmail.fr
;[groupName,vehicleName] exec "getin_veh.sqs"
;example: [WestPilotGrp1,boat1] exec "getin_check.sqs"
;*****************************************************

_grp = _this select 0
_veh = _this select 1
_d=5

#getin
~_d
_icount=0
_num=0
"if (alive _x) then {_num = _num + 1}" forEach units _grp
"if (vehicle _x == _veh) then {_icount = _icount + 1}" forEach units _grp
if (_icount == _num)  then {goto "extract"} else {goto "getin"}

#extract
nik_boatGo=true; publicVariable "nik_boatGo"

exit

invulnerable.sqs

;*************************************
;Invulnerable Script by Nikiller v0.9b
;Make a unit invulnerable
;NOTE: it's 95% reliable
;contact: nikillerofp@hotmail.fr
;[unitName] exec "invulnerable.sqs"
;*************************************

_u = _this select 0

if (local _u) then {} else {goto "ende"}

_u addeventhandler [{dammaged},{(_this select 0) setdamage (damage (_this select 0)-(_this select 2))}]
_u addeventhandler [{hit},{(_this select 0) setdamage (damage (_this select 0)-(_this select 2))}]

#ende

exit

Here's a demo link to show you how it works.

DEMO LINK

NOTE: you can make the pilot vulmerable again by using this script

vulnerable.sqs

;*******************************************************
;Remove Invulnerable Script by Nikiller v0.9b
;Make a unit vulnerable after it was set to unvulnerable
;contact: nikillerofp@hotmail.fr
;[unitName] exec "vulnerable.sqs"
;********************************************************

_u = _this select 0

if (local _u) then {} else {goto "ende"}

_u removeAllEventHandlers "hit"
_u removeAllEventHandlers "dammaged"

#ende

exit

cya.

Nikiller.

Edited by Nikiller
added vulnerable script

Share this post


Link to post
Share on other sites

Im an intermediate editor i think its a silly question but where should i type ths scripting in?

Share this post


Link to post
Share on other sites
Im an intermediate editor i think its a silly question but where should i type ths scripting in?

I spent time to make a demo for you and upload it on multiupload. Maybe you could spend time to download it and study it. ;) :cool: :D

In case you didn't saw the link (click on it):

DEMO LINK

To install scripts in your mission copy and paste it in the notepad and save it as .sqs not .txt. When it's done drag the scripts in your mission folder usually located here C:\Program Files\Codemasters\Operation Flashpoint\Users\YourName\missions\YourMissionName.islandName

cya.

Nikiller.

Edited by Nikiller

Share this post


Link to post
Share on other sites

go here and use this as a valuable reference.

You may answer alot of your own questions by reading through them over time.

http://community.bistudio.com/wiki/Category:Operation_Flashpoint:_Editing

http://www.ofpec.com/COMREF/index.php?action=list&game=OFP&letter=a

Im an intermediate editor i think its a silly question but where should i type ths scripting in?

the scripts up above provided by nikiller are .sqs files.

getin_check.sqs

you need to place those files in your /user/mission folder.

then in game reference the scripts via activation fields of trigger. or as you get more experienced - from within another script.

oh also a headsup on editing - if you rename your mission from within editor - it will only copy the mission.sqm files and will not copy over any other necessary file you had in original mission. Such as: description.ext, .sqs or .sqf

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×