Previous Thread
Next Thread
Print Thread
Rate This Thread
Hop To
Page 2 of 2 1 2
#3386731 - 09/09/11 10:13 PM Re: New API in the Beta [Re: Bokononist]  
Joined: Jan 2009
Posts: 4,737
FearlessFrog Offline
Senior Member
FearlessFrog  Offline
Senior Member

Joined: Jan 2009
Posts: 4,737
Bokononist - that's not me in the dress. I'm on the right directing landing operations.



Inline advert (2nd and 3rd post)

#3386732 - 09/09/11 10:15 PM Re: New API in the Beta [Re: ATAG_Bliss]  
Joined: Jan 2009
Posts: 4,737
FearlessFrog Offline
Senior Member
FearlessFrog  Offline
Senior Member

Joined: Jan 2009
Posts: 4,737
Originally Posted By: ATAG_Bliss
Pretty cool stuff Frog!

----------------------------

Speaking of the joy of C+#+#+#+#+#+#+# stuff,

Could one of you gurus show me a script that would limit a human controlled aircraft to a certain amount of units available. Say I only want 3 109E4's available at all times, any chance of a script to do that?

With FBDj, it was super easy. Now not so much. But it would be nice to have a limited amount of certain planes, for balance etc.. In old IL2 with FBDj if you have 2 (262's) available. You could spawn 2 of them, and only when one of those 2 planes crashed/landed etc.(only after the refly button was hit) would the selection to be able to spawn another one open.

Sorry for the hijack, but I need something like this badly biggrin


I'll have a go at the weekend at this Bliss - probably Sunday. Is there an existing script to look at or are you just looking for some extra bits to see if it can limit aircraft type spawn?

#3386734 - 09/09/11 10:22 PM Re: New API in the Beta [Re: FearlessFrog]  
Joined: Jul 2010
Posts: 638
ATAG_Bliss Offline
Member
ATAG_Bliss  Offline
Member

Joined: Jul 2010
Posts: 638
Ataros told me to check out this mission: http://forum.1cpublishing.eu/showthread.php?t=25640 for ideas. I guess they are limiting squadron types with it?

But if C# wasn't already foreign enough to me the bits that state what each line does is in Russian! And those are the only bits that mean anything to me smile But it seems you know about the other bits biggrin (the code)

It's no big rush, but would be much appreciated. I think the blue pilots are going to come and burn my house down if I don't get a limit in there soon for the spitIIa's! lawncareby20mm

Thanks again!

#3386798 - 09/10/11 12:06 AM Re: New API in the Beta [Re: FearlessFrog]  
Joined: Feb 2001
Posts: 1,683
ATAG_Snapper Offline
Member
ATAG_Snapper  Offline
Member

Joined: Feb 2001
Posts: 1,683
Kitchener, Ontario, Canada
This API is gonna make CoD go to the dogs!!!! LOL


-------------------------------------------------------------------------------------------------

HP Omen Laptop 15, AMD Ryzen 5 5600H 16 GB DDR4 RAM, NVIDIA GeForce RTX 3060 Laptop GPU 6 GB VRAM Win 11 64 bit, Nvidia GeForce Driver ver 512.95, TrackIR 5, Gear Falcon Trim Box, Gear Falcon Throttle Quadrant, TM16000 joystick, TM Warthog HOTAS, CH Quadrant, Saitek Pro Combat rudder pedals
#3387077 - 09/10/11 01:01 PM Re: New API in the Beta [Re: FearlessFrog]  
Joined: Sep 2004
Posts: 10,618
Ming_EAF19 Offline
Babelfish Immune
Ming_EAF19  Offline
Babelfish Immune
Veteran

Joined: Sep 2004
Posts: 10,618
London
In FMB dot mis files an ambulance of interest is labelled-

0_Chief Vehicle.Austin_K2_Ambulance gb

-and a small journey is-

154934.13 253630.52 38.40 0 2 6.11 [northing, easting and height perhaps, with three more parameters]
155005.39 253798.09 38.40 [flat journey on the field]

Perhaps detecting a plane in trouble is ambitious right now Desiderata so- how to move that ambulance given what we now know. Sod all who said that but- close Smile2

Ming


'You are either a hater or you are not' Roman Halter
#3387106 - 09/10/11 02:12 PM Re: New API in the Beta [Re: FearlessFrog]  
Joined: Sep 2004
Posts: 10,618
Ming_EAF19 Offline
Babelfish Immune
Ming_EAF19  Offline
Babelfish Immune
Veteran

Joined: Sep 2004
Posts: 10,618
London
A plane on approach must cross some airfield-area radius perhaps, for a trigger to start the ambulance moving. That's the same sort of trigger that sets off the anti-aircraft defence. RoF FMB area-triggering is simpler to set up, did we ever think we'd say that Smile2

[Airdromes]
airdrome0 155322.00 253940.24 0 1000 700 0

(this above taken from within the Notepad-friendly dot mis file produced by the FMB - in my case ScriptingAmbulance.mis from my missions folder)

Its variable within the script will then perhaps be airdrome0 with the 1000 parameter there being 'Capture Radius' in the FMB and the 700 being 'Airdrome Radius'

Leaving damage aside for now for simplicity, just cross the radius/trigger the vehicle. To probably explode. Head meet ambulance Smile2

Ming


'You are either a hater or you are not' Roman Halter
#3387154 - 09/10/11 04:19 PM Re: New API in the Beta [Re: FearlessFrog]  
Joined: May 2010
Posts: 3,812
JAMF Offline
Frugalite & P-38 fan
JAMF  Offline
Frugalite & P-38 fan
Senior Member

Joined: May 2010
Posts: 3,812
The Netherlands
Originally Posted By: FearlessFrog
One of my longer term CoD aspirations (i.e. I won't really do it, too busy, but my subconscious fools me into thinking I will one day) is to do a glorious BoB Bunker Battle Overview map, i.e. be able to issue commands in MP via an external map view, with those long sticks to push planes, and I could sit back while minions issued radio commands to squadrons.

image

Would be cool, plus with this level of API not too challenging, from a technical level at least..


You are not alone. Here's an image I made almost a year ago:


Last edited by JAMF; 09/10/11 04:20 PM.
#3387447 - 09/11/11 02:41 AM Re: New API in the Beta [Re: FearlessFrog]  
Joined: Jan 2011
Posts: 283
Tell Offline
Member
Tell  Offline
Member

Joined: Jan 2011
Posts: 283
I installed the script in one of my missions and opened it in FMB. It compiled "OK" but I do not see a listing of the damages occurring even after I get the message that damage reporting is "On". What am I missing?

#3387452 - 09/11/11 02:48 AM Re: New API in the Beta [Re: Tell]  
Joined: Jan 2009
Posts: 4,737
FearlessFrog Offline
Senior Member
FearlessFrog  Offline
Senior Member

Joined: Jan 2009
Posts: 4,737
Originally Posted By: Tell
I installed the script in one of my missions and opened it in FMB. It compiled "OK" but I do not see a listing of the damages occurring even after I get the message that damage reporting is "On". What am I missing?


Do you have an info window that shows server messages (even in single player) as it uses that for output? Forgot to say - sorry.

#3387650 - 09/11/11 04:12 PM Re: New API in the Beta [Re: FearlessFrog]  
Joined: Jan 2011
Posts: 283
Tell Offline
Member
Tell  Offline
Member

Joined: Jan 2011
Posts: 283
Done. Thanks!

#3387961 - 09/12/11 12:23 AM Re: New API in the Beta [Re: ATAG_Bliss]  
Joined: Jan 2009
Posts: 4,737
FearlessFrog Offline
Senior Member
FearlessFrog  Offline
Senior Member

Joined: Jan 2009
Posts: 4,737
Originally Posted By: ATAG_Bliss
Ataros told me to check out this mission: http://forum.1cpublishing.eu/showthread.php?t=25640 for ideas. I guess they are limiting squadron types with it?

But if C# wasn't already foreign enough to me the bits that state what each line does is in Russian! And those are the only bits that mean anything to me smile But it seems you know about the other bits biggrin (the code)

It's no big rush, but would be much appreciated. I think the blue pilots are going to come and burn my house down if I don't get a limit in there soon for the spitIIa's! lawncareby20mm

Thanks again!


Hi Bliss

I took a quick peek and there are definitely the bits there to limit by aircraft type. First off I should probably say how to do it and then you can give us a shout if it doesn't make any sense or your need help putting it in the ATAG script.

1. Set up some counters in the mission, i.e. 'int overpoweredSpitIIAcount = 0;'

2. On the entering a aircraft event (OnPlaceEnter I think) then check the type of aircraft with something like this:


if ((actor as AiAircraft).InternalTypeName() == "bob:Aircraft.SpitfireMkIIA")
// You can see the part names in the FMB I think
{
if (overpoweredSpitIIAcount > 3)
{
// HUD message to say 'Too late, all gone. Stop being historically accurate, go get a worse plane'
// Code to remove aircraft like normal here
}
else
{
overpoweredSpitIIAcount++;
}
}

3. Tidy up the counters on cases such as leaving the aircraft, destroying it etc.

Hope that helps.


Last edited by FearlessFrog; 09/12/11 12:23 AM.
#3388965 - 09/13/11 10:10 AM Re: New API in the Beta [Re: FearlessFrog]  
Joined: Jan 2009
Posts: 2,474
Biggles07 Offline
Member
Biggles07  Offline
Member

Joined: Jan 2009
Posts: 2,474
Newcastle Upon Tyne, England.
Originally Posted By: FearlessFrog
Originally Posted By: ATAG_Bliss
Ataros told me to check out this mission: http://forum.1cpublishing.eu/showthread.php?t=25640 for ideas. I guess they are limiting squadron types with it?

But if C# wasn't already foreign enough to me the bits that state what each line does is in Russian! And those are the only bits that mean anything to me smile But it seems you know about the other bits biggrin (the code)

It's no big rush, but would be much appreciated. I think the blue pilots are going to come and burn my house down if I don't get a limit in there soon for the spitIIa's! lawncareby20mm

Thanks again!


Hi Bliss

I took a quick peek and there are definitely the bits there to limit by aircraft type. First off I should probably say how to do it and then you can give us a shout if it doesn't make any sense or your need help putting it in the ATAG script.

1. Set up some counters in the mission, i.e. 'int overpoweredSpitIIAcount = 0;'

2. On the entering a aircraft event (OnPlaceEnter I think) then check the type of aircraft with something like this:

<pre>
if ((actor as AiAircraft).InternalTypeName() == "bob:Aircraft.SpitfireMkIIA")
// You can see the part names in the FMB I think
{
if (overpoweredSpitIIAcount > 3)
{
// HUD message to say 'Too late, all gone. Stop being historically accurate, go get a worse plane'
// Code to remove aircraft like normal here
}
else
{
overpoweredSpitIIAcount++;
}
}
</pre>
3. Tidy up the counters on cases such as leaving the aircraft, destroying it etc.

Hope that helps.




'Too late, all gone. Stop being historically accurate, go get a worse plane'


*Ahahahaha* Frog, I love you. biggrin You probably have a script for that too. The 'LUFTWAFFLERS' eh? Quite possibly the most annoying people on planet Earth. Not content with their in line engines, UBER-KANNONZ and 'Observer' rounds that can apparently blow up f*cking Houses.....they still complain!!!

Who won, eh? I rest me case, and I have History as my witness. biggrin

Last edited by Biggles07; 09/13/11 10:28 AM. Reason: Addendum

"I am fond of pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals".

Sir Winston Churchill
#3389453 - 09/13/11 09:59 PM Re: New API in the Beta [Re: FearlessFrog]  
Joined: Jul 2010
Posts: 638
ATAG_Bliss Offline
Member
ATAG_Bliss  Offline
Member

Joined: Jul 2010
Posts: 638
Originally Posted By: FearlessFrog
Originally Posted By: ATAG_Bliss
Ataros told me to check out this mission: http://forum.1cpublishing.eu/showthread.php?t=25640 for ideas. I guess they are limiting squadron types with it?

But if C# wasn't already foreign enough to me the bits that state what each line does is in Russian! And those are the only bits that mean anything to me smile But it seems you know about the other bits biggrin (the code)

It's no big rush, but would be much appreciated. I think the blue pilots are going to come and burn my house down if I don't get a limit in there soon for the spitIIa's! lawncareby20mm

Thanks again!


Hi Bliss

I took a quick peek and there are definitely the bits there to limit by aircraft type. First off I should probably say how to do it and then you can give us a shout if it doesn't make any sense or your need help putting it in the ATAG script.

1. Set up some counters in the mission, i.e. 'int overpoweredSpitIIAcount = 0;'

2. On the entering a aircraft event (OnPlaceEnter I think) then check the type of aircraft with something like this:

<pre>
if ((actor as AiAircraft).InternalTypeName() == "bob:Aircraft.SpitfireMkIIA")
// You can see the part names in the FMB I think
{
if (overpoweredSpitIIAcount > 3)
{
// HUD message to say 'Too late, all gone. Stop being historically accurate, go get a worse plane'
// Code to remove aircraft like normal here
}
else
{
overpoweredSpitIIAcount++;
}
}
</pre>
3. Tidy up the counters on cases such as leaving the aircraft, destroying it etc.

Hope that helps.



Wow! Good stuff. Thanks Frog biggrin

I'll have a gander at making this go soon smile

Page 2 of 2 1 2

Moderated by  RacerGT 

Quick Search
Recent Articles
Support SimHQ

If you shop on Amazon use this Amazon link to support SimHQ
.
Social


Recent Topics
Headphones
by RossUK. 04/24/24 03:48 PM
Skymaster down.
by Mr_Blastman. 04/24/24 03:28 PM
The Old Breed and the Costs of War
by wormfood. 04/24/24 01:39 PM
Actors portraying British Prime Ministers
by Tarnsman. 04/24/24 01:11 AM
Roy Cross is 100 Years Old
by F4UDash4. 04/23/24 11:22 AM
Actors portraying US Presidents
by PanzerMeyer. 04/19/24 12:19 PM
Dickey Betts was 80
by Rick_Rawlings. 04/19/24 01:11 AM
Exodus
by RedOneAlpha. 04/18/24 05:46 PM
Copyright 1997-2016, SimHQ Inc. All Rights Reserved.

Powered by UBB.threads™ PHP Forum Software 7.6.0