Home   Help Search Login Register  

Author Topic: Which is the current waypoint and can I change it?  (Read 1170 times)

0 Members and 1 Guest are viewing this topic.

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Which is the current waypoint and can I change it?
« on: 14 Aug 2004, 10:21:16 »
I am still trying to get my damn mission finished.  Last night I was giving it a 'final' run through and found a bug. that was not there the previous 3000 times or so that have played it.  It might be becasue it is quite a large mission and the  OF engine might be getting confused.

I have a switch trigger on a Seek and Destroy, Combat, Normal(Speed) waypoint that should send the group of soldiers to a Move, Aware, Normal (Speed) waypoint.  99.9 etc % of the time it does.  Last night it didn't.  This is not one of those 'features' that could add a bit of randomness to the mission, this switch is absolutely crucial to the mission.  As a piece of background information, this group is in contact with the enemy at the time the switch is activated, but that has not stopped it working before.

My question is:  From within a script is there a way I can tell which waypoint is the current one for a group and can I change it?

I have looked through the Comref but found nothing.  I may have missed something or there may be some undocumented instructions that people know about.

I would be truely grateful for any help on this.

olseric

  • Guest
Re:Which is the current waypoint and can I change it?
« Reply #1 on: 14 Aug 2004, 13:55:00 »
Not sure about finding the current waypoint, however, to make a unit move to a certain waypoint...

Code: [Select]
groupName move getWPPos [groupOne, 1]
Should work.  You may have to fiddle with the position to get the right syntax.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Which is the current waypoint and can I change it?
« Reply #2 on: 14 Aug 2004, 14:33:07 »
I have a feeling that there is no direct way of telling which waypoint is "active".      The way to change it is to use a trigger .... which doesn't really help.  ;D

Your problem sounds very odd.    How do you know it didn't work?     Is it possible that the trigger fired by the group decided to have a mind of their own and continue to hunt down the enemy for a bit?      Have you been able to replicate the problem?

In any event, delete the trigger completely.   Create a new one do to the same thing.    Triggers do occasionally go mad.

As a fix, create an extra move waypoint immediately before (and right next to) the original move waypoint and create an extra switch trigger synchroed to it.    Both triggers get fired by the same thing.     That should kick that pesky group to the right place, since if either trigger fires they will go there.
Plenty of reviewed ArmA missions for you to play

Offline The_Mark

  • Members
  • *
Re:Which is the current waypoint and can I change it?
« Reply #3 on: 14 Aug 2004, 18:32:55 »
Quote
Is it possible that the trigger fired by the group decided to have a mind of their own and continue to hunt down the enemy for a bit?

That's a possibility (the mindless AI somehow generates a mind just when you least expect it). To counter it, you could set the move-waypoints combat mode to open fire, that should make the AI to disengage.

You're not sure that something didn't screw up the triggers condition?

Actually one can tell a groups current waypoint by referring to a variable that is increased in On activation-field of the WPs. With a switch trigger you'd have to place the variable on the trigger.

Anyway, that might not be necessary to solve the problem.
Silent enim leges inter arma.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Which is the current waypoint and can I change it?
« Reply #4 on: 14 Aug 2004, 20:17:31 »
Quote
That's a possibility (the mindless AI somehow generates a mind just when you least expect it).
;D
Isn't this just the case usually ::)

Quote
I have a switch trigger on a Seek and Destroy...
Shouldn't the switch be on the waypoint before the S&D waypoint ...
(or perhaps you meant this... I'm just being pedantic... ::) )
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Which is the current waypoint and can I change it?
« Reply #5 on: 14 Aug 2004, 20:30:48 »
Quote
Is it possible that the trigger fired by the group decided to have a mind of their own and continue to hunt down the enemy for a bit?  

It is possible, but I left them a very long time to sort themselves out.  I have a sidechat message at the same time but it was triggered by the same condition in a separate trigger -  I have now moved the message to the switch trigger so I will know if the trigger activates in future.  The problem is it is ~2 hours into the mission!

Could it be that the officer has got himself stuck trying to run through a vehicle or building - I have seen that happen when he is at 90 degrees to the surface - and I have a solution, a script that detects a problem and then physically moves the guy.

Quote
Have you been able to replicate the problem?
No


Incrementing a counter at each waypoint is an interesting idea for knowing which is the active waypoint - but I also need to be able (from a script) to change the active waypoint.

For the time being I will:
- Delete and recreate the trigger.  
- Insert another waypoint that is also synchronised to the same trigger
- Dig out my script to physically force some of them to move if they haven't moved in a while.

It will take sometime.  As I said it is a long way into the mission and I have spent more time on OF this weekend than my family is comfortable with.

Thank you all for the useful ideas.  I will report back


« Last Edit: 14 Aug 2004, 20:38:46 by THobson »

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Which is the current waypoint and can I change it?
« Reply #6 on: 14 Aug 2004, 20:32:24 »
Quote
Shouldn't the switch be on the waypoint before the S&D waypoint ...

No.  The group are on search and destroy until the player gives them a radio instruction to disengage and go elsewhere.
« Last Edit: 14 Aug 2004, 20:33:50 by THobson »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Which is the current waypoint and can I change it?
« Reply #7 on: 14 Aug 2004, 20:53:56 »
In that case the trigger should be linked to a Cycle waypoint placed right next to the S&D waypoint.    Units on S&D will eventually stop Seeking and just stand there.

Your theory about the stuck officer is very plausible.  If its only happened once I wouldn't get too bogged down trying to fix it - families come before OFP.   Just.   ;D
« Last Edit: 14 Aug 2004, 20:54:59 by macguba »
Plenty of reviewed ArmA missions for you to play

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Which is the current waypoint and can I change it?
« Reply #8 on: 14 Aug 2004, 21:08:57 »
macguba:  I have put in an additional waypoint as you suggested but I have synchronised it with a different trigger. Same activation condition but with a 10 second delay, so two bites at the same cherry.  Edit: I have just re-read you post and realised you suggested a separate trigger anyway.

I hadn't realised that on completeion of an S&D waypoint the group just stood there - I hoped they would move to the next waypoint, which would be okay for my mission.  Am I correct in thinking that an S&D waypoint is only complete when no enemies have been found for a while?  If that is true then having them just stand about is also ok.  

Well I want to submit it so others can enjoy playing it as much as I do.  Also I won't enjoy it if it doesn't work properly - so I will fix it.  It will just take time.  Next week is hell at work and next week-end it is a wedding anniversary so I am looking at a couple of weeks or so.
« Last Edit: 14 Aug 2004, 21:17:22 by THobson »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Which is the current waypoint and can I change it?
« Reply #9 on: 14 Aug 2004, 23:28:10 »
When the S&D waypoint is complete the group will normally move on to the next waypoint.   However, since the waypoint is linked to a trigger, they won't move on till the trigger is fired.

I don't know how the game decides when a S&D waypoint is complete:  I suspect it is just based on time.
Plenty of reviewed ArmA missions for you to play

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Which is the current waypoint and can I change it?
« Reply #10 on: 15 Aug 2004, 01:14:48 »
Thanks.  I had not realised that.  

I knew a switch trigger forced the group to go to the next waypoint from wherever it happened to be.   I had not realised it was a requirement for moving to the next waypoint that the trigger had fired.  Though thinking about it, it is quite logical that is should work that way.  Anyway that is fine for my mission - they should stay where they are until ordered to move.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Which is the current waypoint and can I change it?
« Reply #11 on: 15 Aug 2004, 13:17:37 »
If you want a group to wait at a waypoint until the synchroed trigger is fired, then go to the next waypoint, then technically the trigger doesn't need to be type switch - any trigger will achieve this.    Type switch triggers are special because when one is fired the group will move from whereever they are onto the next waypoint.
Plenty of reviewed ArmA missions for you to play

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Which is the current waypoint and can I change it?
« Reply #12 on: 15 Aug 2004, 14:17:24 »
Actaully that is what I want.  The player should be able to get them to disengage even before they have reached this waypoint.

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Which is the current waypoint and can I change it?
« Reply #13 on: 16 Aug 2004, 11:45:48 »
I said I would report back later.  Well I can do it sooner than I had thought.  I had saved the mission prior to the problem occurring.  I had the chance to finish the mission again from that point and this time the problem did not re-occur.  So without making any changes to triggers etc. the problem occurred once but not a second time.  This now looks like a random ‘feature'.  Nevertheless I have deleted and recreated the old trigger, inserted an additional trigger with a delay and included a script that will detect when this problem occurs and physically relocate the offending units.  I can think of nothing else to do.  One more run through and I think the mission is done.