:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::

Do you want to advertise at Project Perfect Mod. Find out how to do it HERE.

The time now is Mon Jul 13, 2020 6:46 pm
All times are UTC + 0
 Forum index » Modding Central » Red Alert 2 Editing Forum » Mapping Discussion
[Solved]Truck Load & Unload script actions
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [14 Posts] View previous topic :: View next topic
Author Message
TAK02
General


Joined: 28 Jun 2015
Location: It was Damascus.

PostPosted: Tue Nov 12, 2019 12:30 pm    Post subject:  [Solved]Truck Load & Unload script actions
Subject description: in the same script
Reply with quote

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.
Spoiler (click here to read it):
Code:
[01000023]
0=1,TRUCKB
Name=1 LoadedTruck
Group=-1

[01000025]
0=3,102
1=45,0
2=3,103
3=44,0
4=6,1
Name=Unload@103 Load@102

[01000026]
0=3,103
1=44,0
2=3,95
3=45,0
4=6,1
Name=Unload@103 Load@95

[01000027]
0=3,103
1=44,0
2=3,99
3=45,0
4=6,1
Name=Unload@103 Load@99

[01000030]
Max=5
Full=no
Name=OilTransport1
Group=-1
House=Neutral
Script=01000025
Whiner=no
Droppod=no
Suicide=no
Loadable=no
Prebuild=no
Priority=5
Waypoint=CY
Annoyance=no
IonImmune=no
Recruiter=no
Reinforce=no
TaskForce=01000023
TechLevel=0
Aggressive=no
Autocreate=no
GuardSlower=no
OnTransOnly=no
AvoidThreats=no
LooseRecruit=no
VeteranLevel=1
IsBaseDefense=no
UseTransportOrigin=no
MindControlDecision=0
OnlyTargetHouseEnemy=no
TransportsReturnOnUnload=no
AreTeamMembersRecruitable=no

[01000031]
Max=5
Full=no
Name=OilTransport2
Group=-1
House=Neutral
Script=01000026
Whiner=no
Droppod=no
Suicide=no
Loadable=no
Prebuild=no
Priority=5
Waypoint=CR
Annoyance=no
IonImmune=no
Recruiter=no
Reinforce=no
TaskForce=01000023
TechLevel=0
Aggressive=no
Autocreate=no
GuardSlower=no
OnTransOnly=no
AvoidThreats=no
LooseRecruit=no
VeteranLevel=1
IsBaseDefense=no
UseTransportOrigin=no
MindControlDecision=0
OnlyTargetHouseEnemy=no
TransportsReturnOnUnload=no
AreTeamMembersRecruitable=no

[01000032]
Max=5
Full=no
Name=OilTransport3
Group=-1
House=Neutral
Script=01000027
Whiner=no
Droppod=no
Suicide=no
Loadable=no
Prebuild=no
Priority=5
Waypoint=CV
Annoyance=no
IonImmune=no
Recruiter=no
Reinforce=no
TaskForce=01000023
TechLevel=0
Aggressive=no
Autocreate=no
GuardSlower=no
OnTransOnly=no
AvoidThreats=no
LooseRecruit=no
VeteranLevel=1
IsBaseDefense=no
UseTransportOrigin=no
MindControlDecision=0
OnlyTargetHouseEnemy=no
TransportsReturnOnUnload=no
AreTeamMembersRecruitable=no

Last edited by TAK02 on Wed Dec 11, 2019 8:52 am; edited 2 times in total

Back to top
View user's profile Send private message Send e-mail Visit poster's website ModDB Profile ID Skype Account
cxtian39
Commander


Joined: 11 Feb 2016

PostPosted: Tue Nov 12, 2019 6:36 pm    Post subject: Reply with quote

Because it’s not cosmetic. The script loses the unit and you need to recruit the converted unit.
_________________
I DON'T extract models from Rivals.
I play Rivals tho, PM me for a fight.

Back to top
View user's profile Send private message Skype Account
TAK02
General


Joined: 28 Jun 2015
Location: It was Damascus.

PostPosted: Tue Nov 12, 2019 6:44 pm    Post subject: Reply with quote

cxtian39 wrote:
Because it’s not cosmetic. The script loses the unit and you need to recruit the converted unit.

Then someone needs to update ModEnc; or at least make it clear that the change is not just cosmetic.

Back to top
View user's profile Send private message Send e-mail Visit poster's website ModDB Profile ID Skype Account
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Tue Nov 12, 2019 9:05 pm    Post subject: Reply with quote

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

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
cxtian39
Commander


Joined: 11 Feb 2016

PostPosted: Tue Nov 12, 2019 9:15 pm    Post subject: Reply with quote

Maybe Ares rewrites this part while dehardcoding it by adding Convert.Script=, which falls into the category of unit conversion.
_________________
I DON'T extract models from Rivals.
I play Rivals tho, PM me for a fight.

Back to top
View user's profile Send private message Skype Account
TAK02
General


Joined: 28 Jun 2015
Location: It was Damascus.

PostPosted: Wed Nov 13, 2019 7:13 am    Post subject: Reply with quote

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 C&C S. True Supremacy.
Youtube: C&C Supremacy Mod | Skype: TAK02 Supreme CnC Mods
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. #Tongue
I once ninja'd MigEater #Tongue
Back to top
View user's profile Send private message Send e-mail Visit poster's website ModDB Profile ID Skype Account
cxtian39
Commander


Joined: 11 Feb 2016

PostPosted: Thu Nov 14, 2019 12:09 am    Post subject: Reply with quote

Unit conversion never changes selection, command, etc #Tongue
_________________
I DON'T extract models from Rivals.
I play Rivals tho, PM me for a fight.

Back to top
View user's profile Send private message Skype Account
TAK02
General


Joined: 28 Jun 2015
Location: It was Damascus.

PostPosted: Sun Nov 17, 2019 12:31 pm    Post subject: Reply with quote

This post is a lie: https://ppmforums.com/viewtopic.php?p=563719#563719
_________________
One and only developer of C&C S. True Supremacy.
Youtube: C&C Supremacy Mod | Skype: TAK02 Supreme CnC Mods
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. #Tongue
I once ninja'd MigEater #Tongue
Back to top
View user's profile Send private message Send e-mail Visit poster's website ModDB Profile ID Skype Account
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Sun Nov 17, 2019 2:23 pm    Post subject: Reply with quote

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

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
E1 Elite
Commander


Joined: 28 May 2013

PostPosted: Mon Nov 18, 2019 2:17 am    Post subject: Reply with quote

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.


all01umd.7z
 Description:

Download
 Filename:  all01umd.7z
 Filesize:  5.21 KB
 Downloaded:  1 Time(s)


Back to top
View user's profile Send private message
TAK02
General


Joined: 28 Jun 2015
Location: It was Damascus.

PostPosted: Mon Nov 18, 2019 8:34 am    Post subject: Reply with quote

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 C&C S. True Supremacy.
Youtube: C&C Supremacy Mod | Skype: TAK02 Supreme CnC Mods
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. #Tongue
I once ninja'd MigEater #Tongue
Back to top
View user's profile Send private message Send e-mail Visit poster's website ModDB Profile ID Skype Account
E1 Elite
Commander


Joined: 28 May 2013

PostPosted: Mon Nov 18, 2019 9:18 am    Post subject: Reply with quote

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.

Back to top
View user's profile Send private message
TAK02
General


Joined: 28 Jun 2015
Location: It was Damascus.

PostPosted: Mon Nov 18, 2019 4:35 pm    Post subject: Reply with quote

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 C&C S. True Supremacy.
Youtube: C&C Supremacy Mod | Skype: TAK02 Supreme CnC Mods
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. #Tongue
I once ninja'd MigEater #Tongue
Back to top
View user's profile Send private message Send e-mail Visit poster's website ModDB Profile ID Skype Account
TAK02
General


Joined: 28 Jun 2015
Location: It was Damascus.

PostPosted: Wed Dec 11, 2019 8:52 am    Post subject: Reply with quote

I really need to clean up my RA2 folder.
Lin Kuei Ominae wrote:
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 C&C S. True Supremacy.
Youtube: C&C Supremacy Mod | Skype: TAK02 Supreme CnC Mods
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. #Tongue
I once ninja'd MigEater #Tongue
Back to top
View user's profile Send private message Send e-mail Visit poster's website ModDB Profile ID Skype Account
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [14 Posts] View previous topic :: View next topic
 Forum index » Modding Central » Red Alert 2 Editing Forum » Mapping Discussion
Jump to:  
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
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


Powered by phpBB © phpBB Group

[ Time: 0.4016s ][ Queries: 12 (0.0242s) ][ Debug on ]