ascottk on 23/9/2005 at 18:49
Rope Arrow Tutorial: Second EditionThis will keep updating depending on discoveries and bug-fixes.
First of all, thanks to Rantanko for the solid foundation, New Horizon for simplifying rope arrow creation (undeletion), str8r8 for the rope skeletal mesh, and everyone else involved with this project.
A new video:
(
http://www.youtube.com/watch?v=khPWcMmMmxQ)
Creating the Rope Arrow (Rantanko)Open the Actor Class Browser and create a new archetype under WorldObj -> InventoryObject -> PowerUp -> Arrow, and call it RopeArrow. You probably could create it under BroadheadArrow, but I didn't in case it inherited any properties I didn't want from the Broadhead. Add the following properties to your RopeArrow:
Contact -> ContactResponse: eCR_Stick_On_Material_Or_DestroyInventory -> HelpText: < string=T_InventoryHelpTextRopeArrow >Inventory -> InvName: < string=t_RopeArrow >For some reason this forum won't let me write these bits properly - there are really no spaces in the HelpText or InvName properties.
Inventory -> MaxInventoryStack: 5You can set this property to whatever you want, but I thought a low value would be best because these things could be pretty useful - and valuable.
Render -> FXMaterial: (Material=”MemHiLite”,Mode=FXMaterialMode_None)Render -> ObjectMesh: INVarrowSHAFT1A1 (Default)This can be found in Static Meshes -> INV_WEAPON_UI -> GarrettWeapons
Scripts -> TriggerScripts: RopeArrowSound, ArrowPhysicsChange, HilightArrowOff, HilightArrowOnThe next few are all under Stimulus
Stimulus -> ContactXfrInfo -> DeleteOnXfr: TrueInactive: TrueStim -> [0] -> Amount -> Amount: 1.00Stimulus: StimulusType_DX2BulletTotalTime: 0.00This allows the RopeArrow to be used like a broadhead as in T1/2, but does less damage. You could leave it out if you want.
[1] -> Amount -> Amount: 1500.00Stimulus: StimulusType_ImpulseTotalTime: 0.00Now right click the RopeArrow archetype and click Placeable/Unplaceable.
We now have an arrow, but it has no arrowhead, and doesn't yet spawn ropes. It also has no help text (more on this later).
Creating the ArrowheadA static mesh for the rope arrow head already exists, but we'll have to create a new actor so we can link it to the arrow. In the Actor Class Browser create a new archetype under MetaData -> UI and call it RopeArrowhead. Give your RopeArrowhead these properties:
Inventory -> HelpText: < string=t_InventoryHelpTextRopeArrow >
Inventory -> InvName: < string=t_RopeArrow >Don't know why these are needed here, but all other arrows have these on both the arrow and the arrowhead. Again, there are no spaces in those properties, but the forum won't let me post them like that.
Render -> ObjectMesh: INVarrowheadROPE (Default)
Render -> RenderType -> DrawType: DT_StaticMesh
Render -> RenderType -> Style: STY_NormalGo back to the RopeArrow archetype you made earlier and open its Links (right click, show links). Create a
RigidAttachment link FROM RopeArrow TO RopeArrowhead. Click Edit Selected Link and set up the following properties: (I can't remember which are set like this by default, so I'll list them all)
Attachment -> m_attachmentBone: hp_arrowshaft
Attachment -> m_parentBone: HP_arrowhead
Hidden -> bDontPropogateHiddenFlagToChild: False
Highlight -> bPropagatesHighlight: True
Lifetime -> bDeleteChildOnDeath: True
Link -> m_GroupName: None
Link -> m_name:
Spawn -> bDontSpawn: False___________________________
Add a script called RopeArrowSpawn1 to RopeArrow (Rantanko, ascottk):
CONDITIONS:
[INDENT]When I come to rest for the first time[/INDENT]
ACTIONS:
[INDENT]Spawn object of type at end of [Triggerscript] at hard point [HP_Stick] on linked object(s) [MYSELF]
Delay [1.00] GAME seconds
Destroy linked object(s) [MYSELF] *This is necessary for "arrow" retrieval* (frob the rope)
Reset script conditions and actions[/INDENT]
___________________________
The Dummy SpawnNew archetype (I called RopeArrowDummy) underneath InventoryObject>PowerUp>Arrow.
Add ObjectMesh under Render and use INVarrowROPE.
Add a script called RopeArrowDummyDelete to this archetype
___________________________
CONDITIONS:
[INDENT]On script startup[/INDENT]
ACTIONS:
[INDENT]Destroy linked object(s) [MYSELF]
Reset script conditions and actions[/INDENT]
___________________________
That's it for that one
The Rope Arrow "Ladder(s)"First download the rope skeletal and unzip it into the CONTENT\SkeletalMeshes folder.
Skeletal and Static meshes
(
http://www.redfox-media.com/jayb-productions/SMeshes/download.php?id=65)
Creating the Spawning RopeAdd a new archetype under WorldObjects>Environmental>Ladder called RopeArrowSpawn.
Under Render add SkeletalTag then type in GARrope.
Under Actor it should be: bNotMoveablePhysics/Render=False
Sound>SoundSpawn: hit_arrowrope
Add a script called RopeArrowAnim:
___________________________
CONDITIONS:
[INDENT]On script startup[/INDENT]
ACTIONS:
[INDENT]Delay [0.50] GAME seconds
Start my animation [GARrope20] with rate [1.00]
Delay [2.00] GAME seconds
Destroy linked object(s) [MYSELF]
Reset script conditions and actions[/INDENT]
___________________________
Creating the Climbing Rope (Rantanko, ascottk)The rope is the most problematic part of this arrow. Rope actors do exist, but none of them work, so we're going to have to make our own. Open the Static Mesh Browser, select SETDRESSING -> Ladders -> GENrope16 and place one in your map (doesn't matter where, it'll be deleted later anyway). Now open the texture browser and Import All Matlibs. Then go into T3_GEN and select the texture GEN_ROPE. Find your rope in the 3D window and ALT-Leftclick it - this will apply the rope texture. You then need to right-click the rope, expand the Static Mesh menu and click Add New Skin (or something like that - I can't remember the exact name - could someone post it in here). Call your new skin something obvious, like ‘Rope'. When you try to save your map, you will get a message about unpublished skins - you can get rid of this by clicking Tools -> Auto-Publish meshes in this Map, then doing a few Build Alls.
Now open the Actor Class Browser again. Create a new archetype under WorldObj -> Environmental -> Ladder and call it RopeArrowLadder. Give the following properties to the RopeArrowLadder:
Actor -> bNotMoveablePhysics: True
Actor -> bNotMoveableRender: True
Frob -> FrobBias: 100.00
Frob -> IsFrobbable: True
Highlight -> HighlightDist: 256These frob settings will be needed later.
Render -> ObjectMesh: GENrope16 (Rope)This is why we made the new skin earlier.
Linking Things Together (Rantanko, ascottk)Now create a
HUDRender link FROM RopeArrow TO RopeArrowhead.
Another link: a
TriggerScript link FROM RopeArrow TO RopeArrowDummy.
A third link: a
DeathSpawn link from RopeArrowDummy to RopeArrowSpawnalter the link's properties:
Hardpoint>m_parentBone>RopeAttach
Spawn>m_bTakeParentRotation=False
Spawn>m_numberToSpawn=1
A fourth link: a
DeathSpawn link from RopeArrowSpawn to RopeArrowLadderproperties:
HardPoint>m_parentBone=Bone01
Spawn>m_bTakeParentRotation=False
Spawn>m_numberToSpawn=1
Trigger ScriptThat's right - there's just one new Trigger script involved. Open the Trigger Script Manager and create a new script (for the sake of convenience, I put mine in the Weapons group) and call it RopeArrow1.
___________________________
The Conditions are:
[INDENT]
When I am frobbed by player[/INDENT]
The Actions are:
[INDENT]
Add [1] [RopeArrow] objects to the player inventory
Play sound schema [pu_power]
Destroy linked object(s) [MYSELF]
Reset script conditions and actions[/INDENT]
___________________________
Finally go back to your RopeArrowLadder in the Actor Class Browser and give it the property Scripts -> TriggerScripts: RopeArrow1.
And that's it - the rope arrow is now ready for use! Just place the RopeArrow archetype - the other parts will follow (you can also put it in the default inventory if you want).
Setting up the Help TextThis part is completely optional. Each type of arrow in T3 displayed an on-screen help message the first time you picked one up. This is how to do it.
Open the file CONTENT\T3\Books\English\String_Tags\Inventory.sch and create a new entry, which should look like this:
TextEntry
T_InventoryHelpTextRopeArrow
lang_english 2005-03-31 11:49:50 "When a rope arrow is fired at a wooden surface, a rope will extend straight downward from the point of impact. These ropes can be climbed just like ladders."
lang_french 2005-03-31 11:49:50 "When a rope arrow is fired at a wooden surface, a rope will extend straight downward from the point of impact. These ropes can be climbed just like ladders."
lang_german 2005-03-31 11:49:50 "When a rope arrow is fired at a wooden surface, a rope will extend straight downward from the point of impact. These ropes can be climbed just like ladders."
lang_italian 2005-03-31 11:49:50 "When a rope arrow is fired at a wooden surface, a rope will extend straight downward from the point of impact. These ropes can be climbed just like ladders."
You can make the text in the quotes say whatever you want, but the entry must be called ‘T_InventoryHelpTextRopeArrow'.
Now go to your CONTENT\T3\Books\English folder and make a copy of the file ‘InvHelp_FireArrow.sch' (any file with InvHelp in front of it will work). Change the file name to ‘InvHelp_RopeArrow.sch'. Open the file and change all the instances of ‘Fire' to ‘Rope'. Save this, and open T3Ed.
In T3Ed click View -> Global Variables -> Flags. In the window that appears, type ‘HelpTextRopeArrowDone' in the white box at the top, and click OK. It is this which will let the game know when to display the help text. Now open the Trigger Script Manager and create a new script (for the sake of convenience I put mine in the HelpPopUps group). Call it ‘HelpPopUpRopeArrow'.
___________________________
The Conditions are:
[INDENT]
When I am frobbed by player
Query if flag [HelpTextRopeArrowDone] is set to [FALSE][/INDENT]
The Actions are:
[INDENT]
Set flag [HelpTextRopeArrowDone] to [TRUE] expires on map change [FALSE] expires on mission [20]
Popup a window with text from the file [InvHelp_RopeArrow.txt][/INDENT]
___________________________
Open the Actor Class Browser, and give your RopeArrow the property
Scripts -> Trigger Scripts: HelpPopUpRopeArrow.
Now the help text will be displayed the first time you pick up a Rope Arrow, but will not be displayed again, just like all the other arrows. (The same method can be used to give help text to any other custom arrows, or any object.)
(If your arrow doesn't show the name 'Rope Arrow' when you select it in inventory, you will need to create a new entry in Inventory.sch called T_RopeArrow - it should be there already, presumably from before the developers stopped doing rope arrows).
Known problems (Rantanko): There are a few bugs in this arrow.
Ladder Animations - because the rope animations are pretty bad, this uses standard ladder animations. This of course means that you can only climb two sides of the rope (it seems to be the ones facing east and west), and if you are very unlucky Garrett will climb through a solid wall or roof when trying to climb off the top of the rope.
Retrieving the Arrow - one of the useful things about the T1/2 rope arrows was that they could be reused by frobbing the arrow, you have to frob the rope instead. You should try to make sure you're not on the rope when you do this, because Garrett will do his *climbing off the top of a ladder* thing when the rope vanishes - often making him climb through the roof.
Also the skeletal mesh disappears at certain angles & the GARrope static mesh is hard to start climbing with. But once you start climbing it's great.
Rantako on 23/9/2005 at 21:03
Hmm. Problem.
The animation isn't playing. I just get the RopeArrowLadder spawning without animations. Although, everything else works perfectly - the rope spawns only on wood, and it spawns straight up and down!
A few things in the tutorial... (mostly typos or bits missed in the other tutorial)
The RopeArrow deleted archetype needs the property
Inventory -> MaxInventoryStack added to it (I used a value of 5)
Quote:
Under Advanced it should be: bNotMoveablePhysics/Render=False
bNotMoveablePhysics and
bNotMoveableRender are under Actor, not Advanced.
The RopeArrowLadder should also have the property
Sound -> SoundSpawn: hit_arrowrope. This makes the sound of an unfolding rope when it spawns. (Although it might actually be better to put this property on the RopeArrowSpawn, so the sound plays while the animation does, rather than when the climbable rope appears)
You also need to make a RigidAttachment link from RopeArrow to RopeArrowhead, with the properties:
Attachment -> m_attachmentBone: hp_arrowshaft
Attachment -> m_parentBone: HP_arrowhead
Hidden -> bDontPropogateHiddenFlagToChild: False
Highlight -> bPropagatesHighlight: True
Lifetime -> bDeleteChildOnDeath: True
Link -> m_GroupName: None
Link -> m_name:
Spawn -> bDontSpawn: FalseQuote:
Spawn object of type at end of [Triggerscript] at hard point [RopeAttach] on linked object(s) [MYSELF]
I remember having problems with this before. In some people's T3 (mine, for example)
there is no hardpoint called RopeAttach on the smesh INVarrowSHAFT1A1. Obviously this stops the RopeArrowSpawn1 script working. To make it work I had to change this to CENTER or HP_arrowhead, and I'm fairly sure it's because of this the animation isn't playing. You should maybe put a warning about this problem in the tutorial.
Quote Posted by New Horizon
How bad are the rope climbing animations?
If I remember correctly, you have to press jump and forwards at the same time to climb the rope. Although you could turnright round the rope, climbing like this was so annoting I used the ladder settings.
Now to see if I can get the animation working...
ascottk on 24/9/2005 at 00:08
Quote:
You also need to make a RigidAttachment link from RopeArrow to RopeArrowhead, with the properties:
Attachment -> m_attachmentBone: hp_arrowshaft
Attachment -> m_parentBone: HP_arrowhead
Hidden -> bDontPropogateHiddenFlagToChild: False
Highlight -> bPropagatesHighlight: True
Lifetime -> bDeleteChildOnDeath: True
Link -> m_GroupName: None
Link -> m_name:
Spawn -> bDontSpawn: FalseI remember having problems with this before. In some people's T3 (mine, for example)
there is no hardpoint called RopeAttach on the smesh INVarrowSHAFT1A1. Obviously this stops the RopeArrowSpawn1 script working. To make it work I had to change this to CENTER or HP_arrowhead, and I'm fairly sure it's because of this the animation isn't playing. You should maybe put a warning about this problem in the tutorial.
If I remember correctly, you have to press jump and forwards at the same time to climb the rope. Although you could turnright round the rope, climbing like this was so annoting I used the ladder settings.
Now to see if I can get the animation working...
I just used the INVarrowROPE mesh instead of INVarrowSHAFT1A1 because the rigidattachment link wasn't working for me.
I tried the Climber>blsRope=True & I didn't like it so much. It's too slow & you have to keep pumping the space bar. If we use that then we could also add a rigidattachment to the RopeArrowLadder @ the top (I don't know what mesh to use though) and put Climber>blsLadder to that.
I'll post the *.uc file of the RopeArrowSpawn from the exported gamesys. That might be why the animation doesn't work for you guys.
Code:
//=============================================================================
// P_51.
//=============================================================================
class P_51 extends D_302;
classproperties
{
ClassVisibleName="RopeArrowSpawn"
ClassPlaceableStatus=TRUE
}
defaultproperties
{
Begin Links
Begin SourceLinks
Begin Link
Point=T3Gamesys.P_52
Begin LinkObject Class=DeathSpawnLinkDataObject Name=DeathSpawnLinkDataObject__65
m_bTakeParentRotation=False
m_parentBone="Bone01"
Name="DeathSpawnLinkDataObject__65"
End LinkObject
End Link
End SourceLinks
End Links
Mass=10.000000
Physics=PHYS_Havok
InitialHavokState=Havok_HavokControlled
StartActive=False
Gravity=(X=1.000000,Y=1.000000,Z=1.000000)
MassPounds=10.000000
Friction=0.500000
ControlledObjectImpulse=(MinImpulse=100.000000,MaxImpulse=1.000000)
bNotRagdoll=True
bNoMultisphere=True
SwingAction=(MaxForce=(X=50.000000,Y=50.000000))
RenderType=(DrawType=DT_Mesh,Style=STY_Normal)
SkeletalTag="GARrope"
SkeletalScale=(X=1.000000,Y=1.000000,Z=1.000000)
bUsePivotForCenter=True
LoadAllSkins=True
Skins(0)=Texture'T3_GEN.T3_GEN.GENrope_D'
Skins(1)=Texture'T3_GEN.T3_GEN.GENiFABRICcotn_DTPaganGreen'
Skins(2)=None
Skins(3)=None
RenderFlags=()
Transparency=0.000000
MaterialSkin="Default"
AnimSequence="None"
AnimFrame=0.000000
AnimRate=0.000000
TweenRate=0.000000
AnimationScaleFactor=(timeScale=0.500000)
CollisionHeight=22.000000
CollisionFlags=(bCollideActors=True,bCollideWorld=True,bBlockActors=True,bBlockPlayers=True,bProjTarget=True)
bBounce=False
bOverrideSMFlag_BlocksCamera=False
bHidden=False
bNoDelete=False
bAlwaysDraw=False
bOutOfWorld=False
TriggerScripts(0)="TS_4314"
SoundSpawn="hit_arrowrope"
MaterialCategory=14
bObjectsStickIn=False
bIsClimbable=True
MaterialOverride=14
bUsesSpawnProjectile=True
bNotTickable=False
bNotMoveableRender=False
bNotSpawnable=False
bNotMoveablePhysics=False
HealthState=HealthState_Alive
MainHealth=(Current=1.000000,Max=1.000000)
DeathResponse=DeathResponse_None
FrobBias=100.000000
CastShadows=ShadowCasting_True
ContactResponse=eCR_Stick_On_Material_Or_Destroy
AINearObjectTag="rope"
IsFrobbable=True
HighlightDist=200
bIsLadder=False
bIsRope=True
ForceType=FT_DragAlong
}
a lot of this was just experimental & I don't know which properties are necessary