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


The time now is Mon Nov 04, 2024 1:27 am
All times are UTC + 0
Change Teams makes the unit just stand there
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [16 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Ousagi
Cyborg Soldier


Joined: 02 Nov 2022

PostPosted: Sun Aug 27, 2023 12:47 pm    Post subject:  Change Teams makes the unit just stand there
Subject description: I'm trying to load 2 Yuri Clones inside a Flak Track
Reply with quote  Mark this post and the followings unread

I've been looking in mapping discussion and found an answer, but mines a little complicated.

There are 2 Yuri Clones I want to load inside the Flak Track. Each one moves in seperate direction, basically 1 move from the left and the other to the right, so they are they're own teamtypes. And finally the Flak Track is also it's own teamtype which would be used later.

So "18 Change Teams" was suppose to change the Yuri Clones to be the same team as the Flak Track so they could be loaded. Then once unloaded , the Yuri Clones could use they're scripts to move up and towards they're seperate direction. Unfortunately, fiddling with Change Teams, trying it on all TeamTypes, I couldn't make the Change Teams to work. They just stand there.

Compared to other answers where they kicked the transport off the team and continue the script. Mine has two seperate destination from each other. Essentially they're own teams.

Thank you for the help. Most importantly, I want to know how Change Teams should be made to work.

Back to top
View user's profile Send private message
McPwny
Chem Warrior


Joined: 29 Jan 2018

PostPosted: Sun Aug 27, 2023 9:03 pm    Post subject: Reply with quote  Mark this post and the followings unread

use local variables and action 4 to recruit them into new teams after unloading.
for example,
team 1 consists of the flak track, and 2 yuri
team 2 consists of 1 yuri with script 1
team 3 consists of 1 yuri with script 2

team 1 moves to waypoint, unloads, then fires a local variable
local variable fires a trigger which creates team 2 and 3 via action 4
because trigger actions fire 1 frame apart in succession, 1 yuri gets recruited into the first team, then the other into the second team

just make sure that your teams have the proper settings related to recuitablilty set

_________________
visit my moddb profile for .shp downloads and stuff

Back to top
View user's profile Send private message
Ousagi
Cyborg Soldier


Joined: 02 Nov 2022

PostPosted: Mon Aug 28, 2023 1:25 am    Post subject: Reply with quote  Mark this post and the followings unread

Thank you! It got complicated since I've changed some and forgot to change them back. This is the first time I've used Create Team and Local Variables and I was about to ask why not just just have Enable/Disable Trigger in the script actions, but Local Variables seems a whole lot better since it can trigger multiple triggers. Guess I have to change some triggers since a lot of them just use a lot of Enable/Disable Trigger multiple times in one trigger. I still don't know why change teams makes the unit not do anything though, but thank you very much!

Also, I don't know what you meant by team 2 and 3 being created via action 4. In the script it ends with local variable and on the trigger, it ends with only 2 actions

Back to top
View user's profile Send private message
McPwny
Chem Warrior


Joined: 29 Jan 2018

PostPosted: Mon Aug 28, 2023 4:14 am    Post subject: Reply with quote  Mark this post and the followings unread

enable/disable trigger isnt a script action but the local variables in scripts are meant to serve that role.

so the flack track team, in its script, after unloading, sets a local variable
then you have a trigger with the event 'local is set', and two #4 'create team' actions
the script action switches the local, activating the trigger, and the game attempts to create the teams
assuming the teams it is trying to create have 'recruiter=yes' and the units have 'recruitable=yes', the units will get recruited into the teams

if you set the trigger to repeating, and then set 'clear local' as an action on the trigger, you can make the whole process repeatable

i cant say why your units arent moving without seeing it for myself, but if i had to guess they might have gotten kicked out from the team
after the transport unloaded and not moved on to the 'change team' action, or the change team action happened after the transport started
to unload but before the units got out

_________________
visit my moddb profile for .shp downloads and stuff

Back to top
View user's profile Send private message
Ousagi
Cyborg Soldier


Joined: 02 Nov 2022

PostPosted: Mon Aug 28, 2023 5:15 am    Post subject: Reply with quote  Mark this post and the followings unread

Oh I get it now! You meant the trigger action Create Team is number 4 not the next script action, sorry I wasn't used to referring actions as numbers yet.

But for the Change Team, I had set the 2 Yuri Clones separately from each other and from the Flak Track. At the very first script action I had for all units is Change Team to the Flak Track's so it could continue with the "load onto transport", but they stop and just stand there. If I removed the Change Team though, they do their respective scripts in TeamTypes. The idea was that I'm going to temporarily move both Yuri Clones with the Flak Track then change them back to their original TeamTypes. I hoped this makes sense since this would make it simpler than having to go through multiple local variables and triggers and I just did something wrong.

Just add Change Team at the very beginning and that's pretty much what I did and everything stops.

Back to top
View user's profile Send private message
McPwny
Chem Warrior


Joined: 29 Jan 2018

PostPosted: Mon Aug 28, 2023 1:16 pm    Post subject: Reply with quote  Mark this post and the followings unread

the options for transports are only to keep the units in one team, or to remove either the units or transport from the
team upon unloading (at which point they will do nothing from then on). the yuris and flack track will be in the same
team if they are in the same transport, so the only way to separate them into different teams is through recruiting.

likewise the problem of the yuris and flack tracks not getting together into the same team can also be solved by
recruiting the three together in the same way where the change team script action is unreliable. local variables and
recruitment are advanced FA2 concepts for sure, but they are also rather fun and the key to doing what you need

_________________
visit my moddb profile for .shp downloads and stuff

Back to top
View user's profile Send private message
Ousagi
Cyborg Soldier


Joined: 02 Nov 2022

PostPosted: Mon Aug 28, 2023 4:39 pm    Post subject: Reply with quote  Mark this post and the followings unread

Got it! Local variables are useful especially on large scale but they get tedious when used on single units. They setup for one meant moving through scripts then local variable then triggers and to set another one you have to go through the process again and also other things if the one unit does something more complicated. Compare that to just Change Teams(if it was more reliable), everything would be done in scripts only.

I get that local variables are the only way. I was just thinking about the simplicity in comparison since local variable doesn't get arranged alphabetically and if there is a lot of them or you decide to add more local variables for a unit you've finished before then it would separate probably multiple times.

I always have to open up the game just to find out I did something wrong and then exit and then think hard on how I could fix it and when I think I solved the problem I open up the game and it still doesn't work and repeat all over again.

It's not that I don't like advanced stuff. In fact, I've been making my own logic in datapacks in Minecraft. The difference of course is that this is an old game that gets "updates" from the community like Phobos and Ares. The updates are great! They add more mechanics and optimize the game. But I don't even know if they can simplify or make it easier to add things in the game like using .png or separating units into their own file like buildings can just have all of their data from different .inis into one. This would make it easier to find the problem and fix it easily. Because right now when the Siege Chopper is deployed and it attacks it crashes the game and I didn't even know I did something with the Siege Chopper specifically the deployed one SCHD considering I've been using a different chopper I've added in the game and never touched the Siege Chopper or at least I thought I didn't.

Back to top
View user's profile Send private message
McPwny
Chem Warrior


Joined: 29 Jan 2018

PostPosted: Mon Aug 28, 2023 7:37 pm    Post subject: Reply with quote  Mark this post and the followings unread

well it is an extra step, but it only takes about ten seconds. the hard part is only understanding how it works, which is why
knowing how to do it will make your maps that much better than average.

ps. if its crashing the moment it attacks, something is wrong with the weapon or projectile. if it crashes when the projectile hits, its the warhead.

_________________
visit my moddb profile for .shp downloads and stuff

Back to top
View user's profile Send private message
Ousagi
Cyborg Soldier


Joined: 02 Nov 2022

PostPosted: Tue Aug 29, 2023 1:45 am    Post subject: Reply with quote  Mark this post and the followings unread

Yes that is what I was trying to do is add detail. But as for the projectile, the Image=120MM seems to be bugged again. Compared to the other voxel projectiles I have, this crashes the game unless I change it to Image=120mm. Which is weird since in the art.ini its [120MM]. And even compared to my PULSAR2 projectile, I could misspell it like Image=Pulsar2 and the game would still run without crashing and projectile just doesn't appear. I even made both projectiles the same in art.ini and [120MM] just crash game.
Code:
[PULSAR2]   ; Vovel=yes makes bullet go down
;Trailer=DURASMOKE
Voxel=yes
UseLineTrail=yes
LineTrailColor=85,212,255
LineTrailColorDecrement=4
SpawnDelay=10                ;was 2
Rotates=yes

[120MM]
Trailer=DURASMOKE
Voxel=yes

And this is what I made to test what made [120MM] crash:
Code:
[PULSAR2]  
Trailer=DURASMOKE
Voxel=yes

[120MM]
Trailer=DURASMOKE
Voxel=yes

PULSAR2 still works but 120MM crashes.

Last edited by Ousagi on Tue Aug 29, 2023 3:35 am; edited 1 time in total

Back to top
View user's profile Send private message
gameaddict11707
Grenadier


Joined: 15 Jul 2011

PostPosted: Tue Aug 29, 2023 2:33 am    Post subject: Reply with quote  Mark this post and the followings unread

Take "Voxel=yes" away from PULSAR2 and 120MM. The game's probably crashing because it's trying to find those voxel & hva files and it can't.

_________________
aka SavebearingBoss

Back to top
View user's profile Send private message
Ousagi
Cyborg Soldier


Joined: 02 Nov 2022

PostPosted: Tue Aug 29, 2023 3:29 am    Post subject: Reply with quote  Mark this post and the followings unread

PULSAR2 works. Actually both of them works with voxel=yes. It's just that 120MM requires to be spelled Image=120mm in projectile so it won't crash. The PULSAR2 has no issue and it does appear with the voxel I created for it. A difference between the two is using Image=PULSAR2 makes the projectile appear while Image=Pulsar2 does not. In comparison, Image=120MM crashes the game while Image=120mm shows the projectile normally. 120MM came from the original RA2MD.mix. It came from the original game. It's what's used with Rhino and Grizzly Tanks so I don't get why it won't have a voxel. I'm just wondering why PULSAR2 works only with proper capitalization and 120MM needs to be changed to 120mm to work and also not crash the game

Back to top
View user's profile Send private message
Mig Eater
Defense Minister


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Tue Aug 29, 2023 10:05 am    Post subject: Reply with quote  Mark this post and the followings unread

120MM is a SHP file & not a voxel.

_________________



Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID YouTube User URL Facebook Profile URL Twitter Channel URL
Ousagi
Cyborg Soldier


Joined: 02 Nov 2022

PostPosted: Tue Aug 29, 2023 12:46 pm    Post subject: Reply with quote  Mark this post and the followings unread

IT IS?! Then what is 120mm? It appears in the game when a unit use a weapon with projectile with 120mm.

Damn, I would have never have guessed shp with voxel=yes would cause a problem. Especially since 120mm made it seem like 120MM works but only with a different spelling.

But thanks everyone for the help!

Back to top
View user's profile Send private message
Mig Eater
Defense Minister


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Tue Aug 29, 2023 4:47 pm    Post subject: Reply with quote  Mark this post and the followings unread

The [120mm] weapon uses Projectile=Cannon, [Cannon] uses Image=120MM, 120MM is a shp file that you can find within the conquer.mix.

Adding voxel=yes will make the game look for a 120mm.vxl file instead of the default SHP file, if the game is unable to find the voxel file it will crash.

_________________



Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID YouTube User URL Facebook Profile URL Twitter Channel URL
Ousagi
Cyborg Soldier


Joined: 02 Nov 2022

PostPosted: Tue Aug 29, 2023 8:24 pm    Post subject: Reply with quote  Mark this post and the followings unread

I know about the weapon but...
This works:
Code:
[120mm]
Damage=60
ROF=65
Range=5.5
Projectile=Cannon
Speed=40
Warhead=AP
Report=RhinoTankAttack
Anim=GUNFIRE
Bright=yes

[Cannon]
Image=120mm
Arcing=true
SubjectToCliffs=yes
SubjectToElevation=yes
SubjectToWalls=yes

While this crashes:
Code:
[160mm]
Damage=90
ROF=100
Range=12
MinimumRange=0
Projectile=Ballistic
Speed=10
Warhead=SCHOPWH
Report=SeigeChopperAttackDeployed
Anim=GUNFIRE
Lobber=no
;Lobber=yes

[Ballistic]
Image=120MM
Arcing=true
SubjectToCliffs=no
SubjectToElevation=yes
SubjectToWalls=no

I was referring to Image=120mm working, while Image=120MM crashing which was what was confusing me at the time. Because I use the Rhino Tanks just fine but the crash just happened with the deployed Siege Chopper. That was what made me think it was a voxel.

You can replicate this by giving [120MM] in artmd.ini voxel=yes and use Image=120mm in [Cannon] and the projectile still works without crashing. I get the voxel=yes makes the game find the for a voxel file already. I was just explaining how I got into this situation by having a working Image=120mm

Back to top
View user's profile Send private message
Mig Eater
Defense Minister


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Tue Aug 29, 2023 8:41 pm    Post subject: Reply with quote  Mark this post and the followings unread

When you use the lower case the game is probably skipping the art ini entry because its in higher case & instead directly loading the shp.

_________________



Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID YouTube User URL Facebook Profile URL Twitter Channel URL
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [16 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
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.1887s ][ Queries: 11 (0.0091s) ][ Debug on ]