Page 346 of 396

Re: Ask a simple question, get a simple answer

Posted: Wed Mar 25, 2020 4:43 am
by Isaac

Code: Select all

GameMode.completeGame()
* Optionally, you can include the path to an .IVF video for it to play.

Code: Select all

function quit()
	GameMode.completeGame("assets/videos/outro1.ivf")
end

Re: Ask a simple question, get a simple answer

Posted: Wed Mar 25, 2020 2:28 pm
by Eleven Warrior
ty for the help :)

Re: Ask a simple question, get a simple answer

Posted: Thu Mar 26, 2020 6:59 pm
by bongobeat
how can I disable the idle animation only for a model rattached to the "parentNode = head" of a monster?

Code: Select all

defineObject{
	name = "ratling_cannon_monster_test",
	baseObject = "base_monster",
	components = {
		{
			class = "Model",
			model = "assets/models/monsters/ratling2.fbx",
			storeSourceData = true, -- must be enabled for mesh particles to work
			offset = vec(0, 0, 0),
			rotation = vec(0,45,0),
		},
		{
			class = "Animation",
			animations = {
				idle = "assets/animations/monsters/ratling/ratling2_idle.fbx",
				moveForward = "assets/animations/monsters/ratling/ratling2_walk.fbx",
				turnLeft = "assets/animations/monsters/ratling/ratling2_turn_left.fbx",
				turnRight = "assets/animations/monsters/ratling/ratling2_turn_right.fbx",
				turnAround = "assets/animations/monsters/ratling/ratling2_turn_around.fbx",
				attack = "assets/animations/monsters/ratling/ratling2_attack.fbx",
				turnAttackLeft = "assets/animations/monsters/ratling/ratling2_turn_attack_left.fbx",
				turnAttackRight = "assets/animations/monsters/ratling/ratling2_turn_attack_right.fbx",
				rangedAttack = "assets/animations/monsters/ratling/ratling2_ranged_attack.fbx",
				getHitFrontLeft = "assets/animations/monsters/ratling/ratling2_get_hit_front_left.fbx",
				getHitFrontRight = "assets/animations/monsters/ratling/ratling2_get_hit_front_right.fbx",
				getHitBack = "assets/animations/monsters/ratling/ratling2_get_hit_back.fbx",
				getHitLeft = "assets/animations/monsters/ratling/ratling2_get_hit_left.fbx",
				getHitRight = "assets/animations/monsters/ratling/ratling2_get_hit_right.fbx",
				fall = "assets/animations/monsters/ratling/ratling2_get_hit_front_left.fbx",
				alert = "assets/animations/monsters/ratling/ratling2_alert.fbx",
			},
			currentLevelOnly = true,
		},
		{
			class = "Model",
			name = "cannon",
			model = "mod_assets/models/naval_cannon_complete.fbx",
			offset = vec(-0.25, -1.35, 0.25),
			rotation = vec(0, 0, 0),
			parentNode = "head",
		},
I want that the "cannon" model don't follow the idle animation of the ratling, because it doesn't look great with the animation.

Re: Ask a simple question, get a simple answer

Posted: Thu Mar 26, 2020 7:23 pm
by minmay
That's not possible, sorry.

Re: Ask a simple question, get a simple answer

Posted: Fri Mar 27, 2020 3:35 am
by Eleven Warrior
In the program Grimrock Model Toolkit i'm trying to add (gate node) to an wall but it wont say the name gate node in the nodes selection. So the wall becomes a door.

I can make the wall a door np but as soon as I run the editor is say the wall has no gate node.

Re: Ask a simple question, get a simple answer

Posted: Fri Mar 27, 2020 11:12 am
by SluisE
Eleven Warrior wrote: Fri Mar 27, 2020 3:35 am In the program Grimrock Model Toolkit i'm trying to add (gate node) to an wall but it wont say the name gate node in the nodes selection. So the wall becomes a door.

I can make the wall a door np but as soon as I run the editor is say the wall has no gate node.
In the GMT choose the root node.
Click on Add
A new node is added. Choose this one.
Change the name to 'gate' (not gate node, just gate)
Click the update button

Re: Ask a simple question, get a simple answer

Posted: Fri Mar 27, 2020 7:51 pm
by bongobeat
minmay wrote: Thu Mar 26, 2020 7:23 pm That's not possible, sorry.
arghhh, ok, thanks for the answer

Re: Ask a simple question, get a simple answer

Posted: Sat Mar 28, 2020 9:28 am
by Eleven Warrior
ty SluisE that works nicely :)

Re: Ask a simple question, get a simple answer

Posted: Sat Mar 28, 2020 1:39 pm
by bongobeat
Please can somebody check the attached script of this item?

It worked perfectly for a while, then it's power attack don't work anymore. Don't know if the script has an error or if it's something other related to the rest of the mod.

Code: Select all

defineObject{
	name = "rapier_3",
	baseObject = "base_item",
	components = {
		{
			class = "Model",
			model = "assets/models/items/rapier.fbx",
		},
		{
			class = "Item",
			uiName = "The Diamond Sword",
			gfxIndex = 338,
			gfxIndexPowerAttack = 429,
			impactSound = "impact_blade",
			weight = 2.6,
			traits = { "light_weapon", "sword", "berserker_weapon", "epic" },
			description = "The rapier of Jean Bart, the legendary pirate. It is said that he has slayed 13 drakes with this sword during the Dragon's War. A succesful hit replenishes its power attack.",
			secondaryAction = "Dfire",
             onUnequipItem = function(self,champion,slot)
                party.berserkerScript.weaponUnequip(self,champion,slot)
             end,
		},
		{
			class = "EquipmentItem",
			slot = "Weapon",
			dexterity = 7,
		},
		{
			class = "Particle",
			particleSystem = "manabind_64",
		emitterMesh = "assets/models/items/rapier.fbx",
		},
          {
             class = "Counter",
             name = "collection",
             value = 0,
          },
          {
		class = "MeleeAttack",
		attackPower = 105,
		accuracy = 10,
		cooldown = 3.5,
		pierce = 10,
		swipe = "thrust",
			requirements = { "critical", 2, "epic_weapons", 3 },
             onHitMonster = function(self, monster, tside, damage, champion)
                local doDebug = false
                local currentCount = self.go.collection:getValue()
                local amountLow = (damage / 5)
                local amountHigh = (damage / 2)
                local collectedCount = math.random(amountLow, amountHigh)
                if doDebug then print("currentCount:", currentCount) end
                if doDebug then print("Low:",amountLow,"High:", amountHigh) end
                if doDebug then print("Collected:", collectedCount) end
                self.go.collection:setValue(currentCount + collectedCount)
                if doDebug then print("New Count:", self.go.collection:getValue()) end
                if self.go.collection:getValue() >= 100 then
                   local currentCharges = self.go.Dfire:getCharges()
                   if currentCharges < 3 then
                      if doDebug then print("Charge added, resetting count.") end
                      self.go.Dfire:setCharges(currentCharges + 1)
                      self.go.collection:setValue(0)
                      hudPrint("The Diamond Sword screams with power.")
                   else
                      self.go.collection:setValue(0)
                   end
                end
             end,
          },

			{
			class = "CastSpell",
			name = "Dfire",
			uiName = "Dark Fire",
			cooldown = 5,
			spell = "darkburst",
			energyCost = 80,
			power = 30,
			charges = 3,
			requirements = { "concentration", 2 },
			},
	},
	tags = { "weapon" },
}

Re: Ask a simple question, get a simple answer

Posted: Sat Mar 28, 2020 6:44 pm
by Zo Kath Ra
bongobeat wrote: Sat Mar 28, 2020 1:39 pm Please can somebody check the attached script of this item?
I haven't checked the script yet, but...

"The rapier of Jean Bart, the legendary pirate. It is said that he has slayed 13 drakes with this sword during the Dragon's War. A succesful hit replenishes its power attack."

has slayed -> slew
succesful -> successful