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 next message
jonwil is currently offline  jonwil
Messages: 3555
Registered: February 2003
Karma: 0
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
Re: I am looking for advice/help with a Naval Transport script [message #227128 is a reply to message #227125] Wed, 18 October 2006 06:39 Go to previous messageGo to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3805
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
If you were to set it up like your "JFW_CarryAll" script, maybe you could set it up so that it would be where you were aiming the targeting reticle, would be where they would be dropped off (This could be easily done by attaching a invisible turret to the transport, a bone would be attached to the muzzlea0 bone [sightly higher than the muzzlea0 bone] the when you right clicked it would place the vehicle at this bone therefor the driver would be in charge of where the vehicle is dropped off).

Well thats the way I did it in one of my Mods, the transport had 5 seats (for people) and I used your "JFW_CarryAll" script so that it could carry a vehicle (the only problem at the time was that I wanted it to carry more than one vehicle and I could not see the script working for picking up more than one vehicle [and even if it did when you right clicked you would dump off all the vehicles in the same spot and that would be no good]).

An Idea

Do you think it would be possible in a future scripts version, to make a timer that was like "JFW_Timer_Custom_On_Off" but when ever it was sent the "on" custom it would reset the timer count and would not send a custom till the timer hit zero (so if it had a time amount of 60 seconds, and it kept receiving "on" customs every 10 seconds it would not send the custom until the final "on" custom was send, and then it counted down the remaining 60 seconds (60 left obviously because every time it received the "on" custom it reset).


[Updated on: Wed, 18 October 2006 07:06]

Report message to a moderator

Re: I am looking for advice/help with a Naval Transport script [message #227131 is a reply to message #227125] Wed, 18 October 2006 07:09 Go to previous message
Zion is currently offline  Zion
Messages: 2722
Registered: April 2006
Karma: 1
General (2 Stars)
Ask BogdanV, he's fighting the war against the Worldboxes, with help from a couple of AR guys. Big Grin

He's your best bet and this is a referal to him, go ask him.
Previous Topic: Kill command.
Next Topic: leveledit 1.0.0.5 is out
Goto Forum:
  


Current Time: Wed Jun 05 03:19:53 MST 2024

Total time taken to generate the page: 0.00703 seconds