OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: SEAL84 on 15 May 2007, 20:37:13

Title: Waypoints and building positions
Post by: SEAL84 on 15 May 2007, 20:37:13
If I give a unit a waypoint to move into a building and go to a certain position, why doesn't it ever register as completed even when he's finally standing at his destination?  I thought I'd try making a unit move into one of the big hotel buildings and fire a script from the waypoint when he got to a room, but nothing happens...I can't even run any of the usual waypoint cinematic options...it's as if the game doesn't realize that he's at the waypoint at all.

I never tried this in OFP, so I dunno if this has always been the case, or what.  Any ideas?
Title: Re: Waypoints and building positions
Post by: Mr.Peanut on 15 May 2007, 21:21:11
Are you saying that the code in the On Activation of the waypoint never fires?
Title: Re: Waypoints and building positions
Post by: Mandoble on 15 May 2007, 21:27:02
What type of WP are you using? Remember that wayponits execute their corresponding scripts when they are done, and some waypoints are never "done", like "HOLD" type ones.
Title: Re: Waypoints and building positions
Post by: Mr.Peanut on 15 May 2007, 21:42:34
But whatever is in the On Activation should fire. If he has used a scripted waypoint after a hold waypoint then if the waypoint never completes the scripted waypoint will never run.
Title: Re: Waypoints and building positions
Post by: SEAL84 on 15 May 2007, 21:47:25
It's a standard 'Move' WP, I'm aware of the fact that some WPs will never 'finish.' :whistle:

And yes, as far as I can tell the 'on activation' code does not fire, nor will any options you pick out of the waypoint's drop-down menus, like text or sounds.  Example: I place a RACS rifleman named "rifle" on the street outside a hotel.  I first give him a WP someplace out on the street, it's 'on activation' code has rifle globalchat "hi" in it.  When he reaches his WP he in fact says 'hi."  So now I delete that WP and place an identical one on the hotel building, telling him to move to house position #10.  He runs inside and stands there - and doesn't globalchat - despite the fact that the same code is in the waypoint field.

I discovered this while trying to run a script from the on activation field but this simple example should show you exactly what's up.
Title: Re: Waypoints and building positions
Post by: Mr.Peanut on 15 May 2007, 22:42:47
If you add another waypoint after the one in the house, say one outside, does the unit proceed to it or does he stay stuck in the house?

If he does proceed to the next waypoint then do this.
1) Change the new WP type to Scripted
2) Take the code from the On Activation and put it in a script called
wpscript.sqs
3) In the script name field for the scripted WP put wpscript.sqs (no quotes required)

This (http://www.ofpec.com/forum/index.php?topic=13884.0) is an excellent thread on scripted waypoints by Chris Death, though the attachments seem to be lost.
Title: Re: Waypoints and building positions
Post by: SEAL84 on 15 May 2007, 22:58:48
Nope, he stays stuck in place.
Title: Re: Waypoints and building positions
Post by: dematti on 15 May 2007, 23:28:03
looks like a bug to me
Maybe try another position (or building)
Title: Re: Waypoints and building positions
Post by: Mandoble on 16 May 2007, 00:06:13
You may try to run a script in the backgroup giving you hints about distance between unit and that waypoint position. Check distance when the unit is supposedly where it should be.
Title: Re: Waypoints and building positions
Post by: johnnyboy on 16 May 2007, 00:31:26
I've had this problem with some buildings, but not others.  In a farmhouse near Bagango, I've moved a unit through seven positions in a house, and then exited the building, no problem.  In the apartment buildings in Bagango, units seem to get stuck after moving to first building position.
Title: Re: Waypoints and building positions
Post by: Mr.Peanut on 16 May 2007, 03:22:55
SEAL, you should make a note of which building and position it is and report this as a bug to BIS.