Author Topic: Event problem  (Read 1981 times)

0 Members and 1 Guest are viewing this topic.

Offline 666maslo666

  • 28
  • Artificial Neural Network
I tried to make a freighter (Abydos) ferry passengers from and installation (Elpis) to a Drydock and back continuously. Here is the event:

Code: [Select]
$Formula: ( when
   ( <
      ( distance
         "Abydos waypoint:1"
         "GVFr Abydos"
      )
      200
   )
   ( clear-goals "GVFr Abydos" )
   ( add-goal
      "GVFr Abydos"
      ( ai-dock
         "Drydock"
         "docking point"
         "blahblah"
         89
      )
   )
   ( add-goal
      "GVFr Abydos"
      ( ai-undock 79 )
   )
   ( add-goal
      "GVFr Abydos"
      ( ai-dock
         "Elpis Installation"
         "docking point"
         "topside docking"
         69
      )
   )
   ( add-goal
      "GVFr Abydos"
      ( ai-undock 59 )
   )
   ( add-goal
      "GVFr Abydos"
      ( ai-waypoints-once
         "Abydos waypoint"
         55
      )
   )
)
+Name: Abydosjourney
+Repeat Count: 1
+Trigger Count: 99999
+Interval: 60


Proximity to Abydos waypoint should trigger Clear Goals for Abydos, and add Dock with Drydock, Undock, Dock with Elpis Installation, Undock, and Waypoint once to Abydos waypoint goals. Then the cycle repeats.

Instead the freighter only docks and undocks with the Drydock in a loop, it wont dock to the Elpis installation nor proceed to the waypoint.
"For once you have tasted flight you will walk the earth with your eyes turned skywards, for there you have been and there you will long to return." - Leonardo da Vinci

Arguing on the internet is like running in the Special Olympics. Even if you win you are still retarded.

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
If the Abydos is still within 200 meters of the waypoints after 60 seconds, it will begin the whole cycle from the top as the event repeats again.

Do you just need to increase the interval time?

 

Offline 666maslo666

  • 28
  • Artificial Neural Network
If the Abydos is still within 200 meters of the waypoints after 60 seconds, it will begin the whole cycle from the top as the event repeats again.

Do you just need to increase the interval time?

Nope, I already tried to increase it up to 600 seconds with no effect, and the Abydos is obviously much further than 200 meters even by 60 seconds.
"For once you have tasted flight you will walk the earth with your eyes turned skywards, for there you have been and there you will long to return." - Leonardo da Vinci

Arguing on the internet is like running in the Special Olympics. Even if you win you are still retarded.

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Try removing the trigger count and see if it can execute the entire cycle successfully just once.

 

Offline 666maslo666

  • 28
  • Artificial Neural Network
Try removing the trigger count and see if it can execute the entire cycle successfully just once.

No change, just endless cycle of dock and undock.. 
"For once you have tasted flight you will walk the earth with your eyes turned skywards, for there you have been and there you will long to return." - Leonardo da Vinci

Arguing on the internet is like running in the Special Olympics. Even if you win you are still retarded.

 

Offline 666maslo666

  • 28
  • Artificial Neural Network
Test mission with similar event attached. The same problem is present.

[attachment deleted by ninja]
"For once you have tasted flight you will walk the earth with your eyes turned skywards, for there you have been and there you will long to return." - Leonardo da Vinci

Arguing on the internet is like running in the Special Olympics. Even if you win you are still retarded.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Interesting. I think I'm going to have to step through this and see exactly which orders the ship is getting in the end.

I'm pretty sure your problem is that you're trying to do everything in one event and hoping that the priorities you've given will make things work properly.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline ReeNoiP

  • 27
  • I FRED
I think the problem is that the freighter still have the goal to dock once it undocks (you clear goals, then give it a bunch of new goals).

It docks ->dock goal is complete but still "in effect"->second highest priority undock triggers->it undocks, meaning the dock goal (which is still in effect) is no longer completed so->it docks

Repeat forever.

You could try setting up two sexps  which tells the ship what way to go. Something like:

Code: [Select]
SEXP 1
when delay
whatever time you want
ship is docked with target 1
clear goals
add goal
undock
dock with target 2

SEXP1
when delay
whatever time you want
ship is docked with target 2
clear goals
add goal
undock
dock with target 1
Uncharted Territory is released. But I still need voice actors

 

Offline 666maslo666

  • 28
  • Artificial Neural Network
I have broken up the event into two with three add-goals each. Now it works correctly. Too many orders for one ship in a single event is thus probably not a good idea..  :nono:
"For once you have tasted flight you will walk the earth with your eyes turned skywards, for there you have been and there you will long to return." - Leonardo da Vinci

Arguing on the internet is like running in the Special Olympics. Even if you win you are still retarded.