IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Is it possible to trigger tech unlocks via building entry?
IntoTheRain
post 7 Sep 2017, 19:54
Post #1



Group Icon

Group: Members
Posts: 80
Joined: 4 October 2014
Member No.: 10670



I'm wondering if its possible to enable upgrades for a unit if an enemy building is infiltrated similar to RA2 Spies.

To make this work, I would need to set a unit to enter the building (or disappear on successful infiltration) and then activate the requisite upgrade on successful infiltration. Ideally I could trigger different upgrades for different buildings.

Anyone know of a way to accomplish this?
Go to the top of the page
 
+Quote Post
ComradeGeneral
post 8 Sep 2017, 22:21
Post #2



Group Icon

Group: Members
Posts: 22
Joined: 5 June 2016
From: Murica
Member No.: 12935



I have no idea if any of this would work, and I can only get so far.

Giving the infiltration unit its own KindOf (OBSTACLE, PROP, BLAST_CRATER, have little or no uses in the ini it seems.), something that isn't used on any other infantry. Add a GarrisonContain with 1 slot to the buildings that the unit can infiltrate.

Add these to the module:

AllowEnemiesInside = Yes
AllowInsideKindOf = <whater KindOf is on the infiltration unit>

But then I'm lost from there. In theory it'll be able to garrison the enemy structure, but I don't think you can enable an upgrade like that without scripting in Worldbuilder.

None of this may work too ¯\_(ツ)_/¯


--------------------
Shockwave "Good" Balance Mod:
ModDB Page
Latest date: October 3rd, 2017
Update 15 includes a life worth living.
Go to the top of the page
 
+Quote Post
ai_beyondcontrol
post 9 Sep 2017, 9:41
Post #3



Group Icon

Group: Members
Posts: 40
Joined: 18 June 2015
From: Shanghai,China
Member No.: 11608



I think it would be possible, while it would also be quite complicated. Here's some of my opinion.

The problem mainly lies in the fact that in ZH unit would simply not attempt to "enter" any enemy object (even if it has container module) and instead would try to attack them. If you don't mind the cursor problem and simply want your spy unit to disappear like it does in RA2, then here's the thoughts:

1.Give enemy tech center a FireWeaponCollide that only works when it has a specific Status tag. This weapon's DamageType should only affects spy units with sufficient damage to kill them instantly. It shall have a unique DeathType setting.
2.Give spy unit a a STATUS weapon (like the one on US Avenger unit) to generate the Status tag mentioned above to trigger tech center's FWC module. Also this weapon shall has 1 range so it would approach to enemy center as close as they could. Note that this weapon should have a invisible projectile and a ProjectileDetonationOCL (generates something that could collide with the building) to trigger the FWC module.
3.Set spy unit's death behavior. When spy unit die with the DeathType set in Step(1), the spy unit would die as DestroyDie (So they simply disappear without playing the normal death anim) .The death also triggers a CreateObjectDeath which takes in effect only for that specific DeathType, which generates an misc object with no art perimeter, no physics behavior , no select, no collision and invulnerable armor.
4.Set your stolen unit's prerequisite as the object generated.

If everything works fine, then you should be able to order your spy to "Infiltrate" (Attack) enemy tech center to "steal tech". The spy would approach the tech center as close as possible. When spy's "status weapon" is fired, enemy tech center's FWC would be triggered, killing the spy unit in a unique death type. The spy's death would generate the prerequisite object to produce the "stolen unit".

The flaw of this system would be as followed.
1.The spy unit would "attack" enemy building instead of "entering" them, causing some problem in cursor display.
2.It requires a unique DamageType, a unique DeathType and a unique Status tag.
3.The spy unit would be considered Dead when the cycle's complete, which would count as unit lost and play "unit lost" eva sound.
4.The command button that builds the stolen unit must be pre-placed in the factory's control panel. However, if you aims at single-player only, then it might be possible to fix that using WorldBuilder scripts.
5.I haven't thoroughly considered whether it would affect anything else.

Have fun. biggrin.gif

This post has been edited by ai_beyondcontrol: 9 Sep 2017, 9:46
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 20 January 2018 - 21:27