Jump to content

Recommended Posts

Posted (edited)

I want  some ships to enter a bay but there was a low wooden bridge blocking them.  I removed the bridge and replaced it with one from the 'Bridges' menu on the right of the View Port.  The ships pass under the span easily.  The plan was to destroy the bridge and deny access to the incoming ships.
I adjusted the durability of the main span and was able to knock it down.  However, there is no collision box for the downed span and the ships passed right through.
So how can I set up some logic to have the ships stop if the bridge is destroyed?
I have made the span a linked entity so it can send an event message but am not sure what coalition to assign it to and where to send an 'On Damaged' event message to.
What do I need to do to accomplish this?

The manuals example of using Force Complete relates to stopping aircraft from attacking an object.  I need a ship to stop if the bridge is destroyed.

 

A link to an example, a video or a sample mission would be fine.  I can look at it to see how to set it up. I think.

 

Here's the setup as it is now;

Bridge Damage.jpg

Edited by Beebop
Posted

Here's one way to do it (I have not tested though):

 

StopIfBridgeDown.png.04e0d81b792c41baca8bfb2cf6a4d5a6.png

 

Create an OnKilled event message from the bridge to the "Bridge Down" deactivate trigger.

 

Normally, when the ship reaches WP1, the waypoint triggers the 0s timer, which in turn triggers WP2. 

 

If the bridge is destroyed, "Bridge Down" deactivates the 0s timer, preventing WP2 from being triggered.

 

 

  • Thanks 1
  • Upvote 1
Posted

THANK YOU!

Just what I was looking for.?

 

Posted (edited)

Hmmm, I must have done something wrong.

I (think I) set it up as you described but the lead ship stopped at mission start.  The two ships behind wouldn't pass the lead ship and wallowed about and didn't move forward.

I destroyed the bridge and the ships remained stalled.  I finally sunk the first ship then the two behind began to move forward but...when they got to the birdge they passed right through the damaged span without stopping.

I am unsure of where I went wrong.

 

Here is how I set up the logic.   Although the bridge is an linked entity, (you can't send Event Messages otherwise) I have not set a Coalition.  Being as it's in enemy territory it would be an "enemy" bridge (?).  Could that have anything to do with it?

 

(Ship and Ship WP1 condensed to fit in window)

 

NEVERMND.  I See my error.  DOH!?

 

Faulty Logic.jpg

 

 

Umm, didn't work.  ?  I deleted the Target Link from Ship WP1 to Deac MCU and reset it to the Zero Second Timer.  Same result.  Ships don't move forward.

Should there be a Force Command somewhere in the logic?

Edited by Beebop
Posted (edited)

I finally figured it out.⚠️

 

I don't know what was wrong with your logic Jim, it seemed to make sense.  But no matter how I tried to juggle it, the ships would not move at mission start although the logic was set up correctly to do so.

When I disabled the Target Link from Ship WP1 to the Zero Second Timer they would move.

Suddenly I had an epiphany.  I removed the Zero Second Timer, moved Ship WP3 up to the other side of the bridge and Target Linked the Deac MCU to it.  I destroyed the bridge and the ships kept moving until they reached WP2.  At that time they got a "message" that WP3 was deactivated and stopped.  WOO-HOO! :dance:

See Screenshot.

 

Just let me say that although "I" solved the problem, without your help Jim I would still be wondering how to do it.  Thanks to your suggestion I got to thinking how to make it work.  So, in a roundabout way, I credit you with helping me solve this problem.  THANK YOU!  Plus, I learned something more about using the Mission Editor.

Bridge Solution.jpg

Edited by Beebop
  • Upvote 1
Posted

Nice catch. I've been using timers as gates a lot so I didn't think to keep it simple by deactivating the waypoint.

 

My original (much too complicated) logic does work though. Here is the full test setup in case you were wondering:

 

StopIfBridgeDown-Full.png.a2e402cab2001f9b7945ac6feede4514.png

  • Thanks 1
Posted

Thanks Jim.  I'll copy the screenshot and put it in my "Mission Building Encyclopedia" for future reference.  I'm sure it will work in many other situations involving blocking movement of various objects..

 

And BTW, saw your post saying you are working on updating and revamping the Mission Editor Manual.  ? Another THANK YOU for doing that.  I know I will appreciate the updated/added knowledge as well as others.

Posted
23 minutes ago, Beebop said:

And BTW, saw your post saying you are working on updating and revamping the Mission Editor Manual.  ? Another THANK YOU for doing that.  I know I will appreciate the updated/added knowledge as well as others.

 

That's the rumor.

 

Oh, and bigfoot is real. ?

Posted
6 hours ago, Thad said:

 

That's the rumor.

 

Oh, and bigfoot is real. ?

 

...and he works in a soup shop in Manhattan.  ;)

  • Like 1
Posted

@JimTMA difference between your version and the OP's is that if the bridge is destroyed after the ship touches WP1, it won't stop the ship from moving to WP2.

On the screenshots, it seemed that the first ship was initially within the radius of WP1 (which I would advise against doing. Not sure if WP1 would be triggered properly). It's likely then that OP was in the situation I described.

Posted
7 hours ago, coconut said:

@JimTMA difference between your version and the OP's is that if the bridge is destroyed after the ship touches WP1, it won't stop the ship from moving to WP2.

...

 

Good point. However, with the OP's version here, if the bridge goes down after the ship has passed it, the ship will stop. I guess it depends on how you want to time the bridge destruction. If you wanted to accommodate all scenarios, you could add a check point trigger at the bridge to detect when the ship has passed and then shut down the waypoint deactivate logic. 

Posted

So, during the mission what happened with my logic is when the bridge wasn't destroyed the ships still stopped but at Waypoint 3, after passing under the span.

So I tried your full logic Jim and what happens is the bridge self destructs about 15 seconds after mission start, (which makes sense based on the timers) and the ships pass through the damaged span.

?

Again your logic looks impeccable. 

I am using three ships in an Off Road User Formation (line astern).  Could that have anything to do with this malfunction?

If so and I make three separate ships w/waypoints I assume all three would need to have their Waypoint 1 tied to the Logic Tree(?).

 

If I can't solve it then I will remove the bridge as a target and just let them pass through and make the ship convoy the target. 

I liked the idea of bridge busting and it affecting the mission.  (Turns out that one of the guys I fly with is an awesome bridge buster!)

 

Any help appreciated and if there is no solution, thanks for trying.

Posted (edited)
23 minutes ago, Beebop said:

So, during the mission what happened with my logic is when the bridge wasn't destroyed the ships still stopped but at Waypoint 3, after passing under the span.

So I tried your full logic Jim and what happens is the bridge self destructs about 15 seconds after mission start, (which makes sense based on the timers) and the ships pass through the damaged span.

?

Again your logic looks impeccable. 

I am using three ships in an Off Road User Formation (line astern).  Could that have anything to do with this malfunction?

If so and I make three separate ships w/waypoints I assume all three would need to have their Waypoint 1 tied to the Logic Tree(?).

 

If I can't solve it then I will remove the bridge as a target and just let them pass through and make the ship convoy the target. 

I liked the idea of bridge busting and it affecting the mission.  (Turns out that one of the guys I fly with is an awesome bridge buster!)

 

Any help appreciated and if there is no solution, thanks for trying.

 

I only posted my full logic so you could learn what you may have done wrong on your first attempt. You're revised logic is simpler, although the ship would stop if the bridge went down after the ship had passed.

 

You will need to zip and post your current mission for someone to look at.

Edited by JimTM
Posted

OK.  Here's the mission. 

Just the bridge, destruction logic and the ship convoy.  Took out everything else so it will load faster.

Airstart and F12 Camera aimed at bridge included.

It's a Dogfight Mission.

Bridge Destruction.zip

Posted

I redesigned the scenario to use a Formation command set to "Stop". Unzip the missions to your /mission folder (or a subfolder of that).

 

The missions are currently set to destroy the bridge before the ship reaches WP1. You can adjust the setup for the various scenarios.

 

Simple Setup

 

JimTM - Test Stop Ship if Bridge Down - v3e.zip

 

Here's what will happen:

  • If the bridge is destroyed before the ship reaches WP1 (just past the bridge), the ship stops immediately.
  • If the bridge is destroyed after the ship reaches WP1, the ship continues to WP2.

Complex Setup

 

JimTM - Test Stop Ship if Bridge Down - v3b.zip

 

Here's what will happen:

  • If the bridge is destroyed before the ship reaches WP1 (just before the bridge), the ship stops at WP1.
  • If the bridge is destroyed after the ship reaches WP1, but before WP2 (just past the bridge), the ship stops immediately.
  • If the bridge is destroyed after the ship reaches WP2, the ship continues to WP3.

 

  • Thanks 1
Posted

Thank you Jim.

I am continually amazed at the level of help I receive around here.

And TWO versions  ⚠️  

THANK YOU!

 

Posted

I put the missions in my 'Mission' folder and  ran a quick test as an observer only.
This is what I saw:

 

Mission 3b:
Bridge destroyed at same time as ship moves.
Ship moves to WP1 and stops just short of the span.

 

Mission 3e:
Bridge destroyed at same time as ship moves.
Ship stops immediately.

 

So both missions act according to destruction logic, that is the ship stops at either WP1 (3b) or before WP1 (3e).

3b would be fine for my purposes but why is the bridge destroyed when ship is enabled in both versions?   I need the player to destroy, or not, the bridge, not the game.

Posted
2 minutes ago, Beebop said:

I put the missions in my 'Mission' folder and  ran a quick test as an observer only.
This is what I saw:

 

Mission 3b:
Bridge destroyed at same time as ship moves.
Ship moves to WP1 and stops just short of the span.

 

Mission 3e:
Bridge destroyed at same time as ship moves.
Ship stops immediately.

 

So both missions act according to destruction logic, that is the ship stops at either WP1 (3b) or before WP1 (3e).

3b would be fine for my purposes but why is the bridge destroyed when ship is enabled in both versions?   I need the player to destroy, or not, the bridge, not the game.

 

The bridge destruction logic (20s after the first waypoint is triggered) is just for test. You can remove that logic for a real mission, where the player can destroy the bridge.

 

Posted

Ahhh.  Thanks.

Posted

You're welcome Beebop. Anchors away!  :)

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...