Jump to content
Luft08

Should Guard waypoint and createGuardedPoint be avoided??

Recommended Posts

I was thinking about using createGuardedPoint with the guard waypoint but the docs say that it uses an objectMapID and I have read that objectIDs are not reliable and should not be used because they can change with a map update.

 

Are the objectIDs that moricky was talking about the same as "objectMapID"s that the createGuardedPoint takes as one of it's parameters?

 

 

 

Share this post


Link to post
Share on other sites

it can use objectMapID, but its either position, object or objectMapID 

  • Like 2

Share this post


Link to post
Share on other sites

To expand upon /kyu's comments:

 

Quote

Description:

Adds a point guarded by the given side (scripted way of adding equivalent of "GUARDED BY" trigger in Editor). A closest AI group in the given side with assigned "GUARD" waypoint will attempt to secure this guard point. The actual guarded position is determined via the following rules:

  • Given "position" is always considered. It could be Object, Group, Position2D or Position3D. In every case, z coordinate will be ignored and point will be placed on nearest surface.
  • If "objectMapID" is not negative, the position of the object with the given ID is used (Overrides "position"). -1 to ignore this argument. z of the object position will be intact.
  • If the given "vehicle" is valid, the position of the vehicle is extracted and guarded (Overrides both "position" and "objectMapID"). objNull to ignore. z of the vehicle position will be intact.

 

So to create a point using just a position (which could be an editor-placed or spawned object, a group, or a set of coordinates):

createGuardedPoint [west, [123,456,7], -1, objNull]; //z-coordinate (7) will be ignored

or to use an object:

createGuardedPoint [east, [0,0], -1, enemyCacheCrate]; //z-coordinate of crate will be used, useful if on second floor/roof/etc.
  • Like 2

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×