Links and Link Types
From FleshWorks
by Krypt
Introduction
When looking through the Script conditions and actions, you may have noticed a lot of them that look like this:
When linked volume(s) [LinkFlavor] are breached by object(s) at end of [LinkFlavor]
- or
Set [Property] to [Value] on linked objects of [LinkFlavor]
So what is this LinkFlavor business? I'll tell you! A link is an invisible connection between two actors. There are many types of links, some which have inherent properties that achieve a variety of results. The different kinds of links are referred to as link flavors. As far as scripting goes, you usually want to use the links that don't have any properties, otherwise you can end up with weird results. There is a TriggerScript link type that is made specifically for scripting use, but I also often used Association links.
Creating Links
To add a link first rightclick the button on the left toolbar that looks like two red circles with an arrow between them. This brings up a list of Link flavors, where you pick the type of link you want to create. You may notice that each is listed twice, the second having a ~ in front of the name. The ~ denotes a reverse version of the link, which you don't really need when creating new links. However it is often used for scripting when you need to use a link that is pointing at the object with the script instead of vice versa. When you pick a Linkflavor and hit OK you are now set to create that type of link. It will also show all existing links of that type in the map as a bunch of lines with big arrow points at the ends going between actors. Now to create a new link highlight the actor you want to link from and CTRL+leftclick the actor you want to link to. You'll see an arrow come up between them.
When using links through script it is important to note what actor the script is on. The LinkFlavor refers to a link going from the actor the script is on (or a link going to it, if the link has a ~ before it). When picking a link from the list in the script browser, you may have noticed there are selectable options for PLAYER and MYSELF. Here is an example condition setup that shows how both of these are used. If you have a script on a volume with the condition
When linked volume(s) [MYSELF] are breached by object(s) at end of [PLAYER] the condition will be met when the player enters the volume. So basically, PLAYER will link to the player and MYSELF links to the object the script is placed on.
Link Types
Here is a comprehensive list of all the link types and a short description of what they do for the ones I remember. GREEN text indicates link flavors that are safe to add manually and use for general purpose scripting. RED text indicates link flavors you probably shouldn't add manually (unless you know what you're doing) or use for scripting unless the link is pre-existing for some other purpose.
- PointAttachment - Physics link that creates a swinging physics object (hanging lightbulb, chandelier etc)
- Projectile - Physics link used for arrow projectiles. No idea what would happen if you added this to something manually
- RigidAttachment - Attaches a mesh to another mesh as though they were one. Example: Hair mesh on AIs, doorknobs on doors, etc.
- SlidingAttachment - Physics link that creates a sliding door
- Alarm - Made for DX:IW alarms, probably doesn't do anything and should be safe to use
- Ammo - No idea
- Association - Doesn't have any inherent functionality. OK to use for scripting
- Attachment_ - No idea
- BreakingBeam - Made for DX:IW beamtriggers, so I don't know what it would do
- CinematicLight - No idea
- CollisionSpawn - Meant to be linked to a gamesys archetype to spawn it when a physics collision occurs(?)
- CreationSpawn - Meant to be linked to a gamesys archetype to spawn it when this object is created(?)
- DeathSpawn - Meant to be linked to a gamesys archetype to spawn it when this object is killed/deleted
- DestroyOnDeath - Destroys linked object when it dies
- Door - Used for scripting stuff involving doors. I don't think it has any inherent functionality, so should be safe to use for scripting
- Elevator - Used for elevators
- ElevatorFloorMarker - Used to link elevator to its floor markers
- FillLight - No idea
- FireEffect - No idea
- Flinderize - Links from a destroyable object to gamesys archetypes to spawn when destroyed
- FragRound - No idea
- FrobEvent - Don't recall what this link was for, but I don't think it has any inherent functionality
- GarrettEquip - No idea
- HighlightEvent - No idea
- HingedAttachment - Physics link that creates a rotating door
- HitSpang - Meant to be linked to a particle effect gamesys archetype to spawn it for a weapon hit effect
- HUDRender - Used for the HUD, definitely don't use this one
- Interest - Don't recall what this link was for, but I don't think it has any inherent functionality
- InvenBook_ - No idea
- InventorySwitch - Another HUD thing, don't use
- Light - Something to do with lights, probably OK to use
- Lock - This associates a lock to lock picking difficulty
- LockAssociation - Used to link a locked door to its locks
- LockTick - I think this is used for the lock interface on the HUD, so I wouldn't use this
- MovementMode - No idea
- Ownership - Links an AI to objects it "owns" and would be pissed if you stole. Used for areas with nonhostile AIs so they react if you steal something right in front of them
- PlayerSetupInfo - No idea
- Power - Originally used in DX:IW for power grid setups, probably doesn't do anything in T3
- PuddleConnector - Something to do with puddles, probably connects a gamesys archetype to the puddle effect it's associated with
- PuddleMark - Something else to do with puddles
- Reference - No idea
- RopeArrowSpawn - Something to do with rope arrows when the game had them, but probably doesn't do anything now. *It does spawn a rope if the rope had a skeletal mesh associated with it. It does not however play the animation and it spawns multiple ropes.
- Sitting - Links an AI to a seat for it to sit in
- SkeletalFireEffect - No idea
- Spawn - Doesn't do anything, safe for script use
- SpawnPool - No idea
- StimulusModifier - No idea
- Swoosh - No idea
- TriggerScript - Your all-purpose link for use with scripts
- UserArmImplementation - No idea, but wouldn't reccomend using
- Vulnerability - Links an AI to its Vulnerability model archetype
- WaypointInterpolation - Used for matinee paths (camvator)
- WeaponMod - Used for DX:IW weapon mods, probably doesn't do anything in T3
Back to Mission Design: Scripting Tutorials Page
