Page 239 of 400

Re: Ask a simple question, get a simple answer

Posted: Fri May 18, 2018 11:52 am
by Xardas
Maybe this helps:
There is an explanation for the getWorldPosition values, which are the same, you use with setWorldPosition

https://github.com/JKos/log2doc/wiki/Ob ... gameobject

Re: Ask a simple question, get a simple answer

Posted: Fri May 18, 2018 12:48 pm
by Pompidom
Xardas wrote:

Code: Select all

function setexp()
  for i = 1, "highest monsternumber" do       --put index here
     local monster = findEntity("monster_"..i)
     if monster then
       monster. monster:setExp(0)
    end
  end
end

delayedCall(self.go.id, 0.1, "setexp")  --calls the function at the start of the game

This works wonderfully in more ways then I would have imagined,
Not only does the script work for the entire mod and thus multiple maps.
I can also add multiple script entities with beasts/undeads etc... basically create categories.
to give custom amounts of experience any way I see fit.
Or to keep things more simple rename all mobs for each map into a different category. to not lose track of high amount of numbers.

This is just awesome.

Re: Ask a simple question, get a simple answer

Posted: Fri May 18, 2018 1:02 pm
by Pompidom
Next question, I would like to enforce Ironman mode with the one and only healing crystal in the town to save your game there.
Creating a risk vs reward mechanic venturing out to other maps.
Also creating a more hardcore experience where save scumming is completely disabled.

Is there any way to enforce ironman mode?

Re: Ask a simple question, get a simple answer

Posted: Fri May 18, 2018 1:33 pm
by Curunir
Pompidom wrote:Next question, I would like to enforce Ironman mode with the one and only healing crystal in the town to save your game there.
Creating a risk vs reward mechanic venturing out to other maps.
Also creating a more hardcore experience where save scumming is completely disabled.

Is there any way to enforce ironman mode?
You do realize with this design decision alone you're alienating a good 50% of the already-low number of potential players, right?

It's also simply bad, dull design. It's not risk vs reward, it's just an annoying trip back to town every time you're low on health and resources.

Xardas wrote: Maybe this helps:
There is an explanation for the getWorldPosition values, which are the same, you use with setWorldPosition

https://github.com/JKos/log2doc/wiki/Ob ... gameobject
This is great, thanks! I didn't think of looking at the "get" section! <3

Re: Ask a simple question, get a simple answer

Posted: Fri May 18, 2018 7:25 pm
by minmay
Pompidom wrote:Is there any way to enforce ironman mode?
No.

Re: Ask a simple question, get a simple answer

Posted: Sat May 19, 2018 8:55 pm
by Curunir
Any way to avoid z-fighting in the pillar textures when putting castle_wall_grating next to one another or next to castle walls?

Edit - Figured it out, you can disable the 'frame' component as needed.

Re: Ask a simple question, get a simple answer

Posted: Sat May 19, 2018 10:22 pm
by Curunir
How can I make a walltrigger react only to spells, not items, but still accept any projectile spell?

I found a script by minmay that checks for the type of fireball used, with a script entity placed in the walltrigger tile, with walltrigger accepting "any" and hitting up the script on activation:

Code: Select all

function checkReceptor(walltrigger, projectile)
  if projectile.go.name == "fireball_small" or projectile.go.name == "fireball_medium" or projectile.go.name == "fireball_large" then
    receptor_door_1.controller:toggle()
  end
end
I expanded that to include all types of frost, poison and lightning bolts but in the end, it just crashes with "attempt to index field 'go' (a nil value)".

Any idea how I can make that work?

Re: Ask a simple question, get a simple answer

Posted: Sat May 19, 2018 10:50 pm
by Zo Kath Ra
Curunir wrote:Any idea how I can make that work?
projectile is an entity, not a component.

Code: Select all

function checkReceptor(walltrigger, projectile)
	if projectile.name == "fireball_small" or projectile.name == "fireball_medium" or projectile.name == "fireball_large" then
		receptor_door_1.controller:toggle()
	end
end

Re: Ask a simple question, get a simple answer

Posted: Sat May 19, 2018 10:57 pm
by Curunir
Works like a charm, thanks!

Re: Ask a simple question, get a simple answer

Posted: Mon May 21, 2018 3:47 pm
by Pompidom
https://ibb.co/e5BTY8
https://ibb.co/b5UJGT
https://ibb.co/dSUtGT
https://ibb.co/jBs8i8

I'm looking for chairs, are there any custom chair objects out there?
A bench would be suitable as well.

Anything is fine, offsetting some random wood object down the Z axis so it looks like a bench like in the 2nd screenshot would be okay :)

The best I can come up with is jamming the throne from DM into the ground moving it closer to the table.