Jump to content

Create units for existing group


Igneous01

Recommended Posts

Looking at the hoggit wiki and the unit class, I don't see any methods for creating units and adding them to existing alive groups - is it possible?

 

I'd like to start working on an ai caching script but I'd need the ability to create / delete units apart of an existing group (and keep group leader alive at all times).

Developer of Kaukasus Insurgency - a customizable Dynamic PvE Campaign with cloud hosting and stats tracking. (Alpha)

 

http://kaukasusinsurgency.com/

Link to comment
Share on other sites

Unfortunately not. You can spawn in a new group using information from the old group without causing much issues. But they would effectively be a new group with full HP, ammo, and won't inherit their current tasking information. Being able to join/split or spawn units into groups was requested pretty much along with the dynamic spawning of groups but was never implemented.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

Hmm, my problem with despawning/respawning the entire group is that there is noticeable lag when you do it (say 6 or more units in group). If there was a way to thread the spawn so that it doesn't interrupt the game itself that would be great.

Developer of Kaukasus Insurgency - a customizable Dynamic PvE Campaign with cloud hosting and stats tracking. (Alpha)

 

http://kaukasusinsurgency.com/

Link to comment
Share on other sites

Hmm, my problem with despawning/respawning the entire group is that there is noticeable lag when you do it (say 6 or more units in group). If there was a way to thread the spawn so that it doesn't interrupt the game itself that would be great.

 

Hi,

 

does your newly created units have waypoints that they advance towards on spawn? I've been spawning units (large groups) like this quite alot, but I can't remember that I've noticed lag because of it.

 

I have, however, noticed quite significant lag due to route calculations. If they have a waypoint on spawn, maybe that's what's causing the lag? If yes, I've solved the lag by dividing long routes up into smaller distances, where the groups only travel for a certain distance and their waypoint (destination) is updated on time intervals.

Link to comment
Share on other sites

Hi,

 

does your newly created units have waypoints that they advance towards on spawn? I've been spawning units (large groups) like this quite alot, but I can't remember that I've noticed lag because of it.

 

I have, however, noticed quite significant lag due to route calculations. If they have a waypoint on spawn, maybe that's what's causing the lag? If yes, I've solved the lag by dividing long routes up into smaller distances, where the groups only travel for a certain distance and their waypoint (destination) is updated on time intervals.

 

So if you delay setting the waypoint information, you can prevent stuttering?

 

In my scenario, I was testing the Dismount Script (i had 4 apcs with various cargo dismount) and there was noticable stutter for a few seconds (out of 4 spawned groups, only 2 had waypoints, and the waypoint was 200m in front of them, which is pretty short distance to compute)

Developer of Kaukasus Insurgency - a customizable Dynamic PvE Campaign with cloud hosting and stats tracking. (Alpha)

 

http://kaukasusinsurgency.com/

Link to comment
Share on other sites

That doesn't sound normal, performance wise. Spawning 4 groups and giving them a 200m route isn't noticeable in performance at all normally, you can set up a mission to do this and see. If you can repeat the problem consistently, send the miz file to MBot or the owner of the script (if it's not him) and ask.

So if you delay setting the waypoint information, you can prevent stuttering?

 

In my scenario, I was testing the Dismount Script (i had 4 apcs with various cargo dismount) and there was noticable stutter for a few seconds (out of 4 spawned groups, only 2 had waypoints, and the waypoint was 200m in front of them, which is pretty short distance to compute)

___________________________________________________________________________

SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *

Link to comment
Share on other sites

Sounds like hardware. But this is OT for the OP.

I've tried again, this time with simple trigger activation groups - noticeable stutter with 2 or more groups.

 

Also happens with MOOSE:Spawn. Any sort of spawning/late activation causes stuttering.

___________________________________________________________________________

SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *

Link to comment
Share on other sites

So if you delay setting the waypoint information, you can prevent stuttering?

 

Not exactly, my point was that shorter route calculations (not necessarily on delay) require less CPU time.

 

In my scenario, I was testing the Dismount Script (i had 4 apcs with various cargo dismount) and there was noticable stutter for a few seconds (out of 4 spawned groups, only 2 had waypoints, and the waypoint was 200m in front of them, which is pretty short distance to compute)

 

Okay, 200m is indeed very short. Then my tip won't help, sorry :(

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...