Back to the Korax Forum Archives
Karnizero
Crimson Wizard
Firebrand
Karnizero
script 1 (void)
{
Door_Open (....)
}
Cause i usually make use of lights, so when the button is used, a small green light is turned on, or a red light turned off (or any other fancy effects), in from of the switch.
I have tryed that at Vavoom, but i am not able the light to make it active and inactive.
At GzDoom, the most basic code i have is something like:
script 1 (void)
{
Door_Open (1, 25); // Lets open the door
Thing_Activate (1); // Small green light in from of switch
}
At GzDoom that script works nice, but at Vavoom, the things i think are different.
I have set the "Dormant" flag on the light, but he is never inactive.
I have also make a "Thing_DeActivate(...)" at a "OPEN" script, but light is not deactivated.
So, the magic question is: Can lights be activated or deactivated?
And that is all. Thanks for help, and have a happy cristmas.Crimson Wizard
Karnizero
Firebrand
Crimson Wizard
Karnizero
Crimson Wizard
Firebrand
- All the data files (MAPINFO, SNDINFO, TEXTURE1, etc.) should go without any directory. - Flats should go in the "flats" directory - Graphics (statusbar, fonts, titlepics, etc.) should go in the "graphics" directory - Maps (which should be single wad files for each map without anything but the map lumps) should go in the "maps" directory - Sounds (which can be WAV, FLAC, MP3, etc.) might go in the "sounds" directory - Music (with the same formats as sounds plus MOD music) can go in the "music" directory - Patches (the single images that form textures) should go in the "patches" directory - Sprites (any monster or object images) should go in the "sprites" directoryIf you have anymore troubles, just post here <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->.
Karnizero
- All the data files (MAPINFO, SNDINFO, TEXTURE1, etc.) should go without any directory. - Flats should go in the "flats" directory - Graphics (statusbar, fonts, titlepics, etc.) should go in the "graphics" directory - Maps (which should be single wad files for each map without anything but the map lumps) should go in the "maps" directory - Sounds (which can be WAV, FLAC, MP3, etc.) might go in the "sounds" directory - Music (with the same formats as sounds plus MOD music) can go in the "music" directory - Patches (the single images that form textures) should go in the "patches" directory - Sprites (any monster or object images) should go in the "sprites" directoryIf you have anymore troubles, just post here <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->. Thanks, that will come very handly. <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Crimson Wizard
Crimson Wizard
class DynamicLightSpot : MapSpot
__mobjinfo__(15200);
enum
{
arg_light_radius = 0,
arg_colour_red = 1,
arg_colour_green = 2,
arg_colour_blue = 3
};
//==========================================================================
//
// OnMapSpawn
//
//==========================================================================
void OnMapSpawn(mthing_t* mthing)
{
::OnMapSpawn(mthing);
DLightRadius = itof(Args[arg_light_radius]) * 8.0;
DLightColour = RGB(Args[arg_colour_red],
Args[arg_colour_green],
Args[arg_colour_blue]
);
}
//==========================================================================
//
// Activate
//
//==========================================================================
bool Activate()
{
::Activate();
bHidden = false;
return true;
}
//==========================================================================
//
// Deactivate
//
//==========================================================================
bool Deactivate()
{
::Deactivate();
bHidden = true;
return true;
}
defaultproperties
{
bHidden = false;
bDynamicLight = true;
DLightRadius = 128.0;
DLightColour = RGB(255,255,255);
}
Mobjinfo id could be different ofcourse.
Don't forget to include this new VC file in classes.vc:
#include "DynamicLightSpot.vc"If you are using DoomBuilder, include new item into config file for your convenience, for example, in "Light objects" group:
15200
{
title = "Dynamic coloured light (x8)";
arg1 = "Radius";
arg2 = "Red";
arg3 = "Green";
arg4 = "Blue";
}
Perhspas I will add this in WIKI Tutorial section.Karnizero
Crimson Wizard