Posted: Tue Nov 12, 2019 12:30 pm Post subject:
[Solved]Truck Load & Unload script actions
Subject description: in the same script
I wanted a transport that goes to the base, offloads its cargo, goes to grab another load then loops back.
Now, here's the problem: it doesn't seem like you can put Truck Load and Truck Unload script actions in the same script, even when making it loop back.
So I thought: is the problem with the waypoints?
Keeping only the "Move to waypoint" and "Jump to line 1" actions proved that yes, the loop does indeed work.
The only issue at this point is the "cosmetic" change from TRUCKB to TRUCKA and back again.
EDIT: I was testing on a formerly RA2 campaign map in YR with Ares.
In TS, it is only cosmetic. (Pretty sure it wasn't changed for RA2)
When you have the truck selected, it stays selected during unload/load. It wouldn't if the unit itself would be changed.
Does the unload or load action even work once?
Try to narrow down the problem.
Does RA2 allow more than 100 waypoints? In TS using a waypoint above 100 breaks scripts and triggers. _________________ SHP Artist of Twisted Insurrection: Nod buildings
I was testing on a formerly RA2 campaign map in YR with Ares.
Probably should've mentioned that...
As for the script: the Move to waypoint actions all work. the script however breaks after the truck successfully unloads.
I'll try selecting it before it changes, but I think it remained selected when I was following it with F for the fun of it. _________________ One and only developer of the Command & Conquer Dune "C&C D" mod.
m7 wrote:
I tend to release things I create so that assets are never lost to hard drive problems, accidental deletion, or me having to pretend to care about rippers taking things from my project when it is done.
I tend to release things I create so that assets are never lost to hard drive problems, accidental deletion, or me having to pretend to care about rippers taking things from my project when it is done.
Got anything more substantial than that, allowing others to follow your argumentation and get to the same conclusion? Assumption, reasoning, explanation, example, facts, result... _________________ SHP Artist of Twisted Insurrection: Nod buildings
Logic is the same for script actions 44 and 45 to change the trucks between TruckA and TruckB in TS/RA2 or YR with or without Ares. The unit is not lost when it is converted, the changed unit remains in the team to continue the script.
Waypoints: TS and RA2 can have from 0-100. YR can have from 0-701.
Attaching a simple test map for truck changing in loop.
@TAK02: Saying something is wrong is one thing but lie means intentionally/knowingly giving false info. Be wise with words.
If something clearly doesn't work while others say it does, I'll call their posts lies.
If someone failed to mention an important detail, like SettingA must be ON and SettingB must be 2, then that isn't my fault, is it?
In any case, I've looked into the difference between E1's team (which works completely) and mine (which only works until the "unload"), and I think I found the difference.
AreTeamMembersRecruitable is ticked.
AreTeamMembersRecruitable=yes is apparently required for the Truck not to be lost during the conversion.
I'll need to reconfirm, as the difference here is that E1 has his truck spawn/autocreate, while mine are in field and simply recruited. _________________ One and only developer of the Command & Conquer Dune "C&C D" mod.
m7 wrote:
I tend to release things I create so that assets are never lost to hard drive problems, accidental deletion, or me having to pretend to care about rippers taking things from my project when it is done.
AreTeamMembersRecruitable has nothing to do in the current context. Why don't you set it to no in the provided map and then come to conclusion.
Calling something that is not correct as wrong is different from calling it a lie. Lie is an accusation of wrong doing intentionally. First understand the difference. I don't have problem of being wrong but calling it a lie is not acceptable. QUICK_EDIT
Now I'm confused: I set up the trigger, team and script in your map exactly as I did for the map I was testing with before, the one where everything but unloading (and probably loading too) worked.
I even chked and compared with Notepad.
The result: the issue is on my end in my map. I have no idea what's going on.
I'll be grasping at straws, enjoy your evening. _________________ One and only developer of the Command & Conquer Dune "C&C D" mod.
m7 wrote:
I tend to release things I create so that assets are never lost to hard drive problems, accidental deletion, or me having to pretend to care about rippers taking things from my project when it is done.
In TS, it is only cosmetic. (Pretty sure it wasn't changed for RA2)
When you have the truck selected, it stays selected during unload/load. It wouldn't if the unit itself would be changed.
While that is true, you should re-run that test in TS. For YR+Ares, the change is not cosmetic; the unit is completely converted to TRUCKA/TRUCKB upon un-/load, but things like selection/script/whatever are carried over. I'm not sure if the group carries over, but last time I played FS' first GDI mission where you controlled a truck, a few years ago, the group number didn't carry over.
I'm not sure what exactly happens, but here's a test for you: give either the TRUCKA or TRUCKB a super high speed like 50 or 100, and set up an un-/load loop. If done in YR+Ares, you'll notice one trip is much shorter than the other.
I doubt it's different in TS/FS.
What this means is that if a load/unload loop breaks, then the fault lies with the movement of the unit that isn't moving; in my case that was TRUCKA that had been restricted to rails as part of a different test a month or so ago; which brings me to the first sentence of this post.
Lin Kuei Ominae wrote:
Does RA2 allow more than 100 waypoints? In TS using a waypoint above 100 breaks scripts and triggers.
RA2 is like TS where waypoint 99 is the last waypoint that'll work; at least, that's what I got when I first started modding years ago, someone needsto test that again.
YR can handle a lot more. I think up to 550+ waypoints.
In any case, this is solved. _________________ One and only developer of the Command & Conquer Dune "C&C D" mod.
m7 wrote:
I tend to release things I create so that assets are never lost to hard drive problems, accidental deletion, or me having to pretend to care about rippers taking things from my project when it is done.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum