Nexus Modding > Scripting

The AI and You

<< < (2/20) > >>

Mularac:
1- if the ship has been wrecked, then no, it can't be done.

2- Creating a list is only one way. You can issue the command to an individual ship, from wherever you got that ship's identifier, but I found myself using lists and selections 90% of the time.

Edit for 2:
Yeah, that's very easy to do.
first, you need to store the ships that are to jump on a list, because I'm guessing that until they are called they'll remain dissaperead, right? (disappeared ships can't be selected)

So add this line in your sceneInit rule:


--- Code: ---raptors := GetFreeSel();
selectShips(raptors, s.race = #race_raptor (or whatever race they are));

--- End code ---

Then disappear the ships that you know will appear as reinforcements later on.

Then, keep an eye out for the event that all raptor ships have been taken out:


--- Code: ---Rule Event FatalDamaged
condition e.ship:race=#race_raptor
:action
e.count := selectShips(0, s.race=#race_raptor);
if(e.count = 0,
m:Execlist(m.raptors, longRangeArrive(s.this)); //The M:execlist goes because the list raptors is stored in the mission block, and as such can only be accesed that way.
);
:end
END

--- End code ---

The_Small_Time_Modder:
Is it the same for a dynamic group? i put the ships in a dynamic group instead of having them dissappear in the coding. Or is it even possible with a dynamic group?  ???

Mularac:
What do you mean a dynamic group?

The_Small_Time_Modder:
In the editor you can have a group of ships/objects become a dynamic group, it says so right in the modding manual...
i can even give you the page # and section.

Pg. 56  section 7.2.8

the result is that the objects dissappear from the game unless (i assume) called for by an event from the scripts.

Mularac:
oh yeah... the mystic dynamic block. I've been modding this game for about... 4 years now? and I still don't how the heck to work with that :P

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version