Home   Help Search Login Register  

Author Topic: Just small questions?  (Read 5510 times)

0 Members and 1 Guest are viewing this topic.

Offline GW

  • ofp cadet
  • Members
  • *
  • The great Himalaya
Just small questions?
« on: 13 Jun 2010, 06:45:07 »
I make a mission,in which i want that a soldier enter into trigger,than it add as a new objective.before his entering into trigger objective  remains hide.
Be happy.
ofp die-hard fan for whole life

Offline Krieg

  • Mission Maker
  • Members
  • *
  • Who dares wins.
Re: Just small questions?
« Reply #1 on: 13 Jun 2010, 07:01:50 »
Create a file called init.sqs and this in it:
Code: [Select]
"2" objStatus "HIDDEN"
Then go to your trigger, set up the "activated by" stuff and write following in "On Activation" field:
Code: [Select]
"2" objStatus "ACTIVE"; hint "You have a new objective"
That will make the status of the second objective (you can change 2 to 3 and make third objective hidden) to hidden at the start and when player enters the trigger it will make it visible and it'll hint that player has new objective.

Hope that helps,
Krieg
If you see a light at the end of the tunnel, then it's probably an enemy tank.

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: Just small questions?
« Reply #2 on: 13 Jun 2010, 13:44:38 »
There's also a tutorial in the Editors Depot.

Always worth searching first.  :good:

Offline GW

  • ofp cadet
  • Members
  • *
  • The great Himalaya
Re: Just small questions?
« Reply #3 on: 07 Aug 2010, 06:01:15 »
i am busy in making my campaign,how can i stop AI units to go back again there first waypoint?
Be happy.
ofp die-hard fan for whole life

Offline RKurtzDmitriyev

  • Former Staff
  • ****
Re: Just small questions?
« Reply #4 on: 07 Aug 2010, 16:03:37 »
i am busy in making my campaign,how can i stop AI units to go back again there first waypoint?

Use a CYCLE waypoint. Place it close to the first waypoint. (The AIs will go back to whatever waypoint the CYCLE is closest to).

If you aren't sure when they will need to go back to the first waypoint, make a trigger and set its type to "Switch." Synchronize (F5) it to the waypoint BEFORE your cycle waypoint. Place the cycle waypoint close to the group's first waypoint, as before. Whenever the switch trigger is activated, the group will go back to the first waypoint.
The OFP Editing Center wishes to remind you that the faithful COMREF will never threaten to stab you and, in fact, cannot speak.
However, in the event that it does speak, you are encouraged to heed its advice. ;)

Offline GW

  • ofp cadet
  • Members
  • *
  • The great Himalaya
Re: Just small questions?
« Reply #5 on: 07 Aug 2010, 16:15:54 »
i mean they will leave from kolugjev one part to another end for a battle,but when there most squad died the rest will back to there first point/starting point,from where they start,
how can i make them that they will fight till the death in there last waypoint .
Be happy.
ofp die-hard fan for whole life

Walter_E_Kurtz

  • Guest
Re: Just small questions?
« Reply #6 on: 07 Aug 2010, 16:25:29 »
Use the allowFleeing command to stop them from running away.

In the Init line of the group leader, write
"_x allowFleeing 0" forEach units this

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re: Just small questions?
« Reply #7 on: 09 Aug 2010, 08:41:19 »
Either:
1. Make their last waypoint a GUARD
or
2. Make the last two waypoints:  SEEK AND DESTROY followed by a CYCLE with these two waypoints next to each other.

Offline GW

  • ofp cadet
  • Members
  • *
  • The great Himalaya
Re: Just small questions?
« Reply #8 on: 12 Aug 2010, 11:31:08 »
i making a mission,in which whenever guards of base see any resistance soldier than trigeered the alarm and everyone inside the base get in stealth approach,
« Last Edit: 12 Aug 2010, 11:32:47 by GW »
Be happy.
ofp die-hard fan for whole life

Walter_E_Kurtz

  • Guest
Re: Just small questions?
« Reply #9 on: 12 Aug 2010, 14:18:24 »
Assuming that it is West guarding the base; simply change it to East if necessary.

1. Make a trigger covering just the base and its guards:
   West, Present, Once
      and give the trigger a name, in this example: base


2. Make a second trigger, centred on the base and large enough to cover the area where the Resistance might be spotted, this might be 1500 metres in diameter:
   Resistance, Detected by West, Once

write in the On Activation line:
   "_x setBehaviour {STEALTH}" forEach list base

then click on the 'Effects' box in the bottom lefthand corner. You're interested in sounding the alarm, so choose
   Sound - Anonymous - Play Alarm (scroll near to the bottom of the list)

Offline GW

  • ofp cadet
  • Members
  • *
  • The great Himalaya
Re: Just small questions?
« Reply #10 on: 13 Aug 2010, 05:02:47 »
@Walter_E_Kurtz
THANKS for your answers,

how can i make friendly units to go , where i click on map and than know there status about remaining dead and alive
Be happy.
ofp die-hard fan for whole life

Offline RKurtzDmitriyev

  • Former Staff
  • ****
Re: Just small questions?
« Reply #11 on: 13 Aug 2010, 14:45:48 »
how can i make friendly units to go , where i click on map and than know there status about remaining dead and alive

LOL GW. Really, there's all kinds of ways you could do this, and it's been done many ways. There's even a whole demo mission from SelectThis available from the editor's depot. I don't really like how SelectThis wrote his script, but that's just me.

To make a unit go where you click on the map:

Code: [Select]
onMapSingleClick {unitname move _pos}

where unitName is the name of the unit to be moved. OnMapSingleClick has a whole tutorial devoted to it, you should read it.

To make units report how many units in the group are alive,

Code: [Select]
unitName sideChat format ["%1 are alive", {alive _x} count units groupName]

Where unitName is the name of the unit you want to communicate, and groupName is the name of the group you want to know about.
The OFP Editing Center wishes to remind you that the faithful COMREF will never threaten to stab you and, in fact, cannot speak.
However, in the event that it does speak, you are encouraged to heed its advice. ;)

Offline haroon1992

  • Members
  • *
  • My life is hopeless...
Re: Just small questions?
« Reply #12 on: 13 Aug 2010, 17:40:57 »
Quote Spinor
Quote
onMapSingleClick {[_pos, _units, _shift, _alt] exec "OnMapClick.sqs"}

i.e. whenever the player clicks on the map, a script "OnMapClick.sqs" is called with all the available parameters as arguments. This also answers your question about reading the status of the SHIFT and ALT keys. Their status is contained in the reserved boolean variables _shift and _alt (if true, key is pressed). _units is an array of the currently selected units.

Within "OnMapClick.sqs" you can do whatever you want with the info given

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
OnMapClick.sqs

_pos = _this select 0
_units = _this select 1
_shift = _this select 2
_alt = _this select 3

;block execution when player did select units
?Count _units != 0: Exit

;block execution when player is commander of a vehicle
_vehicle = Vehicle Player
?(_vehicle != Player) AND (Commander _vehicle == Player): Exit

.....

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

e.g. you can block execution of the script under some curcumstances or include a pause between click and movement.

Spinor

Thread Link : http://www.ofpec.com/forum/index.php?topic=2666.15


Regards,
Haroon1992
Very busy with life, business, and other stuff. Away from OFP for months. Not sure if I could get back onto it. :(

Offline GW

  • ofp cadet
  • Members
  • *
  • The great Himalaya
Re: Just small questions?
« Reply #13 on: 14 Sep 2010, 10:22:28 »
how can i make units to visits some villages from moton to sain piere again and again,by getting out from there URAL.
Be happy.
ofp die-hard fan for whole life

Offline RKurtzDmitriyev

  • Former Staff
  • ****
Re: Just small questions?
« Reply #14 on: 14 Sep 2010, 14:26:24 »
Here's a demo mission that will show you how to do that. You'll have to modify the units and waypoint locations to fit with your mission, but the basic idea should be the same.
The OFP Editing Center wishes to remind you that the faithful COMREF will never threaten to stab you and, in fact, cannot speak.
However, in the event that it does speak, you are encouraged to heed its advice. ;)