Why loading animation was too late compared smoke effects ?

Hi,
I need little help.
I am still learned to create a hopper assets for industrial based on an original Ben Dorsey content item. Meshes by @MSGSapper for coal, gravel and sand products.
So I cloned 3 times from <kuid2:439337:101033:4> Coal_Loader_Interactive_with_effects.

All had worked, products animation worked as desired.
BUT, there is a problem : loading process animation was too late 1 second after sound and smoke effects. I don't know which number to be changed.

Below the command in config.sys I read :
Code:
[INDENT=2]soundscript[/INDENT]
[INDENT=2]{[/INDENT]
[INDENT=2]  coal_dump[/INDENT]
[INDENT=2]  {[/INDENT]
[INDENT=2]    trigger                             "coal_dump"[/INDENT]
[INDENT=2]    attachment                          "a.sound"[/INDENT]
[INDENT=2]    nostartdelay                        1[/INDENT]
[INDENT=2]    repeat-delay                        1,0[/INDENT]
[INDENT=2]    distance                            5,200[/INDENT]
[INDENT=2]    sound[/INDENT]
[INDENT=2]    {[/INDENT]
[INDENT=3]      0                                 "coal_dump.wav"[/INDENT]
[INDENT=2]    }[/INDENT]
[INDENT=2]  }[/INDENT]
[INDENT=2]}[/INDENT]
[INDENT=2]smoke0[/INDENT]
[INDENT=2]{[/INDENT]
[INDENT=2]  attachment                            "a.unloading0"[/INDENT]
[INDENT=2]  mode                                  "time"[/INDENT]
[INDENT=2]  color                                 25,25,25,220[/INDENT]
[INDENT=2]  accel                                 0.5,0.3,0[/INDENT]
[INDENT=2]  rate                                  8[/INDENT]
[INDENT=2]  velocity                              3[/INDENT]
[INDENT=2]  lifetime                              10[/INDENT]
[INDENT=2]  minsize                               2[/INDENT]
[INDENT=2]  maxsize                               10[/INDENT]
[INDENT=2]  enabled                               0[/INDENT]
[INDENT=2]}[/INDENT]
[\CODE]

And in script file :
[CODE]
float BeginLoad(LoadingReport report)
    {
            SendMessage(me, "pfx", "+0+1");
            Asset meAsset = GetAsset();
            World.PlaySound(meAsset, "coal_dump.wav", 1000.0f, 20.0f, 1000.0f, me, "");
            return 1.0;
    }
[\CODE]

I want loading proccess, smoke and sound start in same time. I'm guessing those setting are in script 'world.playsound' but I don't know where I need to adjust. 

Thanks in advance.
 
With regard to your difficulty with editing your own posts, report the problem here. With regard to your original reason for posting, I`m afraid that I haven`t had much experience there. Apologies.
 
Maybe I re-write all from previous. No edit chance or delete my post.

I need little help.
I am still learned to create a hopper assets for industrial based on an original Ben Dorsey content item. Meshes by @MSGSapper for coal, gravel and sand products.
So I cloned 3 times from <kuid2:439337:101033:4> Coal_Loader_Interactive_with_effects.

All had worked, products animation worked as desired.
BUT, there is a problem : loading process animation was too late 1 second after sound and smoke effects. I don't know which number need to be changed.

Below part of the command in config.sys of MIN I use :

soundscript
{
coal_dump
{
trigger "coal_dump"
attachment "a.sound"
nostartdelay 1
repeat-delay 1,0
distance 5,200
sound
{
0 "coal_dump.wav"
}
}
}

smoke0
{
attachment "a.unloading0"
mode "time"
color 25,25,25,220
accel 0.5,0.3,0
rate 8
velocity 3
lifetime 10
minsize 2
maxsize 10
enabled 0
}


And part of script file :

float BeginLoad(LoadingReport report)
{
SendMessage(me, "pfx", "+0+1");
Asset meAsset = GetAsset();
World.PlaySound(meAsset, "coal_dump.wav", 1000.0f, 20.0f, 1000.0f, me, "");
return 1.0;
}


I want loading proccess, smoke and sound start at SAME time. I'm guessing those setting are in script 'world.playsound' (bold red text) but I don't know exactly.
I didn't find in baseindustry.gs for documentation for the variables.

Thanks in advance.
 
I just looked in World.gs and found definitions for the arguments, none of which have anything to do with time. What order do the various effects occur in? I assume that the handler for "pfx" launches the smoke signals. I`m not particularly familiar with handling industries at this time, but I need to look into it for my own purposes. I am *particularly* unfamiliar with the "soundscript" and "smoke" containers. I do know a few things about scripting, though, and trying to learn more. One thing that looks screwy to me, though, is that you apparently use both soundscript and PlaySound. The documentation in world.gs looks to me like you should be using only one. I don`t know much else about this at this time.

I just noticed that the animation starts one second late. I don`t know if this is the best solution, but what if you handle the smoke and sound in a handler that listens for a message that you send to yourself with a delayed delivery? I don`t know how to explain this better just now, but I can try if you want me to.
 
Industries are a bit complex to follow and are compounded by the industry load/unload and the target vehicle load/unload. Yes, the use of a soundscript container bothered me too since they are supposed to be used together with an animation-event. See https://online.ts2009.com/mediaWiki/index.php/Class_MapObject#PlaySoundScriptEvent. There is an example of animation-events in Ben Dorsey's Indoor Scrapyard <kuid2:210518:10060:3>. I don't recommend using that process if this is your first industry asset as you need to include an animation event text file identifying the frames that trigger events.

You don't say where the animation is being triggered and I've seen that done in BeginLoad() and also triggered by an animation event. It really depends on what sort of animation you need and when it needs to occur.

In your BeginLoad() code you are returning a delay of 1.0 seconds so it's likely that is where your delay is. I'm not sure of the sequence of industry calls and BeginLoad() is called early and that delay returned is supposed to be some pre loading/unloading animation time. See BaseIndustry.gs.
 
p.s. Have a look at Auran's coal mine <kuid:-25:416>. Its quoted as an example in baseindustry.gs. It doesn't have an overridden BeginLoad() and just uses the original which doesn't do much at all.
 
@pcas1986, that makes sense. I had figured that the return of 1.0 was a duration for loading, not a delay, but as I said above, I don`t know a lot about industries yet.
Yes! The delay problem has been solved.

'return 1.0' turns out to be related to the next task, which in this case is delaying the 'load.im' animation.
Because I have tried it by changing to 'return 5.0', and the result is a longer animation delay.
So I changed it back to 'return 0.0' and now it has the same start time as sound + smoke....

I didn't expect this syntax is to delay the next job (turn on)

So now I will to try to find out how solve next problem about this industry (still in same asset).

Do I need create new thread ?
 
I wouldn`t think so, that just a change it title would be enough, but I`ve seen where other posters start a new thread at just about every stage of their project. Clearly those people disagree with me. I think that you should do whatever /you/ think is best. What is more important, keeping people that have some knowledge about the project, or attracting people with a skill-set relevant to the next problem?
 
I agree with you.
If it is related to the same asset and same kuid, it should be enough in the same thread, no need to create new thread. But I don't know it's permitted or not.

I have several problems on the this industrial assets. As I mention above : <kuid2:439337:101033:4> Coal_Loader_Interactive_with_effects.
1. The image texture of the commodity randomly changes and does not match my expectations.
2. Asset properties ('?') displayed the wrong information.
3. Industry is keeping idle, does not want to load commodity to hopper.
4. Cannot use the same kuid on the same route with another commodity.
5. Animation and smoke plus sound do not start at the same time (this thread).
All the problems above have been solved after several ask a question and trial attempts.

And the problem that I am still to find a solution for is :
6. The first hopper must stop completely to be loaded, while the next hopper is OK at speed settings (no need to stop).

So in my opinion, we can use the same thread so we can have a one thread solution.
But I also didn't find a menu to change the thread title, just as I didn't find a menu to edit or delete my posts.
 
By "delay" I meant the time it takes for the preload animation to take place. A coal chute, for example, may take some time to deploy and you don't want the load action to occur until the facility is ready.

If I ask for help on a topic I try to keep the discussion limited to that so anyone searching for an answer might find it and not end up reading a whole lots of posts totally unrelated to the original topic. I think that is a fair approach.

But I have started a general discussion on FBX issues when it was first introduced. That ran for a while until more information got put up on the WiKi so then I would refer questions to that.
 
But I also didn't find a menu to change the thread title, just as I didn't find a menu to edit or delete my posts.
If it`s there, it`ll be at the top right corner of the original post, but you`re having problems editing your own posts, so I doubt that it will be there.

@pcas1986, that makes perfect sense. I think that it kinda depends on how closely related the issues are. I have just come up with a compromise solution that might work. Start a new thread, but link back to the previous thread in the first post, then go back to said thread and add a link to the new thread, both links clearly documented as references do different parts of a larger narrative. That solves both problems, yes?
 
@pcas1986, that makes perfect sense. I think that it kinda depends on how closely related the issues are. I have just come up with a compromise solution that might work. Start a new thread, but link back to the previous thread in the first post, then go back to said thread and add a link to the new thread, both links clearly documented as references do different parts of a larger narrative. That solves both problems, yes?

I guess that might work but I don't see the point in doing that. If I see a "new post" of interest then find there are dozens of previous posts then I'll ignore the entire thing.
 
Back
Top