Entity::attachToPhysically
Jump to navigation
Jump to search
breakForce is the amount of force required to break the bond.
p14 - is always 1 in scripts
p15 - is 1 or 0 in scripts - unknoun what it does
p16 - controls collision between the two entities (FALSE disables collision).
p17 - do not teleport entity to be attached to the position of the bone Index of the target entity (if 1, entity will not be teleported to target bone)
p18 - is always 2 in scripts.
Syntax
entity.attachToPhysically(entity2, boneIndex1, boneIndex2, xPos1, yPos1, zPos1, xPos2, yPos2, zPos2, xRot, yRot, zRot, breakForce, fixedRot, p15, collision, p17, p18);Required Arguments
- entity2: Entity handle or object
- boneIndex1: int
- boneIndex2: int
- xPos1: float
- yPos1: float
- zPos1: float
- xPos2: float
- yPos2: float
- zPos2: float
- xRot: float
- yRot: float
- zRot: float
- breakForce: float
- fixedRot: Boolean
- p15: Boolean
- collision: Boolean
- p17: Boolean
- p18: int
Return value
- Undefined
Example
// todoSee also
- Entity.applyForceToCenterOfMass
- Entity.applyForceTo
- Entity.attachToPhysically
- Entity.attachTo
- Entity.clearLastDamage
- Entity.createForcedObject
- Entity.createModelHideExcludingScriptObjects
- Entity.createModelHide
- Entity.createModelSwap
- Entity.detach
- Entity.doesBelongToThisScript
- Entity.doesExist
- Entity.doesHaveDrawable
- Entity.doesHavePhysics
- Entity.findAnimEventPhase
- Entity.forceAiAndAnimationUpdate
- Entity.freezePosition
- Entity.getAlpha
- Entity.getAnimCurrentTime
- Entity.getAnimTotalTime
- Entity.getAttachedTo
- Entity.getBoneIndexByName
- Entity.getCollisionNormalOfLastHitFor
- Entity.getCoords
- Entity.getEntityAnimDuration
- Entity.getForwardVector
- Entity.getForwardX
- Entity.getForwardY
- Entity.getHeading
- Entity.getHealth
- Entity.getHeightAboveGround
- Entity.getHeight
- Entity.getLastMaterialHitBy
- Entity.getLodDist
- Entity.getMatrix
- Entity.getMaxHealth
- Entity.getModel
- Entity.getNearestPlayerToOnTeam
- Entity.getNearestPlayerTo
- Entity.getObjectIndexFromIndex
- Entity.getOffsetFromGivenWorldCoords
- Entity.getOffsetFromInWorldCoords
- Entity.getPedIndexFromIndex
- Entity.getPhysicsHeading
- Entity.getPitch
- Entity.getPopulationType
- Entity.getQuaternion
- Entity.getRoll
- Entity.getRotationVelocity
- Entity.getRotation
- Entity.getScript
- Entity.getSpeedVector
- Entity.getSpeed
- Entity.getSubmergedLevel
- Entity.getType
- Entity.getUprightValue
- Entity.getVehicleIndexFromIndex
- Entity.getVelocity
- Entity.getWorldPositionOfBone
- Entity.hasAnimEventFired
- Entity.hasAnimFinished
- Entity.hasBeenDamagedByAnyObject
- Entity.hasBeenDamagedByAnyPed
- Entity.hasBeenDamagedByAnyVehicle
- Entity.hasBeenDamagedBy
- Entity.hasClearLosToInFront
- Entity.hasClearLosTo
- Entity.hasCollidedWithAnything
- Entity.hasCollisionLoadedAround
- Entity.isAMission
- Entity.isAPed
- Entity.isAVehicle
- Entity.isAnEntity
- Entity.isAnObject
- Entity.isAtCoord
- Entity.isAttachedToAnyObject
- Entity.isAttachedToAnyPed
- Entity.isAttachedToAnyVehicle
- Entity.isAttachedTo
- Entity.isAttached
- Entity.isAt
- Entity.isCollisonDisabled
- Entity.isDead
- Entity.isInAir
- Entity.isInAngledArea
- Entity.isInArea
- Entity.isInWater
- Entity.isInZone
- Entity.isOccluded
- Entity.isOnScreen
- Entity.isPlayingAnim
- Entity.isStatic
- Entity.isTouchingModel
- Entity.isTouching
- Entity.isUpright
- Entity.isUpsidedown
- Entity.isVisibleToScript
- Entity.isVisible
- Entity.isWaitingForWorldCollision
- Entity.playAnim
- Entity.playSynchronizedAnim
- Entity.playSynchronizedMapEntityAnim
- Entity.processAttachments
- Entity.removeForcedObject
- Entity.removeModelHide
- Entity.removeModelSwap
- Entity.resetAlpha
- Entity.setAlpha
- Entity.setAlwaysPrerender
- Entity.setAnimCurrentTime
- Entity.setAnimSpeed
- Entity.setAsMission
- Entity.setCanBeDamagedByRelationshipGroup
- Entity.setCanBeDamaged
- Entity.setCanBeTargetedWithoutLos
- Entity.setCollision
- Entity.setCoords2
- Entity.setCoordsNoOffset
- Entity.setCoords
- Entity.setDynamic
- Entity.setHasGravity
- Entity.setHeading
- Entity.setHealth
- Entity.setInvincible
- Entity.setIsTargetPriority
- Entity.setLights
- Entity.setLoadCollisionFlag
- Entity.setLodDist
- Entity.setMaxHealth
- Entity.setMaxSpeed
- Entity.setMotionBlur
- Entity.setNoCollision
- Entity.setObjectAsNoLongerNeeded
- Entity.setOnlyDamagedByPlayer
- Entity.setOnlyDamagedByRelationshipGroup
- Entity.setProofs
- Entity.setQuaternion
- Entity.setRecordsCollisions
- Entity.setRenderScorched
- Entity.setRotation
- Entity.setTrafficlightOverride
- Entity.setVelocity
- Entity.setVisible
- Entity.stopAnim
- Entity.stopSynchronizedAnim
- Entity.stopSynchronizedMapEntityAnim
- Entity.wouldEntityBeOccluded