Announcement

Collapse
No announcement yet.

Trigger question

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Trigger question

    I am in the process of making a mission where you have to destroy a few buildings then extract.

    I am using this code which works fine for object 234882 but I can't figure out how to add the other two codes in 234689 and 375082 so it makes you destroy all three hangers.

    Code:
    damage (position player nearestObject 234882) >= 1
    Also if I want another objective after that what do I put in the on act so it takes you to the next objective.

    Any help is appreciated, been searching all morning and haven't found anything.

  • #2
    Re: Trigger question

    Well, I haven't tried writing scripts for ArmA yet, but maybe some OFP knowledge can help.
    How about:
    Code:
    ? damage (position player nearestObject 234882) >= 1 AND
    damage (position player nearestObject 234689) >= 1 AND
    damage (position player nearestObject 234882) >= 1 THEN (used in ArmA?)
    “1” ObjStatus “DONE” AND set objective1complete to 1;
    The last part was a variable I named myself - you can call it whatever (use it to determine when the mission should end). Not sure if the set thing belongs in ArmA ;)

    Comment


    • #3
      Re: Trigger question

      Originally posted by Turbo View Post
      I am in the process of making a mission where you have to destroy a few buildings then extract.

      I am using this code which works fine for object 234882 but I can't figure out how to add the other two codes in 234689 and 375082 so it makes you destroy all three hangers.

      Code:
      damage (position player nearestObject 234882) >= 1
      Also if I want another objective after that what do I put in the on act so it takes you to the next objective.

      Any help is appreciated, been searching all morning and haven't found anything.
      I only have the OFP command reference to go on, but let me take a shot at it.

      Hmm... unusual syntax you have in your code, I don't get it. Maybe you know something I don't about the nearestObject command, but I think it only returns the nearest object to a specified position (IE: player) and not an object from it's ID. Maybe you mean Object? Try this:

      Code:
      damage (Object 234882) >= 1
      Now add the other buildings:
      Code:
      (damage (Object 234882) >= 1)&&(damage (Object 234689) >= 1)&&(damage (Object 375082) >= 1)
      Does this help?

      Comment

      Connect

      Collapse

      TeamSpeak 3 Server

      Collapse

      Advertisement

      Collapse

      Twitter Feed

      Collapse

      Working...
      X