VP EVENT WORLD SETTING: Difference between revisions

From Virtual Paradise Wiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
Line 34: Line 34:
{{sdk world setting row|float x 3|worldlight_diffuse||??? (e.g. "0.9 0.9 0.9")}}
{{sdk world setting row|float x 3|worldlight_diffuse||??? (e.g. "0.9 0.9 0.9")}}
{{sdk world setting row|float x 3|worldlight_position||??? (e.g. "-1.842309 1.547655 -1.358088")}}
{{sdk world setting row|float x 3|worldlight_position||??? (e.g. "-1.842309 1.547655 -1.358088")}}
{{sdk world setting row|???|worldlight_srgb_colors||??? (e.g. "1.0 1.0 0.95")}}
{{sdk world setting row|float x 3|worldlight_specular||??? (e.g. "1.0 1.0 0.95")}}
{{sdk world setting row|???|worldlight_srgb_colors||???}}
|}}
|}}
|caveats=
|caveats=

Revision as of 21:16, 17 December 2016

Event set and handler snippet

vp_event_set(instance, VP_EVENT_WORLD_SETTING, event_world_setting);

void event_world_setting(VPInstance instance) { }

Received for each setting of a world upon connecting to it.

Attributes

Attribute Usage
VP_WORLD_SETTING_KEY Setting key
VP_WORLD_SETTING_VALUE Setting value

Behavior

Key Range Usage
"allow_debug_menu" 0 or 1 Used to enable/disable the debug menu.
"avatar<number>" n/a Not used anymore.
"avatars_file" Name of file containing avatar configuration.
"farplane" ???
"fog_begin" Distance at which fog should begin.
"fog_color" rrggbb Color of the fog (rr, gg and bb are each a hexadecimal number between 00 and ff).
"fog_density" Density of fog.
"fog_end" Distance at which fog should be end.
"fog_mode" "linear", ... Fog mode.
"fov" Field of view angle.
"ground" Ground object.
"groundrepeats" 0 or 1 Ground object is tiled.
"nearplane" ???
"objectpath" Base url for object path.
"objectpassword" Password used to encrypt zip files in object path.
"override_visibility" 0 or 1 ???
"skybox" Base name of skybox textures.
"skybox_swaplr" 0 or 1 Swap the left and right texture of the skybox.
"skybox_extension" (e.g. "png") File-extension of skybox textures, to allow using non JPEG textures.
"terrain" 0 or 1 Terrain enabled/disabled.
"terrainoffset" Sets a height offset for terrain, in meters.
"terrainscale" Scales the size of terrain cells.
"web_overlay" ???
"welcome" Welcome message.
"worldlight_ambient" ??? (e.g. "0.65 0.65 0.65")
"worldlight_diffuse" ??? (e.g. "0.9 0.9 0.9")
"worldlight_position" ??? (e.g. "-1.842309 1.547655 -1.358088")
"worldlight_specular" ??? (e.g. "1.0 1.0 0.95")
"worldlight_srgb_colors" ???

Caveats

  • Because these settings are always sent upon entering a world, it is recommended to register for this event before calling vp_enter(). Otherwise, some or all settings may be missed.
  • There is currently no method to force a resend or watch for settings changes, except by re-entering the world

Examples

This event has no usage examples; please add at least one to this page