Search

Last Downloaded

zip-0Deep Space Infinite Batt
zip-1Earth Alliance Nova Clas

Login

Eoc modding newbie question

Cormorant's Avatar Topic Author
Semi-Beginner Semi-Beginner
  • Posts: 33
  • Thanks: 0

Re:

20 years 4 days ago
#14449
Yepp, POG is indeed getting much easier once you got your first script running :D Again, thanks to all of you who helped getting me started.

However, I've got a little question I couldn't find a solution for:
Is there a way to have the script check if a specific ship has been disrupted by a disruptor weapon?

Please Log in or Create an account to join the conversation.

MajorTom's Avatar
Junkie Junkie
  • Posts: 992
  • Thanks: 0

Re:

20 years 3 days ago
#14450
Hi Comorant, here you go, Straight from the pog SDK:

prototype bool iShip.IsDisrupted( hship ship );
Parameters:
ship : A handle to a ship.
Return value:
TRUE if the ship is disrupted, FALSE otherwise.

The problem is probably more getting the handle to the ship, unless perhaps you're only interested in the player ship. For example:

if(!iShip.IsDisrupted(iShip.FindPlayerShip()))
{
<do stuff>
}


Iwar2 Multiplayer Fan Site

Please Log in or Create an account to join the conversation.

Cormorant's Avatar Topic Author
Semi-Beginner Semi-Beginner
  • Posts: 33
  • Thanks: 0

Re:

20 years 21 hours ago
#14459
Thanks again!

However, I've noticed another thing that is obviously handled rather complicated (surprise ;) ): Returning a vessel's current damage.
I'd like to check if a given ship has already taken a certain amount of damage, but I haven't found a comprehensive example yet. One of the PS scripts seems to be dealing with damage to a given sim (a reactor), but I'm not too sure if this is what I'm looking for.
Just to make sure, there is no easy one-liner returning the damage of a sim at a certain point in the script, right?

Please Log in or Create an account to join the conversation.

GrandpaTrout's Avatar
King of Space King of Space
  • Posts: 1135
  • Thanks: 0

Re:

20 years 13 hours ago
#14464
Yeah, nothing straight forward. Lucky for us the hit_points are accessable as an object property.

hit_points = Object.FloatProperty(ship,"hit_points");

There are some property names hiding in the package descriptions. Check out Sim and iSim. Read iSim carefully, it has a wealth of useful functions and properties.

Please Log in or Create an account to join the conversation.

Cormorant's Avatar Topic Author
Semi-Beginner Semi-Beginner
  • Posts: 33
  • Thanks: 0

Re:

19 years 11 months ago
#14474
More thanks :D That really helped to figure it out.

Please Log in or Create an account to join the conversation.