![]() |
how to trigger the big yellow messages?
i have a training mission, where both sides have a restricted plane amount for their spawn areas(20 planes).
now i want that if one of both spawn areas has only 10 planes left, that a message pops up, warning the team just like "team red only 10 planes left"(although i would like to have this message visible for everybody) and i want another message to pop up, when eventually one spawn area has all available plane used and when all planes of one side are destroyed just like "team blue has lost the war" Edit: ok i just found out, that the limit of planes of a spawn area doesnt seem to work... i restricted one spawn area to only 1 plane, but i could spawn several times from the same area without problems:confused: |
The number of planes is for how many planes a player can create at the same time.
|
ah ok....is it then possible, to give a spawnerea a certain amount of planes?
|
äh yes you can destroy it. So it vanished from Map. Or destroy the new created planes instantly or block the planes via Player.PlaceLeave.
|
Quote:
vanishing from the map, would be a fancy solution for this i think, coupled with a message that the opposite team won. but i guesss i would need your help for that... Edit: i would like to have this function included in my already excisting script: HTML Code:
using System; and maybe with the function included, that after one side has shot down a certain amount of AI planes(bombers), no bombers will spawn anymore.... i know i somehow ask for much, and if its sounding demanding in a way, i apologize, i can fully understand if you have better things to do |
1 Attachment(s)
Hm saw your edit to late, so i created a mission (in attachment) without your new wishes.
Next time you should create a new post, so i see if there is anything new. :( |
no worries Kodiak....
yeah i was just posting, when it came to my mind, that i should probably include all my wishes into one post, to save you workload,....unfortunately its now the other way round.sorry. but i will have a look at your mission now...maybe its enough for my squad training mission anyway... |
hey Kodiak, i tried your script, and it seems to work...
i put it into my mission, and adjusted the names of the spawnareas in the script, as well as the messages which pop up.everything works like a treat, even with more waypoints on one side! thank you very much, i think for now, this is perfect for my use....although if you have spare time and if you are in the mood, then i would really appreciate, if you could inlcude all my wishes from my above post,.....one day. Edit: now that i have my big yellow messages, i wonder how it is possible, to change the server messages.... i saw on some servers, that the normal messages like "AI SpitfireIa has been destroyed by...."(the small white ones, which appear if you killed someone or get killed) were adjusted..i dont know anymore on which server i saw this, but there the server was stating something like "...JG26_DavidRed kicked Ki SpitfireIa in the ass...." i will probably not use this phrase, but i think something more funny could be added than the default phrase... |
thx Kodiak again for your limitbirthplace script...works great even with more spawnpoints on one side...
the only thing now is, that if i have more than one spawnpoint on one side, then the message, warining that only 5planes are left on the one side, is dependent on each spawnpoint, and not on the total number of planes available on one side.... i would like to keep the messages, warning that one spawnpoint has only x planes left, but would like to have the message included, warning the team, if the total number of available planes is left to 5.... |
Change OnPlaceEnter to:
Code:
public override void OnPlaceEnter(Player player, AiActor actor, int placeIndex) |
ah ok....werds gleich ausprobieren!
|
Hm forgotten i am on an english speaking forum :rolleyes:
|
mhh me as well:grin:
ok this works, but then the message, warning that only x planes are left for a certain spawnpoint is gone....so i added this, assuming that i can get both messages to pop up, the one warning that a spawnpoint is short on planes, and the one warning the team that it has only 5planes left in total...but this seems to not work...the message warning the team that only 5planes in total are left, is not popping up...unfortunately...i almost thought, that at least once i could sort a problem out for myself:( HTML Code:
public override void OnPlaceEnter(Player player, AiActor actor, int placeIndex) |
oh and one more thing....is it possible, that if a plane lands safely on a homebase that this plane will "get back" into the list(pool) of available planes?so that the the number of available planes for that spawnpoint(where the plane startet from) will not decrease in numbers, when the plane manage to make it back to a friendly airfield...?
or in other words, if a plane manages to make it back home safely, that "this" plane can be used again |
Quote:
Example: Code:
GamePlay.gpHUDLogCenter(null, "First", null); Quote:
|
Quote:
|
ok tested again, with different numbers of available planes for each spawnpoint, and you are correct, its indeed showing the message that only 5planes are available....so this is good enough for me for now, as i have no glue again how and where to implement the Timeout section, without messing up the whole script....
but thinking again about the possibility, that if planes come back to base, are included again in the pool of the spawnpoint, is really attracting me...again, if you could write that for me, i would be REALLY REALLY HAPPY(maybe with the timeout section included already) one thing that came to my mind, is that one has to be careful with the messages then, as now, the script gives out a message, as one spawns in a plane...if the feature of returning planes is included, the messages should pop up, when a plane gets destroyed, as otherwise, the warnings/messages could be wrong.......but who i am telling this....if you really decide to write such a script for me, you are certainly aware of that... again and again and again Kodiak, during the last months, i had sooo much fun, because of your scripts you wrote for me....a BIG THANK YOU PS:if that all is possible, i really wonder, why this havent been included on servers such like atag already???...in my view, this is a great way of having a dynamic war....besides, with the script i already have, one could for example get rid of the "self destroying" E4s on atag, which suddenly after a few seconds lose their ailerons and elevators on ground, while you are still able to spawn in them....??? |
in your code change:
Code:
if (numberOfAllAvailablePlanes == 5) |
doesnt seem to work for me....all the messages are gone(also available/in use -messages)
and i seem to be able to respawn infinitely... |
then there must be a error in code can you show me your changes, may be there is a missing ";" or something else.
|
here is the complete code:
HTML Code:
using System; |
Ok some bracket mismatch, corrected version:
Code:
using System; |
this works now:grin:
ok great,....now last question,...are you willing to write such a script for me, which includes the homecoming planes in the script??? i know im probably a bit annoying, with constantly asking for new things, but my main problem with all the scripts is, that i dont have a clue whats possible and not...then i ask if something is possible, and if the answer is yes, then im really excited, and want to try out the script....and most of the time, while trying such new scripts, improvements or other possibilities come to my mind...then i ask again if its possible and so on... anyway thx for that script i already have. |
oh before i forget it, if you really write it, please include, that planes who land back safely, will get despawned after the player leaves the plane...thx in advance
|
To despawn the plane after grounding, was simple for this people who crashed and then sit a half an hour in their planes and waiting. So they must select a new plane. :rolleyes: But it's no problem to despawn a plane after correct landing after Pilot leaves plane.
|
yeah thats what i mean :)
if a player would come back to the home airfield, and lands safely, then leaves the plane, the plane should despawn, but the script should then know that it "puts that plane back into the spawnpoint" that would be a great script for my purpose |
So enhanced Version, Planes landing on their HomeBases are returned into the "Pool". If no plane is available on the Base the SpawnPlace will be removed, and recreated if a plane returns into the pool.
Planes that are landed or crashlanded are "force"-removed after 60 sec. You can change the Time (in seconds) in ActorObservation.ForceActorDestroyNotPosChangeAfte r(60); or if you dont like it remove the line. If you use SpawnPlaces with Airstart, place it over an existing Airstrip, if a Plane lands on this strip, it returns into the pool. You can use more than one planetype on a Birthplace, but there is only one counter per Birthplace at the moment, so the script does not differ the types. Maybe i add this feature in the future, also thinking about a transfer feature. Script: http://forum.1cpublishing.eu/showpos...2&postcount=40 |
thank you sooo much Kodiak!!!
will try that out immediately after i got my morning coffee.... what do you mean with "...the script does not differ the types.."? would it be theoretically possible, that one airfield/spawnarea has a certain amount of different planetypes?for example 20E1s and 10E4s?is that what you mean with not differing in planetypes? |
Quote:
|
ah ok,thats a neat possibility....and the transfer feature is probably, that if a plane spawns at one airfield, but lands at a different one, that it than will be transfered to the other "plane pool"...i guess.
those two features would be great!....but no worries,...im more than happy with the current script.but if you decide to add those features, please let me know... i will try it out now, and report back... |
BTW I made the script - it's your part to test it ;)
|
i will take that duty with joy!
testing it now-report will follow soon:grin: |
well Kodiak...this works perfect from what i have tested so far!great work.thank you!
|
ok Kodiak, as already mentioned, the script works perfect!
after a few tests on my own, some of my squad members tried a mission with this script. it was great fun, and everything works.... but i have seen one minor thing, which is distracting a bit....if one bails out, the plane will disappear immediately.thats the only thing i would like to have changed. on the other side, i like the fact, that if you spawn on a base(on ground), and leave the plane, it will get back into the pool as well.thats good if you forgot to change your loadout for example.... and i also like the fact, that the planes disappear in general after one leaves the plane...but when you are in a dogfight, it loooks weird, when the pilot in front of you bails out, and the plane suddenly is gone...besides, i think that one doesnt get the kill for it in this situation(though im not sure on this). i assume, that i probably have to change only one line in the script to cure this problem, but i dont know which one.... |
Hm must take a look at this, problem is both leaving the plane via Esc and parachuting called OnPlaceLeaved so i must try a other way to get this fixed.
|
ah ok...well its not a major issue...but if it can be solved without too much effort, i would be glad...if not, im happy as well with what i already have.
|
Ok new version, should work can't test it at the moment (not at my gaming Pc at the moment):
see new version at http://forum.1cpublishing.eu/showpos...2&postcount=40 |
hey Kodiak...no problem, its my duty and a honor to test it!
thx for the really quick fix,.....will try it now.. |
seems to work!
i spawned the plane, and left it on the ground with hitting ALT F2, and the plane despawned immediately, just like it used to be. then i spawned again, took off the runway, bailed out, and the plane kept flying until it crashed into the channel...so everything seems to work now as intended..:grin: good job Kodiak |
Found a problem by removing the spawnplace more than one time. :rolleyes:
Corrected Version: Code:
using System; |
SpawnPlace Managment
1 Attachment(s)
So new Version. Now it's possible to limit every PlaneType seperately, it's now possible to transfer one Airplane from one Birthplace to an other (the other must be specify in the Birthcontrol). It's also possible to resupply the places.
Version to test: Code:
using System; |
Hey Kodiak!sorry i didnt answers sooner, but i didint recognize until now, that you have improved the script further!thats great!thank you very much!
will have to try it out now.... thx! |
hey Kodiak!
this script works perfect! the nice thing is, that the messages which show the state of each airfield, are only visible for your own side... we tested it yesterday, and honestly, i cant think of any possible improvement!! great work! |
btw Kodiak!
now that you have wrote so many scripts for me/our squad, and we all have great fun with your work, how about jumping in,joining us, and enjoy the fun you have created!? you are welcome any time...if you are in the mood to fly, look in the lobby section and watch for a lobby called ACG...thats us!i would be pleased. btw, whats your playername in steam? |
My playername is FG28_Kodiak ;)
|
will add you as a friend
Edit: steam doesnt find you...:( |
steam isn't friendly:-)
|
Quote:
Kodiak1968 |
still no joy....
i hate steam regarding this,....i have all the time trouble to find people in steam |
How is yours?
|
This little tutorial should help tell you what your Steam ID is.
It will be a bunch of digits if you haven't changed to a Custom URL yet, share the link and it will bring people to the players page where they can add you to their friendslist. http://www.youtube.com/watch?v=B0a7gCHq-B0 |
Quote:
|
btw, we as a squad tested the script another time, and while the spawnplaces are all working, when you come back to any of your friendly bases, the winning message didnt show up for some reason....
i dont know why, cause when i tested it alone, with only a few aircraft on both side(for testing puroposes), the message came up, as soon as i smashed all planes into the ground. maybe it has something to do, that many of us, did crash landings in fields, or ditched in the water?? i dont know, but the message just didnt show up... |
Must take a look at it.
But i don't understand ".. when you come back to any of your friendly bases, the winning message didnt show up for some reason...." The enemies are all destroyed? |
well, what i was trying to say is, that its working that you can take your plane again,when you come back to any of your friendly bases, from the base where you have landed....
but the only thing that seems not to work every time is the winning message....(though it worked for me when i tested it myself, when i crashed all available planes of one side into the ground on purpose) yeah, all planes were destroyed, or at least, on the red side there werent any planes available anymore at any of the airbases...i asked our "red squadmates" if they really used all the planes...they confirmed, and then to assure myself, i switched to the red side to have a look myself, and all the spawnpoints disappeared, and nobody on the red side was in a flying plane anymore...(i looked at the online stats) |
Ok, must look at this.
|
thx Kodiak,...but dont hurry, as this is only a cosmetic feature...as already mentioned, the rest of it works perfect!
btw, i have accepted your friendsrequest on steam. so if you are in the mood to fly, tell me and we could enjoy your creatons together! |
All times are GMT. The time now is 10:39 AM. |
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.