Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions Acid.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
using System;
using UnityEngine;

namespace SDG.Unturned
{
// Plays the specified effect when something collides with the Collider component on the base Game Object
// Destroys itself after one use and cannot be reset
public class Acid : MonoBehaviour
{
public ushort effectID;
}
// Plays the specified effect when something collides with the Collider
// component on the base Game Object

// Destroys itself after one use and cannot be reset
public class Acid : MonoBehaviour
{
public Guid effectGuid;

// Kept because lots of modders have been using this script in Unity,
// so removing legacy effect id would break their content.
public ushort effectID;
}
}
33 changes: 19 additions & 14 deletions Carepackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,26 @@

namespace SDG.Unturned
{
// Requires a BoxCollider on the base Game Object
// When the Collider attatched to the base Game Object collides with anything it will spawn the specified barricade and effect #120 will play
// If the barricade is an InteractableStorage 8 random items from the item pool will be added
// After 10 minutes the carepackage will despawn
// Requires a BoxCollider on the base Game Object
// When the Collider attatched to the base Game Object collides with anything it will spawn the specified barricade and effect #120 will play
// If the barricade is an InteractableStorage 8 random items from the item pool will be added
// After 10 minutes the carepackage will despawn

// This will not make the Carepackage move on its own. To make an accurate carepackage add a rigidbody with gravity, 1 mass and 0.5 angular drag as well as a constant force object with a Y force value of 9.5
// It is up to you to extract the parachute and light assets and whatever else
public class Carepackage : MonoBehaviour
{
// The barricade to spawn, by default it is the base game Carepackage barricade
// If you want it to fill with items it can be an interactable storage but it is not required
public ushort barricadeID = 1374;
// This will not make the Carepackage move on its own. To make an accurate carepackage add a rigidbody with gravity, 1 mass and 0.5 angular drag as well as a constant force object with a Y force value of 9.5
// It is up to you to extract the parachute and light assets and whatever else
public class Carepackage : MonoBehaviour
{
// The barricade to spawn, by default it is the base game Carepackage barricade
// If you want it to fill with items it can be an interactable storage but it is not required
[Tooltip("Barricade you want to spawn")]
public ushort barricadeID = 1374;

// The Spawn Table id to use when filling the carepackage
// Might throw an error if your barricade is an interactable storage and the id is invalid
public ushort id;
// The Spawn Table id to use when filling the carepackage
// Might throw an error if your barricade is an interactable storage and the id is invalid
[Tooltip("Spawn Table ID")]
public ushort id;

[Tooltip("Effect to play upon landing")]
public string landedEffectGuid = "2c17fbd0f0ce49aeb3bc4637b68809a2";
}
}
14 changes: 9 additions & 5 deletions Flashbang.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
using UnityEngine;
using UnityEngine;

namespace SDG.Unturned
{
// Does what a flashbang does when the object is created at the end of the fuse length
public class Flashbang : MonoBehaviour
{
public float fuseLength = 2.5f;
// Does what a flashbang does when the object is created at the end of the fuse length
public class Flashbang : MonoBehaviour
{
public Color color = Color.white;

public float fuseLength = 2.5f;

public bool playAudioSource = true;
}
}
6 changes: 5 additions & 1 deletion Grenade.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using UnityEngine;
using Steamworks; // Requires CSteamID.cs

Expand Down Expand Up @@ -27,7 +28,10 @@ public class Grenade : MonoBehaviour

public float objectDamage;

// Effect ID to play once exploded
// Effect GUID to play once exploded
public Guid explosionEffectGuid;

// [[Obsolete] Effect ID to play once exploded
public ushort explosion;

public float fuseLength = 2.5f;
Expand Down