Hi All,
I have GGMax and GGClassic, i have a script from GGC that will play a video on a screen , I wander if this can be used in GGM, or if indeed this can be done now already,
this is my first attempt at using GGM so I have no idea how things work yet ,I have made a map with objects and I would like a Video of which I will make,to play on a tv or a screen like what I can do in GGC.
Here is the GGC script you are probably aware of it anyhow many thanks in advance for any reply's :
-- plays the specified mp4 video file onto the entity texture when player in range
-- note for performance reasons, master in-game videos at an appropriate size, e.g 640x360, 170kbps (or lower)
video_to_play = {}
loop_video = {}
video_trigger_range = {}
prompt_to_start_video = {}
prompt_to_stop_video = {}
play_once = {}
function play_video_on_entity_init(e)
-- adjust these values ----------------------------------------------------------------
video_to_play[e] = "videobank\\GG_mars_helicopter.mp4"
--video_to_play[e] = "videobank\\GG_Video.mp4"
--video_to_play[e] = "videobank\\GG_western.mp4"
--video_to_play[e] = "videobank\\GG_tesla.mp4"
--video_to_play[e] = "videobank\\GG_firefx.mp4"
loop_video[e] = 0 -- 0 to play video once, 1 to loop video
video_trigger_range[e] = 300
prompt_to_start_video[e] = "Press E key to Start Video"
prompt_to_stop_video[e] = "Press ALT key to Stop Video"
---------------------------------------------------------------------------------------
play_once[e] = 0
end
function play_video_on_entity_main(e)
PlayerDist = GetPlayerDistance(e)
if PlayerDist < video_trigger_range[e] then
if play_once[e] == 0 or IsVideoOnEntityPlaying() == 0 then
Prompt(prompt_to_start_video[e])
play_once[e] = 0
if g_KeyPressE == 1 then
play_once[e] = 1
PlayVideoOnEntity(e,video_to_play[e],loop_video[e])
end
end
if IsVideoOnEntityPlaying() == 1 and play_once[e] == 1 then
Prompt(prompt_to_stop_video[e])
if g_KeyPressALT == 1 then
StopVideoOnEntity(e)
play_once[e] = 0
end
end
else
if play_once[e] == 1 then
StopVideoOnEntity(e)
play_once[e] = 0
end
end
end
s clarke