Home   Help Search Login Register  

Author Topic: REsistance friendly to, Sideenemy, Sidefriendly, enemy, friendly  (Read 1692 times)

0 Members and 3 Guests are viewing this topic.

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
:wow: long subject  ;)

How can i know wich side is freindly 2 da resistance ?

also wat do da next commands do :
1) sideenemy
2) sidefriendly
3) enemy
4) friendly

nd dont tel me 2 look @ da comref cuz its very fuzzy bout em  ;D

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

asmodeus

  • Guest
Look in the comref, LCD..   ::)   :P

Had to say it...  lol   :-*

What are you talking about?  Doesn't the mission designer decide which side the Resistance is friendly to??  Or do you mean to make a script that works no matter how the mission is set for that?  (sorry if I'm missing something very obvious)   ;)   ;D  

You saw this part right?

Quote
unit countFriendly array
Operand types:
    unit: Object
    array: Array
Type of returned value:
    Number

Description:
    Count how many units from the array are considered friendly by unit.

Example:
    player countFriendly list triggerOne

There's also a countEnemy one...  I bet you've seen this, but thought it could help.   :P

BTW, if by "Fuzzy", you mean nonexistent, then you are right!  ::)  I couldn't even find those commands!  Are they 1.75 or 1.85?  

bla

Asmo

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
yeah saw dis 1 nd saw wat Bremmer wrote on em
Quote
CountX (enemy,friendly,unknown) commands seem to count the number of units from the array that are considered to be of the given type by the whole side, not just the specified unit.

nd even tested it he is right  :P

Quote
Or do you mean to make a script that works no matter how the mission is set for that?

yeah im trin 2 make AI script  ;D

bout dese commands

da
enemy and friendly r 1.85 i think cuz i did saw em in da comref but it is fuzzy

Quote
enemy

Type of returned value:
Side
Description:
Enemy side (enemy to all units).

bout da oder 2 (sideenemy, Sidefriendly)- im stil not sur wat da hel r dey including wat ver dey r  ::) i only found em cuz of da "aoutomatic completing commands" of da editor  ;D

LCD OUT
« Last Edit: 26 Nov 2002, 15:37:06 by LCD »
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

dreaming_adam

  • Guest
FRIENDLY and ENEMY are constants, not commands/functions for clarification. A simple explination is a follows

you are aware that there are four independent "sides"
Civilian
East
West
Resistance.

FRIENDLY and ENEMY are basically two new sides.. FRIENDLY is hostile towards nobody (i.e a secondary civilian group) and ENEMY is hostile towards EVERYBODY.

FRIENDLY and ENEMY being constants not functions, means that you cant simply use ?(side bob == enemy frank) to check if bob is an enemy of frank.

A makeshift soloution for this, is to make three dummy soldiers out in the ocean on one of your maps. one east, one west, one resistance. Place them within one metre of eachother.
Create two arrays, one with:
warray = [ressoldier,wessoldier]
the other
earray = [ressoldier,eassoldier]

where ressoldier is the name of the resistance soldier, etc.

Then use the countenemy function.
eastflag = false
westflag = false
?((ressoldier countenemy warray) > 0):westflag = true
?((ressoldier countenemy earray) > 0):eastflag = true

Now, if resistance is hostile towards east, eastflag will be TRUE
and if resistance is hostile towards west, westflag will be true.

Hope this helps

(I have no idea why you would need to work this out mid-script seeing as surely you are the one who made the mission? and you could just look to see what the mission says?)

If you are writing a generic script for distribution to be used in other missions however, you wouldnt be able to ask the mission creater to place three dummy units.. so I would suggest using CREATEUNIT.

Cheers
Adam

Offline dolty666

  • Members
  • *
Can these arguments be used in a trigger to change the disposition of the Independant side (assuming they are set to 'Friendly To All' at start)? If so, how would one write that?

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
No, you cannot in OFP.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
This must be an all time record for digging up an old topic ... 5 years 4 months    :blink:


Planck
I know a little about a lot, and a lot about a little.