Page 248 of 400
Re: Ask a simple question, get a simple answer
Posted: Tue Jul 10, 2018 6:01 pm
by Pompidom
Haven't had much time to test, but the tilting part doesn't seem to function.
The prison cage is a bad example since it's tilted by default. If you replace it by a healing potion, it's just spinning straight no matter what values you give to rotationAngles between 0 and 360.
Re: Ask a simple question, get a simple answer
Posted: Wed Jul 11, 2018 2:33 pm
by kelly1111
Question about optimisation:
(under dungeon only)
What I am currently doing is using 13 levels with a 50 by 50 grid size. When designing my level layout... I am filling the left over spaces on the map with things ... squeezing rooms and stuff I need in the areas that are not yet used by my level on each map...
this gets a bit confusing for myself and takes alot of time to do right. ... I get lost in my own design !
My question is. Does it matter if I add more levels with a 50 by 50 grid that dont use all the empty (walltiles) so that in the end I get a less chaotic feel when designing my levels. Does it matter performance wise?
So for instance instead of 13 levels of 50 by 50 ... I make:
20 levels of 50 by 50 ... with more unused tiles -- but easier to navigate when designing
or 35 levels of 32 by 32 grid...
Does anyone know if the engine has level limits ? (or is it only objects placed that add to the strain on performance)
anyone ever made a map with more than 40 levels?
Re: Ask a simple question, get a simple answer
Posted: Wed Jul 11, 2018 8:17 pm
by minmay
kelly1111 wrote: ↑Wed Jul 11, 2018 2:33 pmMy question is. Does it matter if I add more levels with a 50 by 50 grid that dont use all the empty (walltiles) so that in the end I get a less chaotic feel when designing my levels. Does it matter performance wise?
Not really.
kelly1111 wrote: ↑Wed Jul 11, 2018 2:33 pmDoes anyone know if the engine has level limits ?
There is no limit on the number of levels in a dungeon.
Re: Ask a simple question, get a simple answer
Posted: Wed Jul 11, 2018 10:01 pm
by Pompidom
Code: Select all
function Quest2()
local s = g1_dark_temple_pedestal_1.surface
for _,e in s:contents() do
if e.go.name == "fancy_skull" then
e.go:destroy()
playSound("secret")
-- Here i want to decrement counter_2
end
end
end
What's the right command to decrement counter_2?
Re: Ask a simple question, get a simple answer
Posted: Wed Jul 11, 2018 11:09 pm
by THOM
counter_2.counter:decrement()
Re: Ask a simple question, get a simple answer
Posted: Sun Jul 15, 2018 12:36 pm
by akroma222
Pompidom wrote: ↑Tue Jul 10, 2018 6:01 pm
Haven't had much time to test, but the tilting part doesn't seem to function.
The prison cage is a bad example since it's tilted by default. If you replace it by a healing potion, it's just spinning straight no matter what values you give to rotationAngles between 0 and 360.
Sorry for the late reply Pompidom,
Youre right, I cant get the rotating object to tilt in the same function either
If I place the method setWorldRotationAngles before setWorldPosition then the tilt angle is overriden and the object doesnt tilt (just rotates). If I place it after, the tilt happens - but no rotate.
Apologies, I think to do what you want in the same function, -Im guessing - you might need to use matrices
(which I cant help with unfortunately)
Re: Ask a simple question, get a simple answer
Posted: Sun Jul 15, 2018 7:45 pm
by minmay
You're using the wrong axis. The y axis is the same one you're rotating it around, so offsetting its rotation on that axis won't give you any tilt. And again, stop trying to use setPosition() for this!
Here is an example of how to rotate an object around one axis and tilt it on another:
Code: Select all
function update()
local tilt = 10
local speed = 180
potion_healing_2:setWorldRotationAngles(tilt, Time.currentTime()*speed, 0)
end
As usual, connect a TimerComponent with a timerInterval of
0 to this function.
Re: Ask a simple question, get a simple answer
Posted: Sun Jul 15, 2018 9:43 pm
by THOM
Is it possible to add new sky materials?
In the main game exists only "day_sky" and "night_sky". But for ORRR3 I've added a material called "dark_sky" but it behaves odd after the first night cycle passed through. The sky now seems to be "greyish", clouds have weired colours, colours of objects in the distance seem to be erased and the sight of the objects seem to be nearly inverted.
Or is this just a problem of the editor mode?
Re: Ask a simple question, get a simple answer
Posted: Mon Jul 16, 2018 3:52 am
by minmay
Like the three water materials, the three sky materials have hardcoded behaviour. Instead of trying to duplicate them (which is not practical), you should use the onUpdate hook to modify them as needed. In fact, this is already done in mod_assets/rooms/minmay/babble/monsters/storm_guardian.lua.
Re: Ask a simple question, get a simple answer
Posted: Mon Jul 16, 2018 8:13 am
by THOM
I expected something like that...
I will have a look at your definitions to see what can be done.
Thanks once again.