Nexus Modding > Scripting

Behavior 4 as a 'holding pattern'

<< < (2/3) > >>

Keldane:
I agree on both points, Mularac. I was picturing something along the lines of starting centered on the nav point, having three or four AI ships drop in right in front of the camera, and then have a dramatic sweep down the corridor of waiting ships to the point where the player's ships are moving from.

Arparso:
Actually, "asteroid ships" do have a crosshair. It only appears when being zoomed out quite a bit, though. ;)

The biggest problem with this approach for me is the appearance of ships with behaviour 4: their lights will be turned off and they won't animate or move, which makes them appear dead. That's great for wreckyard-turned-trap missions, but not so useful, if you want to create a menacing enemy fleet in the background. For the player to actually see the ships, you'd have to be near enough to them to recognize them being "dead".

You might be able to work around the lights-off- and no-animation-issue with not assigning a race to the ship. Like explained here, the ship wouldn't turn off its lights or default animation when being not assigned to a race. They'd still not move anywhere, but at least they should look more menacing that way. I believe, there's a way to later assign them the correct race while "activating" them to join the battle.

The Old Dragon:
I think you can change an objects race with the following...

Obj:race:=#race_******;

(Amend red sections with your details)

Keldane:
So if I'm not assigning a race to the waiting ships at the start, what would be the best way to figure out which one is the closest to the player's main ship and change its behavior?

Arparso:
Assuming m.playerShip is the player's ship you want to check against, something like that should work:


--- Code: ---// get new selection and fill it with behaviour-4-ships, but not asteroids
e.inactiveEnemies := GetFreeSel();
Select(e.inactiveEnemies, s.behaviour = 4 & Not(s.class >= 99 & s.class

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version