Page 1 of 2

simulating power generator

Posted: Thu May 16, 2013 6:26 pm
by bongobeat
Hi,
(yes it's me again :D )

I have put the cube monster in my mod:

the monster is guarding and move only if you press a button to activate a spawner which launches a fireball on the monster, to wake him up.

all those thing is to simulate some power generator starting.

the problem is: the monster wrote every time on screen, "i will crush you, i will blablbla"
is it possible to desactivate the writings?

Re: simulating power generator

Posted: Thu May 16, 2013 7:47 pm
by Komag
No, the real cube in your map will always make those comments. But you can place a fake model of him instead. You can see the source files of my "Remake" mod to see how I did it if you want, but it's a pretty complex setup.

Re: simulating power generator

Posted: Fri May 17, 2013 7:07 pm
by bongobeat
hello,

yeah why not:

maybe i will replace all of this things by some sounds, but actually i have some problem to do it :D

i can try your idea, it depends on how complex it is :mrgreen:

what is your mod? by remake you mean "LegendofGrimrock-MasterQuest_v1.3_2013-04-23" remake?

Re: simulating power generator

Posted: Sat May 18, 2013 2:27 am
by Komag
No, it's my other mod which is called Legend of Grimrock - Remake, but they both have the cube so it actually doesn't matter I guess

Re: simulating power generator

Posted: Sun May 19, 2013 5:38 pm
by bongobeat
Ok i have downloaded LoG - remake:

which monster should i use?

i have try this one, it is the first cube in your monster.lua, but it crashes the editor when i started the previsualisation!
i have paste the code into my monsters.lua, then i have copy all yours model/monsters/files in my model/monsters/ folder.

Code: Select all

cloneObject{
	name = "cube_blind",
	baseObject = "cube",
	model = "mod_assets/models/monsters/cube_all.fbx",
	animations = {
		idle = "assets/animations/monsters/cube/cube_wake_up.fbx",
		moveNorth = "assets/animations/monsters/cube/cube_move_north.fbx",
		moveEast = "assets/animations/monsters/cube/cube_move_east.fbx",
		moveSouth = "assets/animations/monsters/cube/cube_move_south.fbx",
		moveWest = "assets/animations/monsters/cube/cube_move_west.fbx",
		fall = "assets/animations/monsters/cube/cube_idle.fbx",
		wakeUp = "assets/animations/monsters/cube/cube_wake_up.fbx",
		freeze = "assets/animations/monsters/cube/cube_freeze.fbx",
		restart = "assets/animations/monsters/cube/cube_restart.fbx",
		die = "assets/animations/monsters/cube/cube_death.fbx",
	},
	movementCoolDown = 60,
	immunities = { "cold", "assassination", "backstab" },
	sight = 0,
}
heeeelp :shock:

Re: simulating power generator

Posted: Sun May 19, 2013 6:35 pm
by Komag
Well I had to mess around with a lot of stuff, and it might be a bit too advanced till you learn more stuff. I have quite a few notes about which cube definitions worked for me. Sometimes it was a snail-cube

Re: simulating power generator

Posted: Tue May 21, 2013 7:13 pm
by bongobeat
Sure, it's a bit complicated for me :D
Well I have loaded your mod, and put the snail(cube) into a room, no crash, but it doesnt do anything. Have i to use some script to use the cube?

By the way, what a huge mod?! I have started to play it, I'm still on level 3. amazing changes! nice works! That impressive starting location, with hum? higher cells.
I ve seen a lot of level in the editor, it looks great!
Can i copy some of your code? I ve seen (editor) a item "carrying healing stone", awesome!

Re: simulating power generator

Posted: Tue May 21, 2013 9:19 pm
by Komag
Yeah, you can use whatever you want

Re: simulating power generator

Posted: Wed May 22, 2013 6:44 pm
by bongobeat
thank you!

Well i dont know how to do with the snail_cube.

I have started another thing

with a lever, i ll activate timer, counter, game sounds, ..., and it works:

exept for 2 things:

first:
how can i set the lever to be activated once? because every time i trigger it (activate - position), all things restart indefinitely
you have the option for a pressure plate, but not for lever, is it possible to manage that? I realy want to use a lever.

second: the last step cause problem:
at the end there is a lightning bolt spawning (indefinitely), and the sound of the cube walking (indefinitely too)
the problem is, when you go around, the sound of the walking cube didn't fade out.

I have use the sound directly within the editor, then i have define the same sound in sounds.lua

Code: Select all

defineSound{
name = "cube_move",
filename = "assets/samples/monsters/cube_walk.wav",
loop = false,
volume = 1,
minDistance = 2,
maxDistance = 12,
}
why the editor didn't apply the minDistance or maxDistance? is there something wrong?

Re: simulating power generator

Posted: Wed May 22, 2013 8:52 pm
by Komag
maybe you used playSound instead of playSoundAt(.....)

You can make a lever work once with some scripting, set a variable "flag" value and check it to see if it's set the next time then make it not do anything if set.