Space Rangers Ep. 8 - the Rouge Robot (game project)
Re: Space Rangers Ep. 8 - the Rouge Robot (game project)
Great scene. You should put 3po's head in there.
Re: Space Rangers Ep. 8 - the Rouge Robot (game project)
Kenny Baker might have had appreciated that.seppgirty wrote:Great scene. You should put 3po's head in there.
Re: Space Rangers Ep. 8 - the Rouge Robot (game project)
I've been testing spliting up the video in a video part and an audio part and playing them from two different files at the same time. It has worked well taking care of the problem of the sound getting out of sync after a first movie with sound has been played.
It do however have carried with it a different problem. When skiping a cut scene the sound keep playing. I have found no way to stop a sound file once it has started to play. Another way to handle the problem could be to stop the possibility to skip a cut scene. I've not looked into that possibility and that really is not a way I would like to go. I think that a player should have the option to skip a cut scene.
The code I've used to play a soundless video and an audio file together.
It do however have carried with it a different problem. When skiping a cut scene the sound keep playing. I have found no way to stop a sound file once it has started to play. Another way to handle the problem could be to stop the possibility to skip a cut scene. I've not looked into that possibility and that really is not a way I would like to go. I think that a player should have the option to skip a cut scene.
The code I've used to play a soundless video and an audio file together.
Code: Select all
if(self.player_X>-2250 and self.player_X<-2190 and self.player_Z>580 and self.player_Z<657 and self.player_Y>-360)
{
if(BOX=1)
{
SetEventState("MovieTrig", true); //trigger for the video
BOX=2;
}
if(BOX=0)
{
PlaySound("lick3.wav");
BOX=1;
}
}
else
{
SetEventState("MovieTrig", false);
BOX=0;
}
Re: Space Rangers Ep. 8 - the Rouge Robot (game project)
https://youtu.be/AzutIf2ixjU
Video on testing slider controls for a transporter unit and a transporter beam
Re: Space Rangers Ep. 8 - the Rouge Robot (game project)
There is the low level pawn method StopAllAudioStreams() the docs says it stops all audio streams. If it doesn't stop a sound created using PlaySound() then you might try the StartSoundTrack() low level pawn method to play the sound.Grok wrote:When skiping a cut scene the sound keep playing. I have found no way to stop a sound file once it has started to play.
Re: Space Rangers Ep. 8 - the Rouge Robot (game project)
That slider is freaking sweet. your getting really good at RF.
Re: Space Rangers Ep. 8 - the Rouge Robot (game project)
Oh yes, that slider is awesome!
Steve Dilworth - Resisting change since 1965!
Re: Space Rangers Ep. 8 - the Rouge Robot (game project)
@seppgirty and steven8
Thanks
Here's the code for moving the the first slider and rendering it, if that might be interesting for someone.
@Allanon
StopAllAudioStreams() don't stop a sound played by using PlaySound("sound.wav"), [at least not for me.]
I haden't tested StartSoundTrack("sound.wav") before. It did work and StopAllAudioStreams() did stop the sound. So that was good.
One problem though was that it took about 8 seconds for the sound to start playing (buffering?), so it still doesn't quite solve my problem.
Anyway that is a step forward. Thanks for the ideas.
Thanks
Here's the code for moving the the first slider and rendering it, if that might be interesting for someone.
Code: Select all
if(GetMousePosX()> KNOB1X and GetMousePosX()< KNOB1X+21 and GetMousePosY()> KNOB1Y and GetMousePosY()< KNOB1Y+56)
//checking if the mouse pointer is over the slider knob
{
if(KNOB1H=0)
{
if(IsKeyDown(72)) //left mouse button down
{
YSTART=GetMousePosY();
KNOB1H=1;
}
}
if(KNOB1H=1)
{
KNOB1Y=KNOB1Y-YSTART+GetMousePosY(); //changing the y-value of the slider knob with the difference between mouse-y this loop and the value the previous loop
YSTART=GetMousePosY();
if(KNOB1Y<94)
{KNOB1Y=94;}
if(KNOB1Y>324)
{KNOB1Y=324;}
}
}
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
ShowHudPicture(20, true, "", KNOB1X,KNOB1Y,"");
StopAllAudioStreams() don't stop a sound played by using PlaySound("sound.wav"), [at least not for me.]
I haden't tested StartSoundTrack("sound.wav") before. It did work and StopAllAudioStreams() did stop the sound. So that was good.
One problem though was that it took about 8 seconds for the sound to start playing (buffering?), so it still doesn't quite solve my problem.
Anyway that is a step forward. Thanks for the ideas.
Re: Space Rangers Ep. 8 - the Rouge Robot (game project)
Maybe use a AudioSource3d entity with a large radius, you can turn them on and off using the LevelController class.
Re: Space Rangers Ep. 8 - the Rouge Robot (game project)
Thanks.Allanon wrote:Maybe use a AudioSource3d entity with a large radius, you can turn them on and off using the LevelController class.
I got a seemingly working solution now, using AudioSource3D.
To use the Start and Stop orders the TriggerName slot of the entity need to be set to *Programmed*
The Stop command seems to need the Loop option set to true.
It was also necessary to start the sound a couple of game-loops before the video. Otherwise the video will block the sound from starting.
A bit of shoe string/chewing gum style of solution... but it seems to do the job
Re: Space Rangers Ep. 8 - the Rouge Robot (game project)
You might try using a different codec for video and/or audio in the AVI file. That might prevent it from getting out of sync.
Re: Space Rangers Ep. 8 - the Rouge Robot (game project)
Could be. I did however have a hard time finding a combination that would play at all with sound. I don't see a lot of options to chose between.Allanon wrote:You might try using a different codec for video and/or audio in the AVI file. That might prevent it from getting out of sync.
For the time being I stick with this solution and concentrate on getting a game together.
In the future, who knows?
Re: Space Rangers Ep. 8 - the Rouge Robot (game project)
That is a wise choice. You can't allow yourself to be bogged down by any one issue. Too many projects die that way. You've got to keep forging ahead, and the way you are going, it's going to be great!Grok wrote:Could be. I did however have a hard time finding a combination that would play at all with sound. I don't see a lot of options to chose between.Allanon wrote:You might try using a different codec for video and/or audio in the AVI file. That might prevent it from getting out of sync.
For the time being I stick with this solution and concentrate on getting a game together.
In the future, who knows?
Steve Dilworth - Resisting change since 1965!
Re: Space Rangers Ep. 8 - the Rouge Robot (game project)
Yes. That is pretty much the way I see it.steven8 wrote: ... You can't allow yourself to be bogged down by any one issue. Too many projects die that way. You've got to keep forging ahead, ...
-------
A new video. This one of making a weapon to be used in a 3:de person view.
https://youtu.be/odEHVUg7mPM
For the time I have reused most of the text in the weapon.ini-file for a handgun. So the muzzelflash and ejected cartridges are from that and will not be in a final version. Just getting it to work this time around.
Shooting works fine from idle standing or crouching, but not in any other animation.
I now believe that is due to the animations for the player character. Particular among these animations
shootup = Shoot2
shootdwn = Shoot1
aimup = Aim2
aimdwn = Aim1
walkshootup = WalkShoot2
walkshootdwn = WalkShoot1
runshootup = RunShoot2
runshootdwn = RunShoot1
slidetoleftshootup = StrafLeft_up
slidetoleftshootdwn = StrafLeft_down
slideruntoleftshootup = RunStrafLeft_up
slideruntoleftshootdwn = RunStrafLeft_down
slidetorightshootup = StrafRight_up
slidetorightshootdwn = StrafRight_down
slideruntorightshootup = RunStrafRight_up
slideruntorightshootdwn = RunStrafRight_down
jumpshootup = Jump_up
jumpshootdwn = Jump_down
fallshootup = Fall_up
fallshootdwn = Fall_down
crouchaimup = Crawl_IdleUP
crouchaimdwn = Crawl_IdleDown
crouchshootup = Crawl_Idle_shotUP
crouchshootdwn = Crawl_Idle_shotDown
crawlshootup = Crawl_Up
crawlshootdwn = Crawl_Down
crawlslidetoleftshootup = Crawl_Left_Up
crawlslidetoleftshootdwn = Crawl_Left_Down
crawlslidetorightshootup = Crawl_Right_Up
crawlslidetorightshootdwn = Crawl_Right_Down
I used the animations of one of the characters that came with the game as a model. I remember being a bit surprised that the models mostly was looking up and down but not pointing a gunhand. There was some text on the models using a mixture of poses, and I thought that maybe the poses with a pointed gunhand would be used with animations without that.
I now think I probably was wrong and that I should go over thoose animations and adding "gun hands" where they are lacking.
Any comments on that?
If I'm correct maybe the character coming with the game should have his animations adjusted too?
Re: Space Rangers Ep. 8 - the Rouge Robot (game project)
Someone mentioned that problem a couple of months ago. I think the stock animations need edited. Should be a bit easier now with the new equity.Shooting works fine from idle standing or crouching, but not in any other animation.