Jump to content
Sign in to follow this  
joltan

Querying unit & waypoint infos

Recommended Posts

Hi, I'm working ona script that analyzes a couple of given groups (only the group names must be given to the script) and then stores the information nescessary to spawn these units with most of their original properties (similar to ai on demand by CoC). Unfortunately I'm still figuring out how to obtain as much data on the groups as possible. Maybe some of you can provide some help with this:

Waypoints: I have the initial formation, formation position and direction, speed, behaviour and combatmode. I need: a way to obtain the same information for the group's waypoints placed in the editor, ideally including the type of the waypoints.

Units: I have the unit type, health status, skill and position. I need: a good way to obtain a units weapon/ammunition layout (if possible a function returning a command string that would equip a newly spawned unit with the exact same stuff). Also is there a way to query the rank of a unit?

Vehicles: I have the vehicle type, dammage status, position, crew and cargo slots. I need: maybe something to detect flying vehicles (very low priority, tho).

Share this post


Link to post
Share on other sites
Quote[/b] ]Waypoints: I have the initial formation, formation position and direction, speed, behaviour and combatmode. I need: a way to obtain the same information for the group's waypoints placed in the editor, ideally including the type of the waypoints.

Try the GetWPPos command, for the waypoint positions.

Quote[/b] ]Units: I have the unit type, health status, skill and position. I need: a good way to obtain a units weapon/ammunition layout (if possible a function returning a command string that would equip a newly spawned unit with the exact same stuff). Also is there a way to query the rank of a unit?

There is a function to return the rank, under development last time I checked.

http://www.ofpec.com/yabbse....d=19621

Quote[/b] ]Vehicles: I have the vehicle type, dammage status, position, crew and cargo slots. I need: maybe something to detect flying vehicles (very low priority, tho).

Vehicles that are currently flying or vehicles that can fly?

Share this post


Link to post
Share on other sites

If anything vehicles that are currently flying. It's not much work - I'd just have to also record the speed (not just the speed mode), grab the vehicles' vector and record that, too. ATM that's not as high a priority as getting more info on the waypoints. The waypoint positions are a start, tho. Thanks for the hint.

The weapon & ammo loadout is solved, thanks to another forum post I just read.

And thank you very much for the rank script - as I have the crew units I can query their rank directly ignoring the (basically 'rankless') vehicle. Didn't know the rating at mission start (which is exactly when I'll record it) represented the rank... Nice trick!

smile_o.gif

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
Sign in to follow this  

×