Home   Help Search Login Register  

Author Topic: Two Questions...  (Read 691 times)

0 Members and 1 Guest are viewing this topic.

Alex

  • Guest
Two Questions...
« on: 03 Sep 2004, 10:25:27 »
Hey All, I Am Making A Mission Where You Are Inserted By Helo Into A Base To Destroy A Scud Launcher But I Don't Know How To Make An Objective Complete When It Is Completely Destroyed!
I Have Tried East -Not Present Over It But If The Men Inside
Are Killed It Completes The Objective! Also Once The Scud Is Destroyed It Says In Hint Box ,"Call 0,0,1 For Extraction" And That Is Fine, Then I Call 0,0,1 And It Says "To Be Extracted Go To The Right Hand Side Of The Entrance To The Base" Ok, Then The Helo Comes In, Flies Right Past Me And Then Goes Off To The Base With Not Even Picking Me Up! I Have Got The Load Waypoint For The Helicopter Synched With The Get In Waypoint For Me But It Doesn't Land, BTW The Load Waypoint Is On A H Invisible.
Please Help Guys!
Alex

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Two Questions...
« Reply #1 on: 03 Sep 2004, 11:51:51 »
You need a trigger.   Various ways of doing it.   For example

Condition:   not canFire scud1 and not canMove scud1
On activation:  scud1 setDammage 1; 1 objStatus "done"

Or you could have a condition line

Condition:   getDammage scud1 > 0.9

with the same on activision.  Syntax not guaranteed.


Choppers are tricky in OFP.     Your best bet is to head over to the Ed Depot and get some scripts to help.    (For example snYpir's quick helicopter landings.)   Don't use player waypoints to make things happen.    Players in Veteran mode can't see them:  if an earlier waypoint was not completed correctly for some reason, the mission won't end.    A common fault, and utterly unforgiveable.
Plenty of reviewed ArmA missions for you to play

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Re:Two Questions...
« Reply #2 on: 03 Sep 2004, 17:39:07 »
With the not (canfire) scud and not (canmove scud), can you use or?
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Two Questions...
« Reply #3 on: 03 Sep 2004, 17:44:58 »
What is wrong with:

not (alive scudlauncher)

?

You might want to look at this mission that also deals with dead SCUDs and a subsequent helicopter extraction to see how it is done there

http://www.ofpec.com/missions_depot/index.php?ID=1061

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Two Questions...
« Reply #4 on: 03 Sep 2004, 18:11:26 »
not alive X

is not suitable for vehicles.   In theory it should be fine, but armour particularly can look destroyed when it is not.   Consequently the trigger doens't fire and the player is left wandering what's going on.   Old hands like me know to put another LAW in the pesky thing just to make sure, but its not good mission design.    If you have several vehicles together (as in Defensive Strike) its not such a big deal because the explosion of one will contribute to the destruction of the one next to it.   More explosions => less chance of a screw up.    not alive is fine to use on soldiers.

canFire and/or canMove are much better because it avoids this problem.     You can indeed use or instead of and, or just one of them, it just depends on what you really want.
« Last Edit: 03 Sep 2004, 18:12:21 by macguba »
Plenty of reviewed ArmA missions for you to play

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Two Questions...
« Reply #5 on: 03 Sep 2004, 20:24:02 »
Interesting I didn't know that  about not alive for a vehicle.  I learn something every day.

In the case of a scud launcher though I expect the damage would be done by a LAW or a satchel charge - either of which will by pass the not quite dead stage and go straight to the really dead stage, but I can see it could be a problem for tanks.


I will have a play around with it.  I might even have to update my mission again.  It never ends.

Thanks


Edit: No I won't need to update it.  I have just remembered the script I use to generate the flames and smoke kicks in when getDammage > 0.98 (or some such)  the first line thereafter is:  setDammage 1  so if it ain't burning it ain't dead

« Last Edit: 03 Sep 2004, 20:40:39 by THobson »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Two Questions...
« Reply #6 on: 03 Sep 2004, 20:36:50 »
See, you'd even thought of it yourself.   ;D

You're right of course, it's not usually a problem.    In fact you'll probably have trouble replicating it.    But it's common enough - and devasting enough - to be worth getting right.
Plenty of reviewed ArmA missions for you to play

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Two Questions...
« Reply #7 on: 03 Sep 2004, 20:41:02 »
I'll remember for the future though.

The Avon Lady

  • Guest
Re:Two Questions...
« Reply #8 on: 06 Sep 2004, 21:09:21 »
Since we're already talking about canmove and canfire, I'll post my question here:

I need a trigger whose condition is if all of the vehicles (armor, trucks, cars, boats and planes) within the trigger's radius cannot move or fire. There might be infantry in the same area but I don't care about them.

I know how to do this if assigning names to each vehicle (as in the examples in this thread) but I don't know how to code this globally.

Bart Jan responded to me on this BIS thread, as follows:
Quote
Try:
Code: [Select]
{(!(canmove _x) or !(canfire _x)) and "Man" counttype [_x] == 0} count thislist == (count thislit) - ("Man" counttype thislist)not tested :)
Now, I don't understand what "Man" is doing in that list. As I said, I don't care about infantry in the area - just vehicles. Or does it exclude infantry from the condition assessment? If so, how?

Help appreciated. TIA.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Two Questions...
« Reply #9 on: 06 Sep 2004, 22:08:57 »
No expert here but I think.......

This bit:
Code: [Select]
count thislist == (count thislit) - ("Man" counttype thislist)

Subtracts the 'Man' types from the list.

However, there might be a mistype there, maybe it should be:
Code: [Select]
count thislist == (count thislist) - ("Man" counttype thislist)


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

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Two Questions...
« Reply #10 on: 06 Sep 2004, 22:58:48 »
{(!(canmove _x) or !(canfire _x)) and "Man" counttype [_x] == 0} count thislist == (count thislit) - ("Man" counttype thislist)

Let's break this code down into its two halves.   The right hand side is

(count thislist) - ("Man" counttype thislist)

which counts the number of units in thislist (which as you know is the array of units that would fire the trigger) that are not type man.   I.e., it returns the number of vehicles in the trigger area.   Vehicles count as one (I think) so if you remove "man" from the count you are left with the vehicles.

The left hand side is the rest

{(!(canmove _x) or !(canfire _x)) and "Man" counttype [_x] == 0} count thislist

My scripting is not good enough even to be sure I understand this correctly, never mind assert whether it works or not.    However, I think it will return the number of units in thislist (which as you know can be either men or vehicles) which are both a) not men (i.e. are vehicles) and b) can either not fire or not move.

_x refers to a single element in the array thislist.    The only _x which will return 1 rather than 0, when processed by this command, is a vehicle which can either move or fire.


So in other words you are correct Avon, in saying that the "man" part is required to remove the man types from the equation, leaving only vehicles.   If you want to check on vehicles that can neither move nor fire, then I suspect you want

{(!(canmove _x) and !(canfire _x)) and "Man" counttype [_x] == 0} count thislist

But as I say this is at my limits so I'm not absolutely sure.

IMHO Planck is right that there is a typo (thislit instead of thislist).

« Last Edit: 06 Sep 2004, 23:00:19 by macguba »
Plenty of reviewed ArmA missions for you to play