UnsyncedCtrl Lua Interface to have sight without units
Posted: 10 Apr 2014, 20:19
Hello!
I feel a need for this feature:
A new gadget callout, Spring.GiveSightInRect(number x1, number z1, number x2, number z2, number teamID, number level, number duration )
- Where x1,z1 to x2,z2 define the reactangular area where sight will be given.
If it's easier to implement a Spring.GiveSightInCyl(x, z, r, ...), no problem (as long as I can give map-wide sight without crashing or choking Spring)
Or maybe even both rectangle and cylinder, idk.
- Where teamID is which team to update the sight of. Would be sweet to have some ways to say "all team", but then special cases can be such a burden, maybe it's for the better to have to use a for loop on all teams in gadgets that give sight to all teams.
- Where level is the kind of sight to provide. Something like:
1 : Heightmap and features only
2 : plus radar and sonar
3 : plus ghost units
4 : live units and live projectile
Or whichever distinction between levels of sight makes sense, I'm not really sure how many the engine handle.
- Where duration is how long to keep providing sight after the callout. If implementable. Otherwise I guess we can have gadget repeating the command every tick. It would be probably more intuitive to have duration in seconds, but I guess ticks would be okay too. The default value should be 0, or maybe 0 should still be one tick in case the engine needs a tick to take the sight into account. Then I recall sight is updated on slower ticks than the rest? Anyway, use which default value and time units that are sensible. Or axe it if too bloatfull to add engine side.
Most immediatly, I would use it to let all player see new heightmap and new geovents layout in my map altering gadgets.
Then I would add a game option of no fog of war, full sight always everhwere.
But the power to add localised reveal special abilities would be welcomed by many modders.
I feel a need for this feature:
A new gadget callout, Spring.GiveSightInRect(number x1, number z1, number x2, number z2, number teamID, number level, number duration )
- Where x1,z1 to x2,z2 define the reactangular area where sight will be given.
If it's easier to implement a Spring.GiveSightInCyl(x, z, r, ...), no problem (as long as I can give map-wide sight without crashing or choking Spring)
Or maybe even both rectangle and cylinder, idk.
- Where teamID is which team to update the sight of. Would be sweet to have some ways to say "all team", but then special cases can be such a burden, maybe it's for the better to have to use a for loop on all teams in gadgets that give sight to all teams.
- Where level is the kind of sight to provide. Something like:
1 : Heightmap and features only
2 : plus radar and sonar
3 : plus ghost units
4 : live units and live projectile
Or whichever distinction between levels of sight makes sense, I'm not really sure how many the engine handle.
- Where duration is how long to keep providing sight after the callout. If implementable. Otherwise I guess we can have gadget repeating the command every tick. It would be probably more intuitive to have duration in seconds, but I guess ticks would be okay too. The default value should be 0, or maybe 0 should still be one tick in case the engine needs a tick to take the sight into account. Then I recall sight is updated on slower ticks than the rest? Anyway, use which default value and time units that are sensible. Or axe it if too bloatfull to add engine side.
Most immediatly, I would use it to let all player see new heightmap and new geovents layout in my map altering gadgets.
Then I would add a game option of no fog of war, full sight always everhwere.
But the power to add localised reveal special abilities would be welcomed by many modders.