minmay wrote:petri wrote:BuzzJ wrote:Is there a simple way to make an object or several spawn on the same tile as the party when an (here unspecified) event occurs? Where defining the location of the party is not necessary?
Something like this perhaps?
I think you meant
Hi, when I use this as part of
Code: Select all
defineObject{
name = "scifi_superposed",
baseObject = "base_item",
components = {
{
class = "Model",
model = "mod_assets/models/items/scifi_superposed.fbx",
},
{
class = "Item",
uiName = "Superposed Shotgun",
description = "An elagant style of double barrel shotgun.",
gfxAtlas = "mod_assets/textures/gui/scifi_items_1.tga",
gfxIndex = 0,
gfxIndexPowerAttack = 1,
impactSound = "impact_blunt",
secondaryAction = "reload",
weight = 1.5,
traits = { "firearm" },
},
{
class = "FirearmAttack",
attackPower = 22,
cooldown = 1.5,
attackSound = "gun_shot_large",
ammo = "shotshell",
clipSize = 2,
jamChance = 12,
requirements = { "firearms", 1 },
},
{
class = "ReloadFirearm",
uiName = "Reload",
name = "reload",
requirements = { "firearms", 1 },
party:spawn("scifi_spentshotshells"),
gameEffect = "Reloads both chambers of the shotgun."
},
},
Grimrock2 dungeon editor kicks me out the following error: "attempt to index global 'party' (a nil value)"
does this mean I need to define what the party is somewhere? If so, how?
edit: same result on either party.party:spawn("dagger") or party:spawn("dagger")