Page 130 of 400

Re: Ask a simple question, get a simple answer

Posted: Thu Jun 23, 2016 9:50 pm
by Isaac
zimberzimber wrote:Looks useful, except I have absolutely no idea on how to use tables. :oops:
Help please?
What exactly is your intended use of the test?

Re: Ask a simple question, get a simple answer

Posted: Sat Jun 25, 2016 9:13 am
by Zo Kath Ra
zimberzimber wrote:Looks useful, except I have absolutely no idea on how to use tables. :oops:
Help please?
Here you go :)
Tables: https://www.lua.org/pil/2.5.html
Table Constructors: https://www.lua.org/pil/3.6.html

Re: Ask a simple question, get a simple answer

Posted: Mon Jun 27, 2016 7:45 am
by Eleven Warrior
Hi all.

Has anyone got these objects with the Scrips, Models and Textures: ball_chain and trap_trigger_pendulum?

They were on the forum ages ago and I did have them but, had hard drive problems.

Re: Ask a simple question, get a simple answer

Posted: Mon Jun 27, 2016 9:12 am
by Zo Kath Ra
Eleven Warrior wrote:Hi all.

Has anyone got these objects with the Scrips, Models and Textures: ball_chain and trap_trigger_pendulum?

They were on the forum ages ago and I did have them but, had hard drive problems.
viewtopic.php?f=22&t=7913

Re: Ask a simple question, get a simple answer

Posted: Mon Jun 27, 2016 1:21 pm
by billb52
Hi All
Has anyone got a LOG 2 working 'leech_worm' scripts, model, and textures? I had found one way back but does not seem to work
Any help appreciated thx in advance.

Re: Ask a simple question, get a simple answer

Posted: Mon Jun 27, 2016 3:11 pm
by THOM
Here is my definition.
You have to define a new attack sound (like i did) or enter one of the existing sounds.

And of course you have to have the model and the texture-files.

You know how to script a new monster into your mod?

EDIT: Sorry, I see, you don't have the needed files. If you PM me an email-adress, I can send them to you.

Code: Select all

	defineSound{
		name = "worm_attack_DM",
		filename = "mod_assets/monsters/worm/DM_worm.wav",
		loop = false,
		volume = 1,
		minDistance = 1,
		maxDistance = 4,
	}


defineObject{
	name = "worm",
       	baseObject = "base_monster",
	tags = {"monster" },
       	components = {
          {
             class = "Model",
             model = "mod_assets/monsters/worm/leech_worm.fbx",
             storeSourceData = true,
          },
          {
             class = "Animation",
             name = "animation",
             currentLevelOnly = true,
	     animations = {
		idle = "assets/animations/monsters/snail/snail_idle.fbx",
		moveForward = "assets/animations/monsters/snail/snail_walk.fbx",
		turnLeft = "assets/animations/monsters/snail/snail_turn_left.fbx",
		turnRight = "assets/animations/monsters/snail/snail_turn_right.fbx",
		attack = "assets/animations/monsters/snail/snail_attack.fbx",
		getHitFrontLeft = "assets/animations/monsters/snail/snail_get_hit_front_left.fbx",
		getHitFrontRight = "assets/animations/monsters/snail/snail_get_hit_front_right.fbx",
		getHitBack = "assets/animations/monsters/snail/snail_get_hit_back.fbx",
		getHitLeft = "assets/animations/monsters/snail/snail_get_hit_left.fbx",
		getHitRight = "assets/animations/monsters/snail/snail_get_hit_right.fbx",
		fall = "assets/animations/monsters/snail/snail_get_hit_front_left.fbx",
	     },
          },
          {
             class = "Monster",
	     meshName = "leech_worm_mesh",
             health = 90,
             evasion = 0,
	     protection = 10,
             exp = 120, 
             traits = { "animal" },
             hitEffect = "hit_goo",
             capsuleHeight = 0.2,
             capsuleRadius = 0.7,
             hitSound = "snail_hit",
             dieSound = "snail_die",
	     resistances = { ["poison"] = "absorb", ["fire"] = "vulnerable" },
	     immunities = { "sleep", "stunned", "blinded", "burning", "poison" },
          },
          {
             class = "MeleeBrain",
             name = "brain",
             sight = 2.5,
          },
          {
             class = "MonsterMove",
             name = "move",
             sound = "snail_walk",
             resetBasicAttack = false,
             turnDir = 0,
             cooldown = 6,
          },
          {
             class = "MonsterTurn",
             name = "turn",
             sound = "snail_walk",
             cooldown = 2,
          },
          {
             class = "MonsterAttack",
             name = "basicAttack",
--             sound = "snail_attack",
	     sound = "worm_attack_DM",  --works only, if new sound is defined
             cooldown = 3,
             attackPower = 6,
             animationSpeed = 1,
             animation = "attack",
	     causeCondition = "poison",
	     conditionChance = 17,
          },
       }
    }


defineMaterial{
	name = "leech_worm_mat",
	diffuseMap = "mod_assets/monsters/worm/leech_worm_diffuse.tga",
	specularMap = "mod_assets/monsters/worm/leech_worm_spec.tga",
	normalMap = "mod_assets/monsters/worm/leech_worm_normal.tga",
	doubleSided = false,
	lighting = true,
	alphaTest = false,
	blendMode = "Opaque",
	textureAddressMode = "Wrap",
	glossiness = 200, --25
	depthBias = 0,
}




Re: Ask a simple question, get a simple answer

Posted: Mon Jun 27, 2016 4:24 pm
by kelly1111
If I import your leech worm it works, but gives the error "cant find a head node" and all if it's attacks miss the party

how do I fix this?

Re: Ask a simple question, get a simple answer

Posted: Mon Jun 27, 2016 5:03 pm
by THOM
concerning question on:
viewtopic.php?f=22&t=7997&p=90818#p90818

concerning question two:
I have no idea. :?

Maybe it has something to do that I also use the LoG1 Snail with all it's definitions. Probably the animation definitions are requiered here...

Re: Ask a simple question, get a simple answer

Posted: Mon Jun 27, 2016 7:22 pm
by Isaac
One also needs the animation events defined for each attack ~or they don't happen, and the monster never hits or does damage.

Animation events are monster specific ~technically per fbx file.
You define the fbx for the event, the event, and the animation frame that the event takes place at...
(Where it happens during the animation.)

example from the snail:

Code: Select all

defineAnimationEvent{
	animation = "assets/animations/monsters/snail/snail_attack.fbx",
	event = "attack",
	frame = 13,
}

Re: Ask a simple question, get a simple answer

Posted: Wed Jun 29, 2016 1:09 pm
by billb52
Hi THOM
I got the leech worm working OK, but had to alter attack sound to 'snail_attack' as I did not have DM_worm wav file.
So once again thx for your help.