XML:ONLV: Difference between revisions

137 bytes removed ,  29 August 2013
m
env_show 0 0 does not work
mNo edit summary
m (env_show 0 0 does not work)
Line 345: Line 345:
                 </Import>
                 </Import>


The motorcycle has here script id 9. You can show and hide the object with bsl command env_show whereby the second parameter means true or false.
 
'''env_show'''
 
The motorcycle has here script id 9. You can show and hide the object with bsl command env_show whereby the second parameter means true or false. '''Never use 0 as id''' because it won't work.


  env_show 9 1
  env_show 9 1
  env_show 9 0
  env_show 9 0


EdT demonstrates [http://youtu.be/Em6wa5JTQNM here] env_show. The objects have collision.
EdT demonstrates [http://youtu.be/Em6wa5JTQNM here] env_show. The objects have collision.
Line 366: Line 368:


https://dl.dropboxusercontent.com/u/139715/OniGalore/TV_triggered_env_show.png
https://dl.dropboxusercontent.com/u/139715/OniGalore/TV_triggered_env_show.png
: edit: replace 0 by 25


If the objects appear to ''flash'' we could replace the hide_all_object_groups function with individual TV exit functions.
If the objects appear to ''flash'' we could replace the hide_all_object_groups function with individual TV exit functions.
Line 372: Line 375:
  {
  {
  # env_show id [1|0]
  # env_show id [1|0]
env_show 0 0
  env_show 1 0
  env_show 1 0
  env_show 2 0
  env_show 2 0
  # ...
  # ...
  env_show 24 0
  env_show 25 0
  }
  }
   
   
Line 390: Line 392:
  env_show (grpH, 1)
  env_show (grpH, 1)
   
   
# if user uses 0 he must place it as first argument
  # missing arguments are taken to be 0
  # missing arguments like in "show_object_group (20, 21, 6, 19, , , , )
# are taken to be 0, so we must take care of unwanted zeros
if (grpG eq 0) and (grpH eq 0)
{
# hide 0 group
env_show (0, 0)
}
  }
  }
   
   
  func TV_0_enter
  func TV_25_enter
  {
  {
  hide_all_object_groups
  hide_all_object_groups
Line 408: Line 402:
  # (center, north, north east, east, east south, south, south west, west, west north)
  # (center, north, north east, east, east south, south, south west, west, west north)
  # there's a limit of 8 arguments per function
  # there's a limit of 8 arguments per function
  show_object_group 0 1 2 3 4 5 6 7
  show_object_group 25 1 2 3 4 5 6 7
  show_object_group 8
  show_object_group 8
  }
  }
   
   
# other examples
  func TV_6_enter
  func TV_6_enter
  {
  {
  hide_all_object_groups
  hide_all_object_groups
  show_object_group 6 7 0 5 18 19 20 21
  show_object_group 6 7 25 5 18 19 20 21
  show_object_group 22
  show_object_group 22
  }
  }
8,452

edits