Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » I am looking for advice/help with a Naval Transport script
I am looking for advice/help with a Naval Transport script [message #227125] Wed, 18 October 2006 06:14 Go to previous message
jonwil is currently offline  jonwil
Messages: 3556
Registered: February 2003
Karma:
General (3 Stars)

I am working on a script for a functional naval transport (for the RenAlert mod) and I am seeking advice from other scripters/modders as to how to implement it.

Here is what I have so far as an implementation idea:
1.The transport has a fixed number of "slots", each of which can be filled with a vehicle or infantry (this has nothing to do with the leveledit setting for the number of slots in the vehicle, this is a list maintained by the script)
2.Each vehicle you put into the transport adds one slot for every seat they have but those slots can only be used for infantry. For example if you have an empty transport, that might have 5 slots. Then, you put a Ranger into the transport which takes up one slot but adds 2 slots for its 2 seats. Now you can put up to 6 infantry into the transport or 4 vehicles plus 2 infantry or some combination of the above. Should a vehicle trigger happen with no slots for vehicles, nothing happens. Should an infantry try to get in with no infantry slots available, they get kicked straight back out.
3.Infantry enter the transport in the normal way (like they do now in fact)
4.When a vehicle wants to enter the transport, some mechansim (still to be determined) is triggered. Then, the contents of the vehicle are ejected. The script will then transport the vehicle to a special location (exact details will be figured out as the script is done). From there, infantry (including those who were in the vehicle) can get into the transport. At the other end, something is triggered and the vehicle comes back out for people to get into and drive.
5.Anything that the game considers a flying vehicle (i.e. helicoptors, naval) will be blocked from the transport.
6.Vehicles come back out of the transport in the reverse order they went in. Infantry can come out at any time.
7.Exactly how loading and unloading is triggered will be figured out as the script is written
8.The "special area" will consist of a hollow box of a certain size (i.e. large enough to hold the largest RenAlert vehicles) with a certain preset name that mappers just place somewhere it cant be seen. Because the vehicles are empty and because they dont move, it is ok to put multiple vehicles on top of each other (i.e. occupying the same physical position.
9.The slot count in leveledit for the transport will be set at big number so that even if the transport has, say, 5 APCs in it, there is still enough room for all the infantry who are allowed in and the game doesnt reject anyone (only the script will do that).
and 10.Vehicles getting in and out of the transport will have a custom sent to them to enable them to be locked to the player who was driving at the time they were put into the transport. If the transport dies, all the vehicles inside it also die.

I am looking for any general feedback on this idea but most particularly, I am asking all scripters and modders and such to think hard about a possible way to implement the loading and unloading. I already know how it will be triggered, what I dont know is:
1.Once the script is triggered to load a vehicle, how it should decide (and identify) which vehicle to load (assuming there is one to be loaded).
2.When the script is triggered to unload a vehicle, how it should check that the unload point is an acceptable area to unload a vehicle, specifically that its free of other vehicles (and possibly that its over land and not water)
and 3.Once we check that the unload area is clear, how to actually unload the vehicle so that it doesnt get damaged or stuck or anything.

Does anyone have any ideas how to do this?


Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
 
Read Message
Read Message
Read Message
Previous Topic: Kill command.
Next Topic: leveledit 1.0.0.5 is out
Goto Forum:
  


Current Time: Sun Jul 21 10:58:55 MST 2024

Total time taken to generate the page: 0.00581 seconds