Official Fulqrum Publishing forum

Official Fulqrum Publishing forum (http://forum.fulqrumpublishing.com/index.php)
-   FMB, Mission & Campaign builder Discussions (http://forum.fulqrumpublishing.com/forumdisplay.php?f=203)
-   -   Mission Menu and Ambulance (http://forum.fulqrumpublishing.com/showthread.php?t=26112)

Sokol1 09-14-2011 02:37 AM

Quote:

Originally Posted by Lookaloft (Post 335628)
Unfortunately I can’t get the Naryv script to work. I copied the script in Notepad and saved it under ANSI as an cs mission.

I copy the script direct in FMB window, so when save the mission the script is save too.

http://img716.imageshack.us/img716/9...pboard03ra.jpg

After a ''perfect'' wheels up landing they send me winch, fuel, ammo and bombs (spend previous load before landing)! :)
Ambulance is not need. :)

Sokol1

fearlessfrog 09-14-2011 05:02 AM

Quote:

Originally Posted by Das Attorney (Post 335767)
Thanks for the hard work and research on these scripts. Some really awesomesauce going on in this thread.

I was wondering if someone could help me though. I'm using naryv's script to dispatch ambulances etc in a MP dogfight. There's also AI planes that periodically spawn and then land. The problem is that everytime an AI plane lands, fire trucks etc will spawn and eventually lag the game out.

Is there a way of limiting the spawn to just players?

I used to do scripting for Arma 2 (sqf) and the following would be appropriate to filter out AI:

PHP Code:

if (_x == playerthen
{
     
// code 
}; 

I'm not used to C# yet and don't know the syntax well at this point. How could I filter out the AI so firetrucks etc only spawn and deploy for human controlled planes?

I've looked in the examples, but I can't 'get it' yet. I know you're busy guys so even a basic example/link would get me started.

Thanks

On a quick peek, I think there may be a bug around line 212, i.e. this bit:

Code:

                        if (!CurTechCars.Contains(TmpCar))
                            CurTechCars.Add(TmpCar);
                        MissionLoading = false;

..in that it's adding new cars even if they exist as it doesn't find a match for the existing object.

Another way to do this would be an 'if (CurTechCars.count < MAX_CARS) in before the CurTechCars.Add(TmpCar)

Hopefully that's a few clues, as I'm away from a computer (typing this on a pad)

Lookaloft 09-14-2011 12:46 PM

Mington, thanks for your detailed advice, and you too Sokol1 for your response. No grandmothers and eggs rule applied here, Ming. On the contrary I’m very happy with your suggestions, pleased as Punch as people say. Put them already into practice and all went very well now! What a terrific script this Naryv script, and what a fantastic game this Cliffs of Dover!

Ataros 09-14-2011 05:39 PM

Quote:

Originally Posted by esmiol (Post 335133)
maybe we could soon see a script who call supply truck to come...rearm us and go :)

It is not possible in the game yet and not planned yet. Ask the devs to include it if it is really needed (in appropriate threads). Their argument is that R&R takes at least 30 minutes and no one would really want to waste that much time neither offline nor online.

fearlessfrog 09-14-2011 08:28 PM

Quote:

Originally Posted by Ataros (Post 336166)
It is not possible in the game yet and not planned yet. Ask the devs to include it if it is really needed (in appropriate threads). Their argument is that R&R takes at least 30 minutes and no one would really want to waste that much time neither offline nor online.

One work-around for this I had a play with was to fake it by taking the existing player/position and then destroying/recreating the same type of aircraft, i.e. you get refueled and re-armed, plus could even put a delay on that too. I know it's not realistic, but a 5 minute re-arm/refuel custom script does appeal.

Ataros 09-14-2011 08:54 PM

Quote:

Originally Posted by fearlessfrog (Post 336230)
One work-around for this I had a play with was to fake it by taking the existing player/position and then destroying/recreating the same type of aircraft, i.e. you get refueled and re-armed, plus could even put a delay on that too. I know it's not realistic, but a 5 minute re-arm/refuel custom script does appeal.

This is the only way to do it now I am afraid.

BTW can you make the new aircraft to spawn at exactly the same position heading the same direction as the old one? If yes, the change would be hardly noticeable for a player.

fearlessfrog 09-14-2011 10:12 PM

Quote:

Originally Posted by Ataros (Post 336237)
This is the only way to do it now I am afraid.

BTW can you make the new aircraft to spawn at exactly the same position heading the same direction as the old one? If yes, the change would be hardly noticeable for a player.

I haven't tried to fix the rotation. Looking at the API I was assuming that the 'epsilon' point and angle might set that, i.e. 'Place().Pos().epsilonEquals' but would either have to try it a bit more (or we could ask the devs?)

Anyone else dealt with a rotation angle?

Mington 09-15-2011 11:35 AM

I demand fully-automated working traffic lights in London town and fleets of Routemasters. Civilization: Cliffs of Dover

Next Week's Demand Or The Kitten Gets It: a flocking algorithm for Heinkels

Ming :)

Das Attorney 09-15-2011 11:01 PM

Quote:

Originally Posted by fearlessfrog (Post 335889)
On a quick peek, I think there may be a bug around line 212, i.e. this bit:

Code:

                        if (!CurTechCars.Contains(TmpCar))
                            CurTechCars.Add(TmpCar);
                        MissionLoading = false;

..in that it's adding new cars even if they exist as it doesn't find a match for the existing object.

Another way to do this would be an 'if (CurTechCars.count < MAX_CARS) in before the CurTechCars.Add(TmpCar)

Hopefully that's a few clues, as I'm away from a computer (typing this on a pad)

Thanks :)

I managed to modify the script to only work on player planes by adding a condition to ignore AI planes - using !isAiControlledPlane(aircraft)

It's working for player planes only now quite nicely. :)

I'd like to have a go at adding in some code to rearm/refuel/repair. Off the top of my head, it could probably work by automatically setting fuel etc to 1 when the relevant truck completes it's last waypoint. Or when it completes it's last waypoint, then it activates the Mission menu for the player to select the appropriate emergency service. I'm not sure if these solutions would be possible as I don't know many of the scripting commands.

How can you see the API? Do you have to run kegetys -dump command or is there a different way to look at the API (in the COD folder somewhere maybe)?

EDIT: I suspect it's in the maddox.dll....

fearlessfrog 09-16-2011 03:48 AM

The API is written using Microsoft .Net libraries, so you can examine them in things like Visual Studio (there is a free edition called Express). The 'object browser' shows the signatures and symbols of the files like game.world.dll that you reference in your project.


All times are GMT. The time now is 06:00 AM.

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