3rd Party Models/Media Chat / Problem with Sound playing for Papers(animate) by Oldpman and script by 3com

Author
Message
R.E.Z.
9
Years of Service
User Offline
Joined: 9th Apr 2015
Location:
Posted: 1st Jun 2016 10:22 Edited at: 1st Jun 2016 19:37
Hello,

just tried to apply a sound to the Papers(animate).

https://www.tgcstore.net/product/27811

I did also use the script by 3Com

https://forum.game-guru.com/thread/213453?page=6#msg2550204

I named the script "run_anim.lua" and applied it to the Papers(animate) Entity in the Properties Menue.
Then I set also at the Properties Menue the sound, that I want to be played, when the animation runs (Sound0).

The animation runns proper as before, but it isnt played a sound at all.

Did someone experience the same problem on this issue?
Perhaps, I just did something wrong?
Might soumeone please know help?

Best regards,
R.E.Z.
PM
OldPMan
3D Media Maker
16
Years of Service
User Offline
Joined: 10th Aug 2008
Location:
Posted: 1st Jun 2016 10:58 Edited at: 1st Jun 2016 11:04
It seems to me that he had found a solution.
It is necessary to remove a parameter playanimineditor = 1 in the file .FPE model. (It helped me)
Tell me if I'm right, and this has helped you to fix the problem.
I then I will fix archives to store something people would not have faced more with this.
It's pretty weird. Maybe we should see it as a bug?
The secret to creativity is knowing how to hide your sources.
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 1st Jun 2016 12:41
Quote: "I named the script "run_anim.lua" "

When you rename script, you has to change it in script too, so 1 script called "my_anim.lua" and you rename it as
"the _animation.lua", so the script should look as follow:



The sound should be .wav or .ogg, mp3 is not allowed, I thought.
Also not 100& sure, but I believe .wav file should be mono and 16.

Quote: "It is necessary to remove a parameter playanimineditor = 1 in the file .FPE "

Yes.

"playanimineditor = 1" auto-run the animation, just place entity and you can notice it animate, even in editor.
"playanimineditor = 0" you has to use it, when animation run via script.
Item should be dynamic.

3com








Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM
R.E.Z.
9
Years of Service
User Offline
Joined: 9th Apr 2015
Location:
Posted: 1st Jun 2016 19:02
Hello,

@ OldPMan and
@ 3com

Thank You for Your answers

Let me see, if I understood that issue correctly:

(1) Audiofile:
Quote: "The sound should be .wav or .ogg, mp3 is not allowed, I thought."

-->> Yes *.ogg

(2) Renaming scriptfile "my_anim.lua" to "the _animation.lua". This script "the _animation.lua" reads:



(3) Change value in the *.fpe file:

Quote: "
"playanimineditor = 1" auto-run the animation, just place entity and you can notice it animate, even in editor.
"playanimineditor = 0" you has to use it, when animation run via script.
Item should be dynamic.
"


(4) Applying the "the _animation.lua" script to the "Papers(animate)" Entity inside the Level

(5) Applying the *.ogg file

Am I right?
Did I understood that correctly?

Best regards,
R.E.Z.






PM
OldPMan
3D Media Maker
16
Years of Service
User Offline
Joined: 10th Aug 2008
Location:
Posted: 1st Jun 2016 19:24
Hi R.E.Z. !
I think it right. It should all work are now correctly.
The secret to creativity is knowing how to hide your sources.
R.E.Z.
9
Years of Service
User Offline
Joined: 9th Apr 2015
Location:
Posted: 1st Jun 2016 19:35 Edited at: 1st Jun 2016 19:42
Hello,

something I did wrong:

(1) Changing value 0 to 1 in the "Papers(animate).fpe" file works okay
playanimineditor = 1

and keeping

defaultstatic = 0

Now the entity isnt animateing in editor.


(2) Applying Script "the _animation.lua"


Running the Level causes LUA ERROR: "scriptbank\3com\the_animation.lua:2: '(' expect near'_animation_init'"


and second try:


(1) ... same ...

(2) Applying Script "run_anim.lua"

code taken from here:
https://forum.game-guru.com/thread/213453?page=6#msg2550204

Running the Level: Noting happens at all, when aproaching at the "Papers(animate)" Model.


What did I do wrong?
Might You please have help for me on this issue?

Best regards,
R.E.Z.
PM
R.E.Z.
9
Years of Service
User Offline
Joined: 9th Apr 2015
Location:
Posted: 1st Jun 2016 19:54 Edited at: 1st Jun 2016 19:54
Hello,

now it works fine:

(1) "Papers(animate).fpe":

"playanimineditor = 1"

and

"defaultstatic = 0"


(2) Applying Script "run_anim.lua"

code taken from here:
https://forum.game-guru.com/thread/213453?page=6#msg2550204

(3) Applying Audiofile "*.wav" to Sound 0

GREAT
It WORKS!

Best regards
and thank You for Your help
R.E.Z.
PM

Login to post a reply

Server time is: 2024-11-22 09:11:00
Your offset time is: 2024-11-22 09:11:00