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 Wed Apr 24, 2024 1:08 pm
All times are UTC + 0
Stealth crate pick up
Moderators: Global Moderators
Post new topic   Reply to topic Page 1 of 1 [6 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Madin
Plasma Trooper


Joined: 05 Apr 2009

PostPosted: Thu Jan 13, 2011 2:59 am    Post subject:  Stealth crate pick up
Subject description: How to code?
Reply with quote  Mark this post and the followings unread

I'm adding a couple of crate surprise options and I'm now stuck on how to code a stealth crate pick up.
I would basically like it work like the Nod player power except it will be able to effect anything the player has, the infantry killer weapon would be removed and the radius of effect would be much smaller.

I checked the Nod operation centre and saw that the 'Cloaking field' power is controlled using a 'GrantUpgradeAreaOfEffectSpecialPower' module.
This allows the for the 'Upgrade_CloakingFieldInvisibility' (the actual upgrade that grants the ability) as well has controlling the radius and launchFX.

I've been using a 'FireWeaponWhenDead' module has advised by Stygs for controlling a lot of my crate surprises, but I fear that this will not do for this particular surprise.

Anyone have any creative solutions for this problem?

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


Joined: 16 Jul 2005

PostPosted: Thu Jan 13, 2011 3:09 am    Post subject: Reply with quote  Mark this post and the followings unread

hmm...make a unit crate, inside it is a mobile stealth tower and attach to nearby unit?

Back to top
View user's profile Send private message
Stygs
Cyborg Cannon


Joined: 27 Nov 2005
Location: Germany

PostPosted: Thu Jan 13, 2011 8:00 am    Post subject: Reply with quote  Mark this post and the followings unread

Well, the only thing that comes to mind would be a dummy unit that fires a small range cloaking field SP at it own position and then dies.

Pretty sure there is a LUA command to fire a SP,, but I never bothered with that. Sad

_________________

Back to top
View user's profile Send private message Skype Account
Ju-Jin
Cyborg Firebomber


Joined: 23 Mar 2009
Location: Germany

PostPosted: Thu Jan 13, 2011 9:19 am    Post subject: Reply with quote  Mark this post and the followings unread

Not needed, there is a special power nugget. But yes there are LUA commands for that too.

_________________

Back to top
View user's profile Send private message Skype Account
Stygs
Cyborg Cannon


Joined: 27 Nov 2005
Location: Germany

PostPosted: Fri Jan 14, 2011 8:44 am    Post subject: Reply with quote  Mark this post and the followings unread

That sounds like a possible way - there is also a InheritUpgradeCreate that seems to grant upgrades around itself, but I am not sure how that works.





EDIT: OK, I found a way to get the Stealth Crate working. You need my basic crate system from the other topic, but other than that it worked fine.
Its basicly a dummy that fires the CloakingField SP (placeholder, needs a repacement) at its own position and the dies.

Code:

   <GameObject
      id="StealthCrate"
      inheritFrom="UnitCrateMP_Dummy"
      EditorName="StealthCrate">
      <Behaviors>
         <UnitCrateCollide
            xai:joinAction="Replace"
            id="ModuleTag_CrateCollide"
            UnitCount="1"
            UnitType="CrateDummy_StealthCrate" />
      </Behaviors>
   </GameObject>

   <GameObject
      id="CrateDummy_StealthCrate"
      inheritFrom="CrateDummy_GDIRifleSoldierSquad">
      <Behaviors>
         <SlowDeath
            xai:joinAction="Replace"
            id="ModuleTag_Death"
            DestructionDelay="0.1s">
            <Weapon
               Type="INITIAL">
               <Weapon>StealthCrateTriggerWeapon</Weapon>
            </Weapon>
            <DieMuxData
               DeathTypes="ALL" />
         </SlowDeath>
         <GrantUpgradeAreaOfEffectSpecialPower
            id="ModuleTag_CloakingField"
            UpdateModuleStartsAttack="true"
            SpecialPowerTemplate="SpecialPower_CloakingField"
            TriggerFX="FX_NodCloakingField"
            Radius="350">
            <AcceptObjectFilter
               Rule="ANY"
               Relationship="ALLIES"
               Include="VEHICLE HUGE_VEHICLE"
               Exclude="AIRCRAFT"
            />
            <UpgradeTemplate>Upgrade_CloakingFieldInvisibility</UpgradeTemplate>
         </GrantUpgradeAreaOfEffectSpecialPower>
      </Behaviors>
   </GameObject>

   <WeaponTemplate
      id="StealthCrateTriggerWeapon">
      <Nuggets>
         <SpecialPowerNugget SpecialPowerTemplate="SpecialPower_CloakingField" />
      </Nuggets>
   </WeaponTemplate>



Seems to work fine so far, but you need to make a new SP for it course.

Btw, thanks for making this topic, I had given up on this crate for a looooonnnng time Smile

_________________

Back to top
View user's profile Send private message Skype Account
Madin
Plasma Trooper


Joined: 05 Apr 2009

PostPosted: Thu Sep 15, 2011 4:02 am    Post subject: Reply with quote  Mark this post and the followings unread

I cannot get it to work.
Code:
<GameObject id="UnitCrateMP_Stealth" inheritFrom="UnitCrateMP_Dummy" EditorName="UnitCrateMP_Stealth">
<Behaviors>
<UnitCrateCollide id="ModuleTag_CrateCollide" UnitCount="1" UnitType="CrateDummy_UnitCrateMP_Stealth">
<!--ExecuteFX="FX_CrateAmour"
 -->
 </UnitCrateCollide>
 </Behaviors>
 </GameObject>


Code:
<GameObject id="CrateDummy_UnitCrateMP_Stealth" Side="Neutral" EditorSorting="UNIT" CommandSet="EmptyCommandSet" KindOf="IMMOBILE INERT UNATTACKABLE NO_COLLIDE" RadarPriority="NOT_ON_RADAR">
 <ArmorSet Armor="NoArmor"/>
 <Draws/>
<Behaviors>
<SlowDeath id="ModuleTag_Death" DestructionDelay="0.1s">
<Weapon Type="INITIAL">
 <Weapon>StealthCrateTriggerWeapon</Weapon>
 </Weapon>
 <DieMuxData DeathTypes="ALL"/>
 </SlowDeath>
 <LifetimeUpdate id="ModuleTag_LifetimeUpdate" MinLifetime="0.1s" MaxLifetime="0.1s"/>
<GrantUpgradeAreaOfEffectSpecialPower id="ModuleTag_CloakingField" UpdateModuleStartsAttack="true" SpecialPowerTemplate="SpecialPower_CloakingField" TriggerFX="FX_NodCloakingField" Radius="100">
 <AcceptObjectFilter Rule="ANY" Relationship="ALLIES" Include="INFANTRY HORDE VEHICLE HUGE_VEHICLE STRUCTURE AIRCRAFT"/>
 <UpgradeTemplate>Upgrade_CloakingFieldInvisibility</UpgradeTemplate>
 </GrantUpgradeAreaOfEffectSpecialPower>
 </Behaviors>
<Body>
 <ActiveBody id="ModuleTag_Body" MaxHealth="9999999.0"/>
 </Body>
 <VisionInfo VisionRange="0" ShroudClearingRange="0"/>
 </GameObject>


Code:
<WeaponTemplate id="StealthCrateTriggerWeapon">
<Nuggets>
 <SpecialPowerNugget SpecialPowerTemplate="SpecialPower_CloakingField"/>
 </Nuggets>
 </WeaponTemplate>


Code:
<SpecialPowerTemplate id="SpecialPower_CloakingField" Flags="WATER_OK SHARED_SYNC NO_FORBIDDEN_OBJECTS" TargetType="LOCATION" RadiusCursorRadius="=$CLOAKING_FIELD_RADIUS" ForbiddenObjectRange="=$CLOAKING_FIELD_RADIUS">
<ForbiddenObjectFilter Rule="ANY">
 <IncludeThing>AlienCrystalShield</IncludeThing>
 </ForbiddenObjectFilter>
 </SpecialPowerTemplate>


Nothing happens.
-------------------------------------------------------------------------------
Also:
I'd like to create a crate pick up that gives the player a single use super weapon (like the crate pick ups of the older games).

The Pick up would show the super weapon in the player power buttons and would count down has normal.
Any side would be able to randomly pick up any super weapon crate. They could pick up 3 unique super weapon crates, but not more than one of the same type of super weapon.

Any tips on how I could go about coding this?

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [6 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
Quick Reply
Username:


If you are visually impaired or cannot otherwise answer the challenges below please contact the Administrator for help.


Write only two of the following words separated by a sharp: Brotherhood, unity, peace! 

 
You can post new topics in this forum
You can 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.1986s ][ Queries: 11 (0.0089s) ][ Debug on ]