Eoc modding newbie question
Re:
20 years 10 months ago
Yepp, POG is indeed getting much easier once you got your first script running
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?
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.
Re:
20 years 10 months ago
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
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.
Re:
20 years 10 months ago
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?
However, I've noticed another thing that is obviously handled rather complicated (surprise
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.
Re:
20 years 10 months ago
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.
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.













