Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > IL-2 Sturmovik: Cliffs of Dover > FMB, Mission & Campaign builder Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 08-30-2012, 05:00 PM
frantic69 frantic69 is offline
Approved Member
 
Join Date: Mar 2010
Posts: 17
Default Player Health

Hello,

I checked a lot of the DLL methods but I can't see how to read and set the player's health level. Does anyone have any information regarding this point ? If you have a little script example, that will be perfect.

Thanks
Reply With Quote
  #2  
Old 08-30-2012, 05:26 PM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

You can't set the health level, only read:
float Health { get; }

Example Code
Code:
AiPerson singlePlayer = GamePlay.gpPlayer() as AiPerson;
GamePlay.gpLogServer(null, "Person Health: {0}", new object[] { singlePlayer.Health });
Reply With Quote
  #3  
Old 08-30-2012, 06:30 PM
frantic69 frantic69 is offline
Approved Member
 
Join Date: Mar 2010
Posts: 17
Default

Hello Kodiak,

Thank you for the information. Understood about the fact that it is impossible to set the player's health but, from your point of view, how do you think the game manage the player when he is wounded ? I mean, when you get hit, you see red (if not completely dead). So I think this is managed somehow ?
Reply With Quote
  #4  
Old 08-30-2012, 06:45 PM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

If a player (AiPerson) is wounded
Code:
public override void OnPersonHealth(AiPerson person, AiDamageInitiator initiator, float deltaHealth)
{
    base.OnPersonHealth(person, initiator, deltaHealth);
       
}
is called. deltaHealth is the value how strongly the person is wounded.
Reply With Quote
  #5  
Old 08-30-2012, 07:05 PM
frantic69 frantic69 is offline
Approved Member
 
Join Date: Mar 2010
Posts: 17
Default

thank you Kodiak. It should have been nice to be able to set freely the player health or wounded level but it already have the method you specified.

Thank you
Frantic
Reply With Quote
  #6  
Old 08-30-2012, 08:35 PM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

You can damage the aircraft but not the player via script
Reply With Quote
  #7  
Old 08-30-2012, 10:23 PM
Smokeynz Smokeynz is offline
Approved Member
 
Join Date: Apr 2011
Posts: 106
Default

Yes break the wings off and soon the pilot health will be poor
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:13 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.