C&C Labs Forums
»
C&C Maps and Modding
»
RA3: Modding
»
Units from modified crate have no second abilities
Private Joined: 12/19/2012(UTC) Posts: 7 Location: Berlin Thanks: 1 times
|
Hi, I am trying to add more crates so I can get units out of them. It is already working somewhat but I can't use the "f" key / second ability of the units from the crates. As an example I can't get the mcv to transform it to its building and can't get mecha tengu to fly, I can command the unit and it attacks too but it just not transforms. Any ideas what I am missing ? Here a content of the allied mcv xml file I use: Code:<?xml version="1.0" encoding="us-ascii"?>
<AssetDeclaration xmlns="uri:ea.com:eala:asset" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Tags></Tags>
<Includes>
<Include type="all" source="DATA:GlobalData/GlobalDefines.xml" />
<Include
type="all"
source="ART:NPCrate01.w3x" />
</Includes>
<GameObject
id="AlliedMCVCrate"
SelectPortrait="Portrait_Neutral_Crate"
ButtonImage="Button_Neutral_Crate"
Side="Neutral"
EditorSorting="UNIT"
TransportSlotCount="1"
BuildTime="0"
CommandSet="EmptyCommandSet"
KindOf="SELECTABLE IMMOBILE NOT_AUTOACQUIRABLE UNATTACKABLE CAN_CAST_REFLECTIONS CRATE"
RadarPriority="STRUCTURE"
PlacementViewAngle="0d"
EditorName="CrateAlliedMCV"
Description="DESC:AlliedMCVCrate">
<DisplayName>NAME:AlliedMCVCrate</DisplayName>
<ObjectResourceInfo>
<BuildCost Account="=$ACCOUNT_ORE" Amount="99999"/>
</ObjectResourceInfo>
<ArmorSet
Armor="NoArmor" />
<Draws>
<ScriptedModelDraw
id="ModuleTag_Draw"
OkToChangeModelColor="true">
<ModelConditionState
ParseCondStateType="PARSE_DEFAULT">
<Model
Name="NPCrate01" />
</ModelConditionState>
</ScriptedModelDraw>
</Draws>
<Behaviors>
<UnitCrateCollide
id = "ModuleTag_CrateCollide"
UnitCount="1"
UnitType="AlliedMCV" />
<DestroyDie
id="ModuleTag_Die">
<DieMuxData
DeathTypes="ALL" />
</DestroyDie>
<CreateObjectDie
id="ModuleTag_CreateObjectDie"
CreationList="OCL_CrateSpawn">
<DieMuxData
DeathTypes="ALL" />
</CreateObjectDie>
</Behaviors>
<Body>
<PropBody
id="ModuleTag_Body" />
</Body>
<Geometry
IsSmall="true">
<Shape
Type= "CYLINDER"
MajorRadius = "9.68515"
MinorRadius = "9.68515"
Height = "16.0349" >
<Offset
x = "0.0348139"
y = "-0.0732222"
z = "0.0" />
</Shape>
</Geometry>
<VisionInfo
VisionRange="1"
ShroudClearingRange="1" />
</GameObject>
</AssetDeclaration>
Edited by user Wednesday, December 19, 2012 9:26:39 AM(UTC)
| Reason: Not specified
|
|
|
|
Major Joined: 3/6/2011(UTC) Posts: 371 Location: The Netherlands
Thanks: 1 times Was thanked: 13 time(s) in 10 post(s)
|
I know the problem, however I don't know how to fix it. You can try to create the unit in the OCL_CrateSpawn list. |
TRA AI developer / hacker, TRA developer, TRA Music hacker, RA3 Trancending Mod creator |
|
|
|
Private Joined: 12/19/2012(UTC) Posts: 7 Location: Berlin Thanks: 1 times
|
Originally Posted by: ZeroMD I know the problem, however I don't know how to fix it. You can try to create the unit in the OCL_CrateSpawn list. Thank you, I'll try if I can get it working that way. //edit Okay, I have tried it using the CrateSpwan list but I found no way to assign the spawned unit to the player that collected the crate. Is there any good documentation about modding ra3 at all ? If not I wonder how people were able to create complete mods like the community patch or red alert 1 on their own. Maybe I am just to dumb for stuff like that. Edited by user Wednesday, December 19, 2012 1:56:53 PM(UTC)
| Reason: Not specified
|
|
|
|
Major Joined: 3/6/2011(UTC) Posts: 371 Location: The Netherlands
Thanks: 1 times Was thanked: 13 time(s) in 10 post(s)
|
Originally Posted by: scachi Originally Posted by: ZeroMD I know the problem, however I don't know how to fix it. You can try to create the unit in the OCL_CrateSpawn list. Thank you, I'll try if I can get it working that way. //edit Okay, I have tried it using the CrateSpwan list but I found no way to assign the spawned unit to the player that collected the crate. Is there any good documentation about modding ra3 at all ? If not I wonder how people were able to create complete mods like the community patch or red alert 1 on their own. Maybe I am just to dumb for stuff like that. Code:<ObjectCreationList
id="OCL_CrateSpawnMCV">
<CreateObject
Options="IGNORE_ALL_OBJECTS"
Disposition="RANDOM_FORCE RELATIVE_ANGLE"
MinForceMagnitude="2.0"
MaxForceMagnitude="7.0"
DispositionIntensity="5.0"
MinLifetime="1.0s"
MaxLifetime="3.s"
MinForcePitch="90d"
MaxForcePitch="75d">
<Offset
x="26.13"
y="4.87"
z="15.99"></Offset>
<CreateObject>CrateDebris_01</CreateObject>
</CreateObject>
<CreateObject
Options="IGNORE_ALL_OBJECTS"
Disposition="RANDOM_FORCE RELATIVE_ANGLE"
MinForceMagnitude="2.0"
MaxForceMagnitude="7.0"
DispositionIntensity="3.0"
MinLifetime="1.0s"
MaxLifetime="3.s"
MinForcePitch="90d"
MaxForcePitch="75d">
<Offset
x="26.13"
y="-4.85"
z="15.99"></Offset>
<CreateObject>CrateDebris_01</CreateObject>
</CreateObject>
<CreateObject
Options="IGNORE_ALL_OBJECTS"
Disposition="RANDOM_FORCE RELATIVE_ANGLE"
MinForceMagnitude="2.0"
MaxForceMagnitude="7.0"
DispositionIntensity="5.0"
MinLifetime="1.0s"
MaxLifetime="3.s"
MinForcePitch="90d"
MaxForcePitch="75d">
<Offset
x="-9.69"
y="-4.85"
z="16.33"></Offset>
<CreateObject>CrateDebris_01</CreateObject>
</CreateObject>
<CreateObject
Options="IGNORE_ALL_OBJECTS REQUIRES_LIVE_PLAYER DO_NOT_COPY_SHADERS DO_NOT_COPY_SCALE"
Disposition="ON_GROUND_ALIGNED">
<CreateObject>AlliedMCV</CreateObject>
</CreateObject>
</ObjectCreationList>
|
TRA AI developer / hacker, TRA developer, TRA Music hacker, RA3 Trancending Mod creator |
1 user thanked ZeroMD for this useful post.
|
|
|
Private Joined: 12/19/2012(UTC) Posts: 7 Location: Berlin Thanks: 1 times
|
Hello, thank you for your help and patience. Am I right that I have to invoke the OCL_CrateSpanMCV in this section of my "AlliedMCVCrate" GameObject ? Code:
<CreateObjectDie
id="ModuleTag_CreateObjectDie"
CreationList="OCL_CrateSpawn">
<DieMuxData
DeathTypes="ALL" />
</CreateObjectDie>
When I replace the OCL_CrateSpawn with the call to OCL_CrateSpanMCV it creates the mcv but it is not controlable - it is grey as no side owns it. This is what I meant in my earlier post Quote:Okay, I have tried it using the CrateSpwan list but I found no way to assign the spawned unit to the player that collected the crate. Do I have to call it from somewhere else ? Edited by user Wednesday, December 19, 2012 4:54:08 PM(UTC)
| Reason: Not specified
|
|
|
|
Major Joined: 3/6/2011(UTC) Posts: 371 Location: The Netherlands
Thanks: 1 times Was thanked: 13 time(s) in 10 post(s)
|
Originally Posted by: scachi Hello, thank you for your help and patience. Am I right that I have to invoke the OCL_CrateSpanMCV in this section of my "AlliedMCVCrate" GameObject ? Code:
<CreateObjectDie
id="ModuleTag_CreateObjectDie"
CreationList="OCL_CrateSpawn">
<DieMuxData
DeathTypes="ALL" />
</CreateObjectDie>
When I replace the OCL_CrateSpawn with the call to OCL_CrateSpanMCV it creates the mcv but it is not controlable - it is grey as no side owns it. This is what I meant in my earlier post Quote:Okay, I have tried it using the CrateSpwan list but I found no way to assign the spawned unit to the player that collected the crate. Do I have to call it from somewhere else ? I'm affraid my solution won't work. The MCV that is created, is not owned by the player. What you can do is to create a dummy object in UnitCrateCollide. The dummy object should have a very short lifetime. When it dies, it can spawn an MCV using the OCL_CrateSpawnMCV ObjectCreationList. |
TRA AI developer / hacker, TRA developer, TRA Music hacker, RA3 Trancending Mod creator |
2 users thanked ZeroMD for this useful post.
|
|
|
Private Joined: 12/19/2012(UTC) Posts: 7 Location: Berlin Thanks: 1 times
|
Originally Posted by: ZeroMD I'm affraid my solution won't work. The MCV that is created, is not owned by the player.
What you can do is to create a dummy object in UnitCrateCollide. The dummy object should have a very short lifetime. When it dies, it can spawn an MCV using the OCL_CrateSpawnMCV ObjectCreationList.
Creating a dummy object, using a very short lifetime and spawning the real unit on the dummy objects death did the trick. Thank you very much.
|
|
|
|
Users browsing this topic |
Guest
|
C&C Labs Forums
»
C&C Maps and Modding
»
RA3: Modding
»
Units from modified crate have no second abilities
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.