Author Topic: Kitchen Project  (Read 9361 times)

Added the four fluorescent lights.  I had to reexport the shapefile because the shadeless white texture made it appear as though they were on, even though they were not emitting light.


Added the four fluorescent lights.  I had to reexport the shapefile because the shadeless white texture made it appear as though they were on, even though they were not emitting light.


oh stuff i remember building stuff on top of those lights hahahah

Added the glass, stove burners, and working LCD clock(thank you Wrapperup for already figuring that out).

In other news the radishes I planted are growing.  So that's kinda neat.
« Last Edit: April 24, 2017, 09:01:55 PM by Tendon »

this thread is now about radishes and how rad they are

You've heard of M&M Dr. Phil, now get ready for...



Radish Steve Harvey!

I made the collision for the kitchen trying to be as reasonably accurate as possible.  So the object count is somewhere around 1286 objects.

If I were to remove the secrets inside of the fridge, that drops the object count down to ~905 objects.
If I were to go further and remove the insides of the cabinet as well, that drops the object count down to ~350 objects.

Although I don't want to be the one to do it- creating a less resource intensive version of the kitchen would vastly reduce download times, and allow people with potato computers to enjoy the kitchen with less lag.
« Last Edit: April 25, 2017, 11:43:15 PM by Tendon »

When will the map ready? I can't believe that someone really making a kitchen! YOU F*CKED BADSPOT! :cookieMonster:

I have a problem:



I tried to use startfade(0,0,1);thank you conanto make the windows transparent w/shaders on.  But then they disappear completely when shaders are off.

I don't know the proper way to get around this, so I made one up.

I load in 2 objects for each glass pane.  I leave the first object as normal.  I use startfade on the second object.
For both objects I use setScopeAlways();.  Then I use GhostAlwaysSet.remove(objectid);.  In this way I have objects that exist in the server, but anyone joining will not be able to see those objects.

Then I added a command to ghost one of those sets of objects to a client.
/setshadermode 0 will show the default glass, and should be used when you have shaders off.
/setshadermode 1 will show the faded glass, and should be used when you have shaders on.

You can go from shadermode 1 to shadermode 0, because the faded glass is invisible when shaders are off.
You cannot go from shadermode 0 to shadermode 1, because the default glass is solid when shaders are on.

I also added a client.cs script to Map_Kitchen.  If you have Map_Kitchen installed, this script will automatically use /setshadermode [$Pref::ShaderQuality] when you start loading objects, while joining a server.

That's my workaround.  I don't know enough about modeling to know any better.


I was playing a minigame in the Kitchen, and pretty much every kill was a midair kill, triggering the "win" sound and a bottomprint on everyone's hud.
This is kinda annoying.
The code for midair kills is buried in base/server/scripts/game.cs.dso.  It seems the code will not detect a TSStatic object(used for collision in kitchen) as a piece of ground.
The midair kill code uses commandtoclient(%client,'bottomprint',%msg,%time); to send the message, instead of bottomprint(%client,%msg,%time).  I was unable to hook into commandtoclient to do any sort of filtering(that would have been a bad idea anyway) so instead, I wrong a bit of code that teleports a player to 0, 0, 5 as they die, allows the midair-kill stuff to function, and then teleports the resulting corpse back to the player's original position.
In this way no midair kills are detected.
However it finds the player's corpse using the client's camera.  So if for some reason the client's camera is NOT focused on their dead body, this script will leave the corpse in a weird place. :c
But it you're having trouble with midair kill detection returning false positives, feel free to package it up and add it to your game.  It might help.

Code: (test.cs) [Select]
if(isPackage(testpackage))
deactivatepackage(testpackage);

package testpackage
{
function gameConnection::onDeath(%client, %killerPlayer, %killer, %damageType, %unknownA)
{
%client.mabpos = %client.player.getTransform();
%client.player.setTransform("0 0 5 1 0 0 0");
parent::onDeath(%client, %player, %killer, %damageType, %unknownA);
if(isObject(%client.camera))
{
if(%client.camera.mode $= "Corpse")
{
%corpse = %client.camera.getOrbitObject();
%corpse.setTransform(getWords(%client.mabpos,0,2) SPC getWords(%corpse.getTransform(),3,6));
}
}
}
};
activatepackage(testpackage);
« Last Edit: May 01, 2017, 04:19:47 AM by Tendon »


It appears that the skybox is not loading, and the automatic clientsided /setshadermode script is not working.

If I ever get my main computer set up again, I will fix those things.

bit of code that teleports a player to 0, 0, 5 as they die, allows the midair-kill stuff to function, and then teleports the resulting corpse back to the player's original position.
this is part of why I love programming lol
just so many random issues that pop up and solving them in whatever way comes to mind