Home » Renegade Discussions » Mod Forum » Setting up player controlled harvesters
Re: Setting up player controlled harvesters [message #272371 is a reply to message #272210] |
Tue, 10 July 2007 20:22 |
|
Tankkiller
Messages: 192 Registered: February 2006 Location: Oklahoma, OK!
Karma:
|
Recruit |
|
|
JFW_Resource_Field
JFW_Resource_collector
JFW_Resource_Refinery
If you want instrutions
Click thisJFW_Resource_Field (when entered by a resource collecter, a timer is started and a flag is cleared. If the resource collecter exits before the timer goes off, the flag is set. When the timer goes off, if the flag is clear, it will send a cash amount to the resource collecter)
Cash (how much cash this field is worth)
Time (how long the timer should run for before it grants the cash, i.e. the "resource collection time")
TimerNum (what number to use for the timer)
Collected_Preset (this preset will be created when the timer trips. Attach a "destroy this after a short time" script to it)
Collected_Preset_Distance (how far in units from the harvester the Harvested_Preset should appear. It will be created in a straight line from the direction the harvester is facing)
Collected_Message (what message to send to the resource collecter to record the cash amount)
Nod_Preset (the preset name of the Nod Resource Collector)
GDI_Preset (the preset name of the GDI Resource Collector)
StartHarvest (the message to send to the harvester when harvesting starts)
StopHarvest (the message to send to the harvester when harvesting stops)
Use the last 2 with e.g. JFW_Enable_Disable_Animation_On_Custom to make the harvester animate while it's harvesting
n.b., if there is already a resource collector in the zone, any zone entry events by other resource collectors will be ignored (so if the original collector leaves, the new collector then has to leave and re-enter to trigger the start of collection)
JFW_Resource_Collector (this should go on the resource collecter preset to make it work)
Collected_Mesasge (what message will be sent to record the cash amount)
Refinery_Message (what message will be sent by the refinery to identify that the refinery has been entered, when this is recieved, it will give the current cash total to the player)
Cash_Limit (do not let the total cash amount get any larger than this, 0 = no limit)
Cash_Type (how to record cash, 0 = when someone gets in, reset cash figure, 1 = when someone other than the person who was last in gets in, reset the cash amount, 2 = never reset the cash amount, 3 = same as 2 except it will reset the cash amount every time a "harvested" message is sent)
Entire_Team (give to entire team or only to player, 0 = player, 1 = team
The cash amount is of course always reset when the refinery is triggered and the cash is delivered to the player.
JFW_Resource_Refinery (this handles the refinery, when it's entered, it sends a message to the resource collecter which then gives the correct cash amount to the player)
Refinery_Message (what message to send to the resource collecter to identify that the refinery has been entered)
Make sure you make the zone big enough for these 3 scripts. Use JFW_Debug_Text_File to identify if the zone entry trigger is triggering or not.
Also, make sure that you set the script zones for the field and refinery to "check stars only" = off (otherwise, it won't trigger on the vehicle, only on its occupant.
A good way to make sure that it's triggering on the vehicle is to put a vehicle into your map at startup and use JFW_Debug_Text_File on the zone. If it's working, you
should see the ID of the vehicle you put at startup in the log file, in addition to the ID of the player.
BTW, you can also use a specific infantry unit as a valid preset name and it will still work as long as the infantry preset has the JFW_Resource_Collector attached and as long as the refinery and field are set up right
Also works: RA_Ore_Truck
RA_Ore_Field
RA_Ore_Delivery_Zone
Intrutions for these:
Click thisScript Name:
Script Name: "RA_Ore_Truck"
Description:
Script for Ore Trucks. It calculates the value of each individual scoop of ore it harvests by dividing the field's value by the number of scoops it can hold. The script plays animations for both harvesting and delivering.
Parameters:
Field_Enter: Message sent by ore field when truck enters the zone. Default is 456654
Field_Exit: Message sent by Ore field when truck exits the zone. Default is 75321
Deposit_Enter: Message sent by deposit zone when truck enters. Default is 321654
Max_Capacity: Maximum number of "scoops" this script can hold. Default is 7
Harvest_Anim: Name of animation to play when harvesting.
Deliver_Anim: Name of animation to play when dumping ore.
Notes:
While harvesting, it must complete the harvesting animation to count a 'scoop'. The time it takes to harvest a field will therefore be the length of its harvest animation times the max capacity. When filled to capacity, the script will no longer play harvesting animations until it delivers the load. When delivering ore, it must complete its deliver animation to distribute credits to players.
******************************************************************************** **************
Script Name: "RA_Ore_Field"
Description:
Script for Ore Field script zones. It only sends messages to objects entering/exiting with the script RA_Ore_Truck.
Parameters:
Field_Value: The total credit value a maximum load from this field will produce. Default is 700
Enter: Mesage to send to an entering object. Default is 456654
Exit: Mesage to send to an exiting object. Default is 75321
Notes:
When an ore truck enters the zone this script is attached to, the enter message will also send the field value so the truck can calculate how much money it receives per scoop. A field with a value of 700 will provide a truck with 100 credits per scoop, assuming the truck is using the default 7 scoop capacity.
******************************************************************************** **************
Script Name: "RA_Ore_Delivery_Zone"
Description:
Script for Ore Delivery script zones. Ore Trucks enterign the attached zone will be sent a message instructing them to deliver their ore load.
Parameters:
Team: The team this zone works for. Soviets = 0, Allies = 1. Default is 0
Enter: Message to send to Ore Trucks that enter the zone. Default is 321654
Notes:
This script will only send a message to an object using the script RA_Ore_Truck that matches the team specified in its parameters.
BYE, BYE FLAME TANK!!!
[Updated on: Tue, 10 July 2007 20:35] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Thu Dec 19 07:30:26 MST 2024
Total time taken to generate the page: 0.00845 seconds
|