Grenade¶
Chad Grenade
Usage¶
local NewGrenade = Grenade(
Vector(-900, 185, 215),
Rotator(0, 90, 90),
"NanosWorld::SM_Grenade_G67",
"NanosWorld::P_Explosion_Dirt",
"NanosWorld::A_Explosion_Large"
)
Constructor Parameters¶
Type |
Name |
Default |
Location |
Vector(0, 0, 0) |
|
Rotation |
Rotation(0, 0, 0) |
|
StaticMeshAsset |
“NanosWorld::SM_Grenade_G67” |
|
Explosion Particles |
“NanosWorld::P_Explosion_Dirt” |
|
Explosion Sound |
“NanosWorld::A_Explosion_Large |
|
CollisionType |
0 (Normal) |
|
GravityEnabled |
true |
Properties¶
Type |
Name |
Description |
|
BaseDamage |
Damage at Inner Radius |
||
DamageFalloff |
Radius which BaseDamage will apply proportionally |
||
DamageInnerRadius |
Radius which MinimumDamage will apply |
||
DamageOuterRadius |
Radius which BaseDamage will apply |
||
MinimumDamage |
Damage at Outer Radius |
||
TimeToExplode |
Time until Explosion |
||
ThrowForce |
Impulse applied when throwing |
Functions¶
Returns |
Name |
Description |
|
Explode() |
Forces this grenade to Explode |
Functions (Inherited from Pickable)¶
Returns |
Name |
Description |
|
Spawns and Attaches a SkeletalMesh into this Actor, the SkeletalMesh must have the same Skeletal used by this Actor Mesh, and will follow all animations from it. Uses a custom ID to be used for removing it further |
|||
AddStaticMeshAttached(string ID, string StaticMeshPath, string Socket = “”, Vector RelativeLocation = Vector(), Rotator RelativeRotation = Rotator()) |
Spawns and Attaches a StaticMesh into this Actor in a Socket with relative Location and Rotation. Uses a custom ID to be used for removing it further |
||
PullUse() |
Force this Pickable to be used (e.g. if this is a Weapon, will fire) |
||
ReleaseUse() |
Force this Pickable to be released the usage |
||
RemoveSkeletalMeshAttached(string ID) |
Removes, if existing, a SkeletalMesh from this Actor given it’s custom ID |
||
RemoveStaticMeshAttached(string ID) |
Removes, if existing, a StaticMesh from this Actor given it’s custom ID |
||
GetAssetName() |
Gets the Asset name |
||
GetHandler() |
Gets the Character (if existing) which is holding this |
Functions (Inherited from Actor)¶
Returns |
Name |
Description |
|
AddImpulse(Vector Force) |
Applies a Force in world coordinate on this Actor (the force is applied on Client side, by the (in most of cases) the closest player of this object) |
||
AttachTo(Actor Other, string BoneName, Vector RelativeLocation, Rotator RelativeRotation) |
Attaches this Actor to any other Actor with a Relative Offset/Rotation |
||
Destroy() |
Destroys this Actor |
||
SetCollision(number CollisionType) |
Sets the actor’s collision (0 - Normal, 1 - Static Only, 2 - No Collision) |
||
SetGravityEnabled(boolean NewGravity) |
Sets the actor’s gravity enabled |
||
SetHighlightEnabled(boolean Enabled) |
Sets if this Actors is Highlighting |
||
SetInitialLocation(Vector NewInitialLocation) |
Sets the initial location |
||
SetLocation(Vector NewLocation) |
Sets the actor’s location in the game world |
||
SetRotation(Rotator NewRotation) |
Sets the actor’s rotation in the game world |
||
SetScale(Vector Scale) |
Sets the actor’s scale |
||
SetTintColor(Color NewTintColor) |
Sets the tint color, for completely paint an object, multiply the color by 10 or 100 |
||
SetValue(string Key, any Value) |
Sets a value in this entity, which can be accessed by any package (local only) |
||
Smoothly moves this actor to a Location with a certain Speed |
|||
Smoothly rotates this actor to a Rotation with a certain Speed |
|||
IsGravityEnabled() |
Gets the actor’s gravity enabled |
||
IsValid() |
Returns if this is Valid |
||
GetCollision() |
Gets the current actor’s collision |
||
GetID() |
Gets the network ID of this entity (same in both client and server) |
||
GetLocation() |
Get the actor’s position in the game world |
||
GetInitialLocation() |
Gets the initial location |
||
GetRotation() |
Gets the actor’s rotation in the game world |
||
GetScale() |
Gets the actor’s scale |
||
GetTintColor() |
Gets the Tint Color |
||
GetType() |
Returns the type of this Actor |
||
any |
GetValue(string Key) |
Gets a value given a key |
|
GetVelocity() |
Returns the current actor Velocity |
Events¶
Name |
Arguments |
Description |
|
Explode |
|
||
Throw |
|
Events (Inherited from Pickable)¶
Name |
Arguments |
Description |
|
Drop |
Entity pickable, Character character, boolean WasTriggeredByPlayer |
When a Character drops this |
|
Hit |
Entity pickable, number Intensity |
When this Entity hits something |
|
PickUp |
Entity pickable, Character character |
When a Character picks up this |
Events (Inherited from Actor)¶
Name |
Arguments |
Description |
|
Destroy |
Entity actor |
Triggered when an Entity is Destroyed |
|
Spawn |
Entity actor |
Triggered when an Entity is Spawned/Created |